feat(infra) : add pull-prod-db script and make target
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
makefile
4
makefile
@@ -157,6 +157,10 @@ fixtures-load:
|
||||
$(DOCKER_COMPOSE) exec -T db psql -U $(POSTGRES_USER) -d $(POSTGRES_DB) -c "SET session_replication_role = DEFAULT;"
|
||||
@echo "Fixtures loaded!"
|
||||
|
||||
pull-prod-db:
|
||||
@echo "Pulling production database..."
|
||||
./scripts/pull-prod-db.sh
|
||||
|
||||
fixtures-reset:
|
||||
@echo "Resetting database and loading fixtures..."
|
||||
$(DOCKER_COMPOSE) exec -T db psql -U $(POSTGRES_USER) -d $(POSTGRES_DB) -c "DO \$$\$$ DECLARE r RECORD; BEGIN FOR r IN (SELECT tablename FROM pg_tables WHERE schemaname = 'public' AND tablename != 'doctrine_migration_versions') LOOP EXECUTE 'TRUNCATE TABLE ' || quote_ident(r.tablename) || ' CASCADE'; END LOOP; END \$$\$$;"
|
||||
|
||||
Reference in New Issue
Block a user