[hw-8] attempt to fix tests

This commit is contained in:
3ybacTuK
2025-07-28 22:11:42 +03:00
parent 6e0d90a6d5
commit 61757d1a52
8 changed files with 676 additions and 66 deletions

View File

@@ -27,10 +27,12 @@ db-create-migration:
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) create -s $(n) sql
db-migrate:
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "$(LOCAL_DB_DSN)" up
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "postgresql://$(PROD_USER)-1:$(PROD_PASS)-1@192.168.64.5:5438/comments_db?sslmode=disable" up
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "postgresql://$(PROD_USER)-2:$(PROD_PASS)-2@192.168.64.5:5439/comments_db?sslmode=disable" up
db-migrate-down:
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "$(LOCAL_DB_DSN)" down
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "postgresql://$(PROD_USER)-1:$(PROD_PASS)-1@192.168.64.5:5438/comments_db?sslmode=disable" down
$(BINDIR)/goose -dir $(MIGRATIONS_FOLDER) postgres "postgresql://$(PROD_USER)-2:$(PROD_PASS)-2@192.168.64.5:5439/comments_db?sslmode=disable" down
db-reset-local:
psql -c "drop database if exists \"$(LOCAL_DB_NAME)\""