__PACKAGE__->table('changeset');
__PACKAGE__->add_columns(
- ID => {
+ id => {
data_type => 'integer',
is_auto_increment => 1,
is_primary_key => 1,
set_date => {
data_type => 'timestamp',
is_nullable => 0,
- default_value => 'now()',
},
session_id => {
data_type => 'varchar',
},
);
-__PACKAGE__->set_primary_key('ID');
+sub new {
+ my $self = shift->next::method(@_);
+ $self->set_date(gmtime); # DateTime->now);
+ return $self;
+}
+
+__PACKAGE__->set_primary_key('id');
1;