[Bast-commits] r4674 -
trunk/DBIx-Class-Journal/lib/DBIx/Class/Schema/Journal/DB
nothingmuch at dev.catalyst.perl.org
nothingmuch at dev.catalyst.perl.org
Wed Jul 30 04:49:12 BST 2008
Author: nothingmuch
Date: 2008-07-30 04:49:12 +0100 (Wed, 30 Jul 2008)
New Revision: 4674
Modified:
trunk/DBIx-Class-Journal/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm
Log:
now() is not protable, timestamp in perl space
Modified: trunk/DBIx-Class-Journal/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm
===================================================================
--- trunk/DBIx-Class-Journal/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2008-07-30 03:47:27 UTC (rev 4673)
+++ trunk/DBIx-Class-Journal/lib/DBIx/Class/Schema/Journal/DB/ChangeSet.pm 2008-07-30 03:49:12 UTC (rev 4674)
@@ -6,7 +6,7 @@
__PACKAGE__->table('changeset');
__PACKAGE__->add_columns(
- ID => {
+ id => {
data_type => 'integer',
is_auto_increment => 1,
is_primary_key => 1,
@@ -20,7 +20,6 @@
set_date => {
data_type => 'timestamp',
is_nullable => 0,
- default_value => 'now()',
},
session_id => {
data_type => 'varchar',
@@ -29,6 +28,12 @@
},
);
-__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;
More information about the Bast-commits
mailing list