X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FBooksInLibrary.pm;h=cd6f375316f90bf0ee17f91c98453b3e63fa6cea;hb=c356fcb1919c92e9f9b1dfe9fcc4c4cd33dc5ad6;hp=8da54e623caed6753ca924c3ab60fcf04c2aab32;hpb=13a2f0311c4d16131b69bea50edb3805958a62a9;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/BooksInLibrary.pm b/t/lib/DBICTest/Schema/BooksInLibrary.pm index 8da54e6..cd6f375 100644 --- a/t/lib/DBICTest/Schema/BooksInLibrary.pm +++ b/t/lib/DBICTest/Schema/BooksInLibrary.pm @@ -1,6 +1,9 @@ -package # hide from PAUSE +package # hide from PAUSE DBICTest::Schema::BooksInLibrary; +use warnings; +use strict; + use base qw/DBICTest::BaseResult/; __PACKAGE__->table('books'); @@ -27,6 +30,8 @@ __PACKAGE__->add_columns( ); __PACKAGE__->set_primary_key('id'); +__PACKAGE__->add_unique_constraint (['title']); + __PACKAGE__->resultset_attributes({where => { source => "Library" } }); __PACKAGE__->belongs_to ( owner => 'DBICTest::Schema::Owners', 'owner' );