mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
* Reorganize new schema changes Reorganized new schema changes and make each flyway script update a single table. Each flyway script is executed in a single database transaction so that the script can be rolled back in one shot. It acquires a shared lock on all tables touched by the script. This is deadlock-prone because in a busy database, there may be user queries that attempt to lock the same set of tables, but in different order. By limiting each script to one table, we avoid the problem. We should have some a presubmit check to enforce this rule. All changes have been deployed to Sandbox out-of-band. When doing so, we changed all CREATE INDEX statements to CREATE INDEX IF NOT EXISTS. Future deployments should be able to proceed normally.