So You Want To Change Your Schema¶
This is a very brief overview of how to write upgrade tests for Axiom. I hope someone else will clean it up and add more information. This assumes familiarity with Axiom, Divmod project layout, trial unit tests, Combinator, and probably a dozen other things.
In order to understand the following you will need to look at these two modules:
write a file,
stub_foo1to2.py(this should look vaguely like the aforementioned
stub_catalog1to2.py) in your project’s
tests/historicdirectory, named appropriately for your object and versions. This is written using the old API, the one present in trunk before your branch is merged.
the number in the call to saveStub is the revision of
$COMBINATOR_PROJECTS/Divmod/trunkwhen you are writing the upgrader.
% cd $COMBINATOR_PROJECTS/Divmod/branches/foo-19191919/Foo/foo/test/historic/ % chbranch Divmod trunk % python stub_foo1to2.py # this will create a file called 'foo1to2.axiom.tbz2'. % svn add foo1to2.axiom.tbz2
test_foo1to2.py(this should look vaguely like the aforementioned
test_catalog1to2.py), and it works like a regular trial test, except for loading your stub database automatically.