Mercurial > libervia-backend
annotate .hgtags @ 853:c2f6ada7858f
core (sqlite): automatic database update:
- new Updater class check database consistency (by calculating a hash on the .schema), and updates base if necessary
- database now has a version (1 for current, 0 will be for 0.3's database), for each change this version will be increased
- creation statements and update statements are in the form of dict of dict with tuples. There is a help text at the top of the module to explain how it works
- if we are on a development version, the updater try to update the database automaticaly (without deleting table or columns). The Updater.generateUpdateData method can be used to ease the creation of update data (i.e. the dictionary at the top, see the one for the key 1 for an example).
- if there is an inconsistency, an exception is raised, and a message indicate the SQL statements that should fix the situation.
- well... this is rather complicated, a KISS method would maybe have been better. The future will say if we need to simplify it :-/
- new DatabaseError exception
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 Feb 2014 23:30:32 +0100 |
parents | 1524c2c07256 |
children | 79ef977cda36 |
rev | line source |
---|---|
59
3e5abe3bbead
Added tag SàT v0.0.2 for changeset d660d1e5cee4
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 d660d1e5cee410bf9ac15b89ceb93543bcff0a6f SàT v0.0.2 |
209
bab65733980a
Added tag SàT v0.0.3 for changeset b95550704b4f
Goffi <goffi@goffi.org>
parents:
207
diff
changeset
|
2 b95550704b4f965c9dca5f6681186bf8a9b64074 SàT v0.0.3 |
243
117d6d26807b
Added tag SàT v0.1.0 for changeset b778622b8733
Goffi <goffi@goffi.org>
parents:
242
diff
changeset
|
3 b778622b87337785252d47d2b3c4fe3085a37ab4 SàT v0.1.0 |
248
624e3ed4782d
Added tag SàT v0.1.1 for changeset 53aa958a2d3d
Goffi <goffi@goffi.org>
parents:
247
diff
changeset
|
4 53aa958a2d3d6451ae75610e3c6fb947d3d6f21b SàT v0.1.1 |
354
4b7af05566eb
Added tag SàT v0.2.0 for changeset cc2afb92ab93
Goffi <goffi@goffi.org>
parents:
352
diff
changeset
|
5 cc2afb92ab93a4c6399ca9b6cdc5224878a57a24 SàT v0.2.0 |
584
1524c2c07256
Added tag SàT v0.3.0 for changeset df6b9b881f0e
Goffi <goffi@goffi.org>
parents:
583
diff
changeset
|
6 df6b9b881f0e9f335483c986b00fd58f2ed6164a SàT v0.3.0 |