Merge lp:~mars/launchpad/check-db-revision-target into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Aaron Bentley |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~mars/launchpad/check-db-revision-target |
Merge into: | lp:launchpad |
Diff against target: |
76 lines (+30/-5) 2 files modified
Makefile (+8/-5) utilities/check-db-revision.py (+22/-0) |
To merge this branch: | bzr merge lp:~mars/launchpad/check-db-revision-target |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+23255@code.launchpad.net |
Commit message
This branch adds a check to 'make run' that will abort server startup at the soonest possible point if the currently installed database schema does not match what your branch requires.
Description of the change
Hi,
This branch adds a new script and Makefile target for checking the current branch's required database schema. The Makefile target is a dependency of the 'make run' and 'make start' families. If the currently installed schema version does not match, then the script will exit with an error.
The idea is to save a few minutes of everyone's life by having the 'make run' process exit as soon as possible, rather than waiting for the app server to start and *then* watching it fail because a schema mismatch was not detected sooner.
This change was discussed with the LOSAs. They do not see a problem with me changing the 'run' and 'start' targets in this way, as they do not use them.
I manually tested the change by running 'make schema' in db-stable. It works. 'make check_schema' fails on the schema mismatch, as does 'make run'.
Maris