AnthonMS / TimeMentor

This is the temporary repo for my Final Assignment for my studies
0 stars 0 forks source link

Wipe database #37

Closed AnthonMS closed 5 years ago

AnthonMS commented 5 years ago

Time Estimate: 2 Hours OBS! Remember to save sql scripts so we can run them locally. Wipe the database on the server and create new data with MV-Karriere and TimeMentor companies. Then create 'Mortens' superuser for MV-Karriere. And a couple of superusers for TimeMentor for testing.

AnthonMS commented 5 years ago

Used: 2 Hours

RUN THESE SQL SCRIPTS LOCALLY TO GET THE SAME DATA AS ON THE LIVE SERVER

DELETE FROM timeregistrations WHERE 1=1;

DELETE FROM borgere WHERE 1=1;

DELETE FROM users WHERE 1=1;

DELETE FROM companies WHERE 1=1;

INSERT INTO companies (name, email, phone, licenseQuantity) VALUES ('TimeMentor', 'Anthon@Steiness.info', '+45 60 66 79 57', 1000), ('MV-Karriere', 'mm@mv-k.dk', '+45 40 35 16 76', 1000);

INSERT INTO users (username, name, email, phone, superuser, companyId, password) SELECT 'AMS', 'Anthon Mølgaard Steiness', 'Anthon@Steiness.info', '+45 60 66 79 57', true, companies.id, 'ce91f4454b670f985d46d507ef016b0e17aa47d12586f3e78cde78778817e4ce' FROM companies WHERE companies.name='TimeMentor';

INSERT INTO users (username, name, email, phone, superuser, companyId, password) SELECT 'MHE', 'Mads Heilberg', 'Mads.heilberg@gmail.com', '+45 00 00 00 00', true, companies.id, 'ce91f4454b670f985d46d507ef016b0e17aa47d12586f3e78cde78778817e4ce' FROM companies WHERE companies.name='TimeMentor';

INSERT INTO users (username, name, email, phone, superuser, companyId, password) SELECT 'MHE', 'Mads Heilberg', 'Mads.heilberg@gmail.com', '+45 00 00 00 00', true, companies.id, 'ce91f4454b670f985d46d507ef016b0e17aa47d12586f3e78cde78778817e4ce' FROM companies WHERE companies.name='TimeMentor';

INSERT INTO users (username, name, email, phone, superuser, companyId, password) SELECT 'MOR', 'Morten', 'mm@mv-k.dk', '+45 40 35 16 76', true, companies.id, 'ce91f4454b670f985d46d507ef016b0e17aa47d12586f3e78cde78778817e4ce' FROM companies WHERE companies.name='MV-Karriere';