Skip to content

Commit

Permalink
Create extensions if not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
floptical committed Jan 8, 2024
1 parent 1627dc0 commit be19a09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ais/engine/bin/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ restore_db_to_staging() {
#psql -U ais_engine -h $staging_db_uri -d ais_engine -c "GRANT ALL ON SCHEMA public TO public;"
# Extensions must be re-installed and can only be done as superuser
export PGPASSWORD=$PG_ENGINE_DB_PASS
psql -U postgres -h $staging_db_uri -d ais_engine -c "CREATE EXTENSION postgis;"
psql -U postgres -h $staging_db_uri -d ais_engine -c "CREATE EXTENSION pg_trgm;"
psql -U postgres -h $staging_db_uri -d ais_engine -c "CREATE EXTENSION if not exists postgis;"
psql -U postgres -h $staging_db_uri -d ais_engine -c "CREATE EXTENSION if not exists pg_trgm;"
export PGPASSWORD=$ENGINE_DB_PASS
echo "Beginning restore with file $DB_DUMP_FILE_LOC.."
# Ignore failures, many of them are trying to drop non-existent tables (which our schema drop earlier handles)
Expand Down

0 comments on commit be19a09

Please sign in to comment.