Investigate using Sqitch for database change management
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
Opening this bug to discuss replacing our current home-built database change management process with a 3rd-party application called Sqitch (http://
The main benefits I see are these:
1. No more upgrade file numbering. Upgrades are dependency based.
2. No duplicating SQL in upgrade scripts and baseline schema files. Every change is a deployment (upgrade) script.
3. Encourages the creation of revert and verify scripts. Revert scripts are particularly useful for collaborative development.
4. Well documented and (I think) relatively easy for newcomers to understand.
Concerns:
1. It's fairly new. There are packages for Debian Jessie and Ubuntu Wily. Others install via CPAN.
2. It's a new dependency for packagers and potentially all EG users, depending on whether we replace upgrade scripts entirely.
Postgres Tutorial:
https:/
I have not been using a lot of the features (rework, bundle, rebase, etc.), because I have not needed them. My plan is to create a wiki page documenting how I've been using it.
I also have a master-tracking branch that ports all of our SQL into Sqitch as a proof of concept. I'll document this as well.
Changed in evergreen: | |
milestone: | 2.next → none |
Changed in evergreen: | |
status: | New → Won't Fix |
Proof of concept / migration branch, squashed and rebased to master as of today:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1521693- sqitch
It's not yet integrated into the standard build process. After installing Sqitch, to build a new DB, do this:
$ cd Open-ILS/ src/sql/ schema/
$ sqitch deploy
To install the optional concerto data set:
$ cd ../test-data # Open-ILS/ src/sql/ test-data
$ sqitch deploy
The plan is to track master and migrate each new SQL upgrade script into the Sqitch instance in this branch. (That will, of course, not be in real time).