>
> If you're doing that, can you bear in mind that it'd rock if we could
> extend
> that later to add change auditing please? :)
>
> (I was going to implement that but the project I needed it for got
> cancelled
> so it's gone onto the back-burner for the mo)
>
What would auditing consist of? For instance, I wrote a simple Perl script
to generate triggers for Oracle tables that would record all changes against
the base table in an audit table with the following definition
lkau_id -- the audit table key
username -- the user who has made the change
table_name -- the name of the table being altered
tbl_key -- the primary key value. Composite key values are
separated by the delimiter defined in the
KEY_DELIMITER constant
column_name, -- the name of the column that is changing
before_value, -- the value before the change. New rows have no
old values
after_value, -- the value after the change. Deleted rows have no
-- after value
updated -- when the change was made
Are you wanting something similar as a DBIC component? I guess there would
be a performance hit - each update would need to select the old values
again, but I guess that anyone who wants audit would realise that there is
an overhead anyway.
I'm not sure how username would be deduced, or even explicitly set.
Dan
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/