Skip to content

Commit

Permalink
make it easier to spot schema + fixture errors (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
AronNovak authored Mar 7, 2024
1 parent 13b5567 commit c526aeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/IHP/Makefile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ psql: ## Connects to the running postgresql server
@psql -h $$PWD/build/db -d app

db: Application/Schema.sql Application/Fixtures.sql ## Creates a new database with the current Schema and imports Fixtures.sql
echo "drop schema public cascade; create schema public;" | psql -h $$PWD/build/db -d app
psql -h $$PWD/build/db -d app < "${IHP_LIB}/IHPSchema.sql"
psql -h $$PWD/build/db -d app < Application/Schema.sql
psql -h $$PWD/build/db -d app < Application/Fixtures.sql
(echo "drop schema public cascade; create schema public;" | psql -h $${PWD}/build/db -d app) && \
psql -v ON_ERROR_STOP=1 -h $${PWD}/build/db -d app < "$${IHP_LIB}/IHPSchema.sql" && \
psql -v ON_ERROR_STOP=1 -h $${PWD}/build/db -d app < Application/Schema.sql && \
psql -v ON_ERROR_STOP=1 -h $${PWD}/build/db -d app < Application/Fixtures.sql

dumpdb: dump_db ## Saves the current database state into the Fixtures.sql
dump_db: ## Saves the current database state into the Fixtures.sql
Expand Down

0 comments on commit c526aeb

Please sign in to comment.