File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,8 +211,12 @@ jobs:
211211 catalog_present=$(docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -At -c "select to_regclass('supabase_migrations.schema_migrations');" || true)
212212
213213 if [ -z "${catalog_present}" ] || [ "${catalog_present}" = "" ] || [ "${catalog_present}" = "NULL" ]; then
214- echo "supabase_migrations.schema_migrations missing; running supabase db reset"
215- FORCE_COLOR=1 npx dotenv-cli -e test/containers/.env -- bash -c 'npx supabase db reset --local --workdir suprabase --yes --debug'
214+ echo "supabase_migrations.schema_migrations missing; creating manually"
215+ docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -v ON_ERROR_STOP=1 -c "CREATE SCHEMA IF NOT EXISTS supabase_migrations;"
216+ docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -v ON_ERROR_STOP=1 -c "CREATE TABLE IF NOT EXISTS supabase_migrations.schema_migrations (version text PRIMARY KEY, inserted_at timestamptz DEFAULT now());"
217+ echo "Catalog created; verifying contents"
218+ docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -c "\\d supabase_migrations.schema_migrations"
219+ docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -c "table supabase_migrations.schema_migrations"
216220 else
217221 echo "Catalog present: ${catalog_present}"
218222 fi
You can’t perform that action at this time.
0 commit comments