~zeitgeist/zeitgeist/cleanup

Viewing all changes in revision 1480.

  • Committer: Mikkel Kamstrup Erlandsen
  • Date: 2010-05-27 20:29:12 UTC
  • mfrom: (1461.1.12 schema_versions)
  • Revision ID: kamstrup@hardback-20100527202912-f1yc2v1wuzrfhdh8
Merge lp:~kamstrup/zeitgeist/schema_versions

Versioning of the core DB schema (and also adds the possibility to version other schema if we ever have that).

On startup we check if the schema version for the 'core' schema is what we expect and if that is case we assume the schema is good and no further setup is needed.

If the schema version is not what we want we look for a module called _zeitgeist.engine.upgrades.core_$oldversion_$newversion and execute its run() method if it's there.
In our case we are talking upgrading from core schema 0 to 1, so that would be _zeitgeist.engine.upgrades.core_0_1.py.

Note that I did it this way in order to minimize the number of .py files we need to stat and/or parse at startup. If no upgrades are necessary, none of the upgrade .py files are parsed let alone read from disk.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: