X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FBooksInLibrary.pm;h=cd6f375316f90bf0ee17f91c98453b3e63fa6cea;hb=4a233f3019d2baa4bf2abee0c873c74d5cdf3a11;hp=1f5d7ea0879d3a2915ca6d8296e4ddd14bbf99cc;hpb=660cf1be74795a5a5784f413741816413a724c1a;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/BooksInLibrary.pm b/t/lib/DBICTest/Schema/BooksInLibrary.pm index 1f5d7ea..cd6f375 100644 --- a/t/lib/DBICTest/Schema/BooksInLibrary.pm +++ b/t/lib/DBICTest/Schema/BooksInLibrary.pm @@ -1,32 +1,39 @@ -package # hide from PAUSE - DBICTest::Schema::BooksInLibrary; - -use base qw/DBICTest::BaseResult/; - -__PACKAGE__->table('books'); -__PACKAGE__->add_columns( - 'id' => { - data_type => 'integer', - is_auto_increment => 1, - }, - 'source' => { - data_type => 'varchar', - size => '100', - }, - 'owner' => { - data_type => 'integer', - }, - 'title' => { - data_type => 'varchar', - size => '100', - }, - 'price' => { - data_type => 'integer', - is_nullable => 1, - }, -); -__PACKAGE__->set_primary_key('id'); - -__PACKAGE__->resultset_attributes({where => { source => "Library" } }); - -1; +package # hide from PAUSE + DBICTest::Schema::BooksInLibrary; + +use warnings; +use strict; + +use base qw/DBICTest::BaseResult/; + +__PACKAGE__->table('books'); +__PACKAGE__->add_columns( + 'id' => { + data_type => 'integer', + is_auto_increment => 1, + }, + 'source' => { + data_type => 'varchar', + size => '100', + }, + 'owner' => { + data_type => 'integer', + }, + 'title' => { + data_type => 'varchar', + size => '100', + }, + 'price' => { + data_type => 'integer', + is_nullable => 1, + }, +); +__PACKAGE__->set_primary_key('id'); + +__PACKAGE__->add_unique_constraint (['title']); + +__PACKAGE__->resultset_attributes({where => { source => "Library" } }); + +__PACKAGE__->belongs_to ( owner => 'DBICTest::Schema::Owners', 'owner' ); + +1;