LibreCat / Catmandu-DBI

A Catmandu::Store plugin for DBI based interfaces
Other
0 stars 1 forks source link

Optionally add versioning #1

Closed nichtich closed 10 years ago

nichtich commented 10 years ago

One should optionally enable a second table with revisions:

create table if not exists {$name}_revisions (
    rev_id varchar(255) not null,   # foreign key to $name.id
    rev_data longblob,              # null if deleted but recreated in $name
    rev_timestamp timestamp not null
)

Before modification or deletion, a record is first copied to the revisions table, so the current version is not included in this optional table. The combination of rev_id and rev_timestamp should be unique

When other stores provide versioning too, one could abstract related actions, such as revert and (get/list)revisions for easy access.

nics commented 10 years ago

Catmandu::Plugin::Versioning does this (but lacks any documentation at the moment)

nichtich commented 10 years ago

Great! To improve documentation, we should do a kind of Book sprint

phochste commented 10 years ago

To have a very short sprint I’ve added a blog post on Nicolas Steenlant’s Catmandu::Plugin::Versioning at:

http://librecat.org/catmandu/2013/12/18/versioning-using-catmandu-plugin.html

From: Jakob Voss notifications@github.com<mailto:notifications@github.com> Reply-To: LibreCat/Catmandu-Store-DBI reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday 17 December 2013 14:45 To: LibreCat/Catmandu-Store-DBI Catmandu-Store-DBI@noreply.github.com<mailto:Catmandu-Store-DBI@noreply.github.com> Subject: Re: [Catmandu-Store-DBI] Optionally add versioning (#1)

Great! To improve documentation, we should do a kind of Book sprint

— Reply to this email directly or view it on GitHubhttps://github.com/LibreCat/Catmandu-Store-DBI/issues/1#issuecomment-30751412.