X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FMySchema%2FFooCompat.pm;fp=t%2Flib%2FMySchema%2FFooCompat.pm;h=a64494c937a0ded65f40f43db68ac5feec750440;hb=29f37a29ee0497500d375de134ae39798f75ead8;hp=0000000000000000000000000000000000000000;hpb=db91b5ca92522a774326c5cf85997354bbe088a9;p=dbsrgits%2FDBIx-Class-DateTime-Epoch.git diff --git a/t/lib/MySchema/FooCompat.pm b/t/lib/MySchema/FooCompat.pm new file mode 100644 index 0000000..a64494c --- /dev/null +++ b/t/lib/MySchema/FooCompat.pm @@ -0,0 +1,43 @@ +package MySchema::FooCompat; + +use strict; +use warnings; + +use base qw( DBIx::Class ); + +__PACKAGE__->load_components( qw( DateTime::Epoch Core ) ); +__PACKAGE__->table( 'foo_compat' ); +__PACKAGE__->add_columns( + id => { + data_type => 'bigint', + is_auto_increment => 1, + is_nullable => 0, + }, + name => { + data_type => 'varchar', + size => 10, + is_nullable => 1, + }, + bar => { # epoch stored as an int + data_type => 'bigint', + epoch => 1, + }, + baz => { # epoch stored as a string + data_type => 'varchar', + size => 50, + epoch => 1, + }, + # working in conjunction with DBIx::Class::TimeStamp + creation_time => { + data_type => 'bigint', + epoch => 'ctime', + }, + modification_time => { + data_type => 'bigint', + epoch => 'mtime', + } +); + +__PACKAGE__->set_primary_key( 'id' ); + +1;