[Dbix-class] DBIx-Class-Journal related question

Jess Robinson castaway at desert-island.me.uk
Sun Jul 27 01:04:03 BST 2008



On Sun, 20 Jul 2008, Mario Minati wrote:

> Hello @all,
>
> I'm planning to use DBIx-Class-Journal for tracking and reuseing deleted
> records.
> For reading it's source code i'm wondering if it'll work work with a schema
> that has the column 'id' as primary key in it's tables?
>
> The AuditLog table uses 'ID' itself as primary key and joins the values of
> columns to log in hash style, so it might crash as ID in Auditlog is a
> autoincrement column.
>
> Is this right?

I don't think so.. Unless I misremember, and the code seems to prove me 
right, it's not AuditLog that gets mixed with the columns of your tables, 
but AuditHistory. AuditLog just keeps track of the id of a row, the id of 
the changeset row that created it and the id of the changeset row that 
deleted it.

It does however insist that your PKs are single and integers.

Ideas/patches welcome ;)

Jess




More information about the DBIx-Class mailing list