-package # hide from PAUSE \r
- DBICTest::Schema::Owners;\r
-\r
-use base qw/DBICTest::BaseResult/;\r
-\r
-__PACKAGE__->table('owners');\r
-__PACKAGE__->add_columns(\r
- 'ownerid' => {\r
- data_type => 'integer',\r
- is_auto_increment => 1,\r
- },\r
- 'name' => {\r
- data_type => 'varchar',\r
- size => '100',\r
- },\r
-);\r
-__PACKAGE__->set_primary_key('ownerid');\r
-\r
-__PACKAGE__->has_many(books => "DBICTest::Schema::BooksInLibrary", "owner");\r
-\r
-1;\r
+package # hide from PAUSE
+ DBICTest::Schema::Owners;
+
+use base qw/DBICTest::BaseResult/;
+
+__PACKAGE__->table('owners');
+__PACKAGE__->add_columns(
+ 'id' => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ 'name' => {
+ data_type => 'varchar',
+ size => '100',
+ },
+);
+__PACKAGE__->set_primary_key('id');
+
+__PACKAGE__->add_unique_constraint(['name']);
+
+__PACKAGE__->has_many(books => "DBICTest::Schema::BooksInLibrary", "owner");
+
+1;