Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
This directory contains the update scripts that bring external sites up
to the current revision level of the database. Each numbered script
corresponds to a revision of sql/database-create.sql. In the past, these
numbers were the actual CVS revision numbers; revision 4.185 of
database-create.sql corresponds to script 4/185. This makes it very easy
to track the changes in the revision history, and it serves as a
revision level that is presented on the web page.

With the switch to GIT, this is no longer possible, since a revision
number in git is an SHA1 hash, and that hash is not known until the file
is actually committed.

The new approach will be to continue creating the scripts as before;
simply create a new numbered file in the appropriate subdirectory.  Once
the script is committed along with the changes to database-create.sql,
the *commit* will be tagged with the name of the update script. In

    boss> git commit -a -m "Important changes to the schema"
    boss> git log -n 1 database-create.sql

which will give you the hash of your latest commit. Then, tag the commit:

    boss> git tag v4.185 <hash>
Leigh B. Stoller's avatar
Leigh B. Stoller committed
25 26 27 28

Now you can push your commit along with the tag(s) to the remote repo:

    boss> git push --tags origin master
29 30 31 32 33 34 35

NOTE: if you have to fix an update script for any reason, you will need to
update and re-push the relevant tag to point to the new commit with the fixed
version of the script.  That can be done as follows:

    boss> git tag -f v4.185 <new hash>
    boss> git push origin tags/v4.185