mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(db): align desired schema bootstrap
Install pgcrypto before repository-owned desired-schema apply paths and retain the exact extension declaration in the desired schema. Distinguish the intermediate Invitation allocation from the final active object-kind catalog. Signed-off-by: Cea Stapleton Cordasco <261786559+cea@users.noreply.github.com>
This commit is contained in:
@@ -97,6 +97,7 @@ psql_h -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
|
||||
export PGSCHEMA_PLAN_HOST=localhost PGSCHEMA_PLAN_PORT=${PG_PORT}
|
||||
export PGSCHEMA_PLAN_DB=buzz PGSCHEMA_PLAN_USER=buzz PGSCHEMA_PLAN_PASSWORD=buzz_dev
|
||||
export PGHOST=localhost PGPORT=${PG_PORT} PGUSER=buzz PGDATABASE=buzz
|
||||
psql_h -c 'CREATE EXTENSION IF NOT EXISTS pgcrypto;'
|
||||
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
||||
psql_h < scripts/attach-schema-partitions.sql
|
||||
ok "Schema applied"
|
||||
|
||||
@@ -103,6 +103,9 @@ export PGSCHEMA_PLAN_DB=buzz
|
||||
export PGSCHEMA_PLAN_USER=buzz
|
||||
export PGSCHEMA_PLAN_PASSWORD=buzz_dev
|
||||
|
||||
docker exec -e PGPASSWORD="${PGPASSWORD}" buzz-postgres \
|
||||
psql -U "${PGUSER}" -d "${PGDATABASE}" -v ON_ERROR_STOP=1 \
|
||||
-c 'CREATE EXTENSION IF NOT EXISTS pgcrypto;'
|
||||
./bin/pgschema apply --file schema/schema.sql --auto-approve
|
||||
docker exec -i -e PGPASSWORD="${PGPASSWORD}" buzz-postgres \
|
||||
psql -U "${PGUSER}" -d "${PGDATABASE}" -v ON_ERROR_STOP=1 < scripts/attach-schema-partitions.sql
|
||||
|
||||
Reference in New Issue
Block a user