Skip to content

Instantly share code, notes, and snippets.

@lestrrat
Created May 29, 2009 06:12
Show Gist options
  • Save lestrrat/119809 to your computer and use it in GitHub Desktop.
Save lestrrat/119809 to your computer and use it in GitHub Desktop.
--- a/lib/MojoMojo/Schema/Result/Content.pm
+++ b/lib/MojoMojo/Schema/Result/Content.pm
@@ -12,7 +12,7 @@ use Algorithm::Merge qw/merge/;
use String::Diff;
use HTML::Entities qw/encode_entities_numeric/;
-__PACKAGE__->load_components(qw/DateTime::Epoch UTF8Columns PK::Auto Core/);
+__PACKAGE__->load_components(qw/DateTime::Epoch TimeStamp UTF8Columns PK::Auto Core/);
__PACKAGE__->table("content");
__PACKAGE__->add_columns(
"page",
@@ -22,7 +22,7 @@ __PACKAGE__->add_columns(
"creator",
{ data_type => "INTEGER", is_nullable => 0, size => undef },
"created",
- { data_type => "BIGINT", is_nullable => 0, size => 100, epoch => 'ctime' },
+ { data_type => "BIGINT", is_nullable => 0, size => 100, set_on_create => 1, inflate_datetime => "epoch" },
"status",
{ data_type => "VARCHAR", is_nullable => 0, size => 20 },
"release_date",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment