Skip to content
Snippets Groups Projects
Commit a1134b5a authored by Petr Kabourek's avatar Petr Kabourek
Browse files

somehwat fix db cleaning

parent c0340bd9
No related branches found
No related tags found
1 merge request!21Db
#!/bin/bash #!/bin/bash
docker exec -i hr psql -u root -p'123' airports-hr-service < ./db-management/clean/clean-hr-service.sql cat ./db-management/clean/clean-hr-service.sql | docker-compose exec -T hr-service-db psql -U postgres -d hr -p 5432
docker exec -i hr psql -u root -p'123' airports-service < ./db-management/clean/clean-airports-service.sql cat ./db-management/clean/clean-airports-service.sql | docker-compose exec -T airports-service-db psql -U postgres -d airports -p 5432
docker exec -i hr psql -u root -p'123' airports-flights-service < ./db-management/clean/clean-flights-service.sql #cat ./db-management/clean/clean-flights-service.sql | docker-compose exec -T flights-service-db psql -U postgres -d flights -p 5432
docker exec -i hr psql -u root -p'123' airports-planes-service < ./db-management/clean/clean-planes-service.sql cat ./db-management/clean/clean-planes-service.sql | docker-compose exec -T planes-service-db psql -U postgres -d planes -p 5432
\ No newline at end of file \ No newline at end of file
DELETE * FROM airport; SET search_path TO airport;
\ No newline at end of file
DELETE FROM airport;
\ No newline at end of file
DELETE * FROM flight;
DELETE * FROM flightrealization; DELETE FROM flight;
DELETE * FROM issue; DELETE FROM flightrealization;
\ No newline at end of file DELETE FROM issue;
\ No newline at end of file
DELETE * FROM language; SET search_path TO hr;
DELETE * FROM pilot_licence;
DELETE * FROM steward; DELETE FROM language;
DELETE * FROM pilot; DELETE FROM pilot_licence;
DELETE * FROM employee; DELETE FROM stewards;
\ No newline at end of file DELETE FROM pilots;
DELETE FROM employee;
\ No newline at end of file
DELETE * FROM plane; SET search_path TO planes;
\ No newline at end of file
DELETE FROM plane;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment