python - how to control version of data object (instance) in sqlalchemy? -
python - how to control version of data object (instance) in sqlalchemy? -
how 1 set model in sqlalchemy have versioncontrol in instance(column_version)?
unique pk on table.
unique version on pk.
archive-flag (latest version not archived).
e.g.
init= object: -------------- *version;update;user;id;archive;rest* 1;2012-01-01;usera; uniquekey;no;data=green on_update= object -------------- *version;update;user;id;archive;rest* 1;2012-01-01;usera; uniquekey;**yes**;data=green **2**;2012-01-05;userb; uniquekey;no;data=red
has thought on how accomplish that? or experience?
i thinking 2 db's right (archive, active) archive holds "old"versions (pk = uniquekey+ version) while active (pk = uniquekey).
(for inquire why should so?
im thinking difference between consistence &coherence mapping--> 1 either map specific version object1 version7 or actual version object1).
python sqlalchemy version
Comments
Post a Comment