diff --git a/db/src/main/resources/sql/flyway/V165__add_domain_repo_id_indexes_to_more_tables.sql b/db/src/main/resources/sql/flyway/V165__add_domain_repo_id_indexes_to_more_tables.sql index b9751d234..410b1584b 100644 --- a/db/src/main/resources/sql/flyway/V165__add_domain_repo_id_indexes_to_more_tables.sql +++ b/db/src/main/resources/sql/flyway/V165__add_domain_repo_id_indexes_to_more_tables.sql @@ -12,5 +12,5 @@ -- See the License for the specific language governing permissions and -- limitations under the License. -CREATE INDEX CONCURRENTLY IDX69qun5kxt3eux5igrxrqcycv0 ON "DomainHistoryHost" (domain_history_domain_repo_id); -CREATE INDEX CONCURRENTLY IDXf2q9dqj899h1q8lah5y719nxd ON "PollMessage" (domain_repo_id); +CREATE INDEX CONCURRENTLY IF NOT EXISTS IDX69qun5kxt3eux5igrxrqcycv0 ON "DomainHistoryHost" (domain_history_domain_repo_id); +CREATE INDEX CONCURRENTLY IF NOT EXISTS IDXf2q9dqj899h1q8lah5y719nxd ON "PollMessage" (domain_repo_id); diff --git a/release/schema-deployer/deploy_sql_schema.sh b/release/schema-deployer/deploy_sql_schema.sh index 898acea2d..5083c10d1 100755 --- a/release/schema-deployer/deploy_sql_schema.sh +++ b/release/schema-deployer/deploy_sql_schema.sh @@ -78,6 +78,9 @@ if ! pgrep cloud_sql_proxy; then exit 1 fi +# Set the transactional lock to false, session-level lock will be used instead +/flyway/flyway -postgresql.transactional.lock=false info + /flyway/flyway -community -user=${db_user} -password=${db_password} \ -url=jdbc:postgresql://localhost:5432/postgres \ -locations=classpath:sql/flyway \