diff --git a/lib/IHP/Makefile.dist b/lib/IHP/Makefile.dist index 6a3ca2890..ec3bd6f14 100644 --- a/lib/IHP/Makefile.dist +++ b/lib/IHP/Makefile.dist @@ -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