canmove, Confirmed users
6,441
edits
Line 399: | Line 399: | ||
==== Schema Upgrades ==== | ==== Schema Upgrades ==== | ||
If you need to do a schema change you '''must''' ensure that either the current production code can run with your schema change applied, or that your new code can run with the old schema. Code and schema changes '''cannot''' be done at the same instant, so you must be able to support one of these scenarios. Generally, additive changes (column or table additions) should do the schema change first, while destructive changes (column or table deletions) should do the schema change second. You can simulate the upgrade with your local Docker containers to verify which is right for you. | |||
When you file the deployment bug (see below), include a note about the schema change in it. Something like: | |||
This push requires a schema change that needs to be done _prior_ to the new code going out. Thas can be performed by running the Docker image with the "upgrade-db" command, with DBURI set. | |||
{{bug|1295678}} is an example of a push with a schema change. | |||
=== Testing === | === Testing === |