[TOOLS] Make Makefile rule database-force-nuke stop and restart the worker container

This commit is contained in:
Hugo Sales 2021-11-23 22:10:16 +00:00 committad av Diogo Peralta Cordeiro
förälder 30f4131f5d
incheckning d5fc2cac8a
Signerad av: diogo
GPG-nyckel ID: 18D2D35001FBFAB0
1 ändrade filer med 3 tillägg och 1 borttagningar

Visa fil

@ -29,7 +29,9 @@ psql-shell: .PHONY
docker exec -it $(call translate-container-name,$(strip $(DIR))_db_1) sh -c "psql -U postgres social"
database-force-nuke:
docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "cd /var/www/social; bin/console doctrine:database:drop --force && bin/console doctrine:database:create && bin/console doctrine:schema:update --dump-sql --force && bin/console app:populate_initial_values"
docker stop $(call translate-container-name,$(strip $(DIR))_worker_1) \
&& docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "cd /var/www/social; bin/console doctrine:database:drop --force && bin/console doctrine:database:create && bin/console doctrine:schema:update --dump-sql --force && bin/console app:populate_initial_values" \
&& docker-compose up -d
database-force-schema-update:
docker exec -it $(call translate-container-name,$(strip $(DIR))_php_1) sh -c "/var/www/social/bin/console doctrine:schema:update --dump-sql --force"