X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTrack.pm;h=496680035532f40105187337b8901f84ec895ed8;hb=6c99a3eea0da8f254e67fdda21e27f9ef9fbeec3;hp=64eb0eea881bbd913d9c46d2edadcaf848fe92f1;hpb=43556c5d5b8734dff2ba5cd4897bd69c4e82bd52;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index 64eb0ee..4966800 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -1,8 +1,8 @@ package # hide from PAUSE DBICTest::Schema::Track; -use base 'DBIx::Class::Core'; -__PACKAGE__->load_components(qw/InflateColumn::DateTime/); +use base qw/DBICTest::BaseResult/; +__PACKAGE__->load_components(qw/InflateColumn::DateTime Ordered/); __PACKAGE__->table('track'); __PACKAGE__->add_columns( @@ -26,13 +26,24 @@ __PACKAGE__->add_columns( accessor => 'updated_date', is_nullable => 1 }, + last_updated_at => { + data_type => 'datetime', + is_nullable => 1 + }, ); __PACKAGE__->set_primary_key('trackid'); __PACKAGE__->add_unique_constraint([ qw/cd position/ ]); __PACKAGE__->add_unique_constraint([ qw/cd title/ ]); +__PACKAGE__->position_column ('position'); +__PACKAGE__->grouping_column ('cd'); + + __PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD' ); __PACKAGE__->belongs_to( disc => 'DBICTest::Schema::CD' => 'cd'); +__PACKAGE__->might_have( cd_single => 'DBICTest::Schema::CD', 'single_track' ); +__PACKAGE__->might_have( lyrics => 'DBICTest::Schema::Lyrics', 'track_id' ); + 1;