Get schema changes No Schema changed? Yes Build If the schema has been changed, Create the branch the code must support change-schema- the current and new schema. Test Create the pending.sql file with schema changes Deploy Commit Push Create a merge request No pending.sql exists? Yes Export the schema used in the production database Create the next_prod database Apply the exported schema to next_prod Apply pending.sql to next_prod Get diff between next_prod and desired schema diff is empty? No Yes Build Test using the current schema Test using a new schema Build Test using the current schema Test using a new schema Deploy with the current schema. Now the code works Apply pending.sql with a new schema. Remove pending.sql Commit Push Remove support for the old schema