Log DB file should be versioned
Bug #566898 reported by
Mikkel Kamstrup Erlandsen
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zeitgeist Framework |
Fix Released
|
High
|
Mikkel Kamstrup Erlandsen |
Bug Description
We should really store log DB schema version in the our sqlite. That way we can do smooth upgrades without hacks. Not only that, but we can also shave off a lot of SQL grinding at startup if we just check the db schema version...
I am thinking a new table:
CREATE TABLE IF NOT EXISTS version_info (schema_name VARCHAR, version INT)
This table will have one row for our initial use case, but we may add more rows in the future. The schema_name of our core log db could be "main_log" and on startup we'd do:
SELECT version FROM version WHERE name='main_log';
if version != expected_version : do stuff
else : no need to run all our initial sql
Related branches
lp:~kamstrup/zeitgeist/schema_versions
Merged
into
lp:zeitgeist/0.1
- Siegfried Gevatter: Approve (diff review)
-
Diff: 280 lines (+231/-1)3 files modified_zeitgeist/engine/__init__.py (+4/-0)
_zeitgeist/engine/sql.py (+84/-1)
_zeitgeist/engine/upgrades/core_0_1.py (+143/-0)
Changed in zeitgeist: | |
milestone: | none → 0.3.4 |
Changed in zeitgeist: | |
assignee: | nobody → Mikkel Kamstrup Erlandsen (kamstrup) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in zeitgeist: | |
status: | In Progress → Fix Committed |
Changed in zeitgeist: | |
status: | Fix Committed → Fix Released |
Changed in zeitgeist: | |
milestone: | 0.3.4 → 0.4.0 |
To post a comment you must log in.
how is progress on this issue...
is there a branch for it?