ad563610a9e4136fee750523763b6eb082ff3b6f
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Tag.pm
1 package # hide from PAUSE
2     DBICTest::Schema::Tag;
3
4 use base qw/DBICTest::BaseResult/;
5
6 __PACKAGE__->table('tags');
7 __PACKAGE__->add_columns(
8   'tagid' => {
9     data_type => 'integer',
10     is_auto_increment => 1,
11   },
12   'cd' => {
13     data_type => 'integer',
14   },
15   'tag' => {
16     data_type => 'varchar',
17     size      => 100,
18   },
19 );
20 __PACKAGE__->set_primary_key('tagid');
21
22 __PACKAGE__->add_unique_constraints(  # do not remove, part of a test
23   tagid_cd     => [qw/ tagid cd /],
24   tagid_cd_tag => [qw/ tagid cd tag /],
25 );
26 __PACKAGE__->add_unique_constraints(  # do not remove, part of a test
27   [qw/ tagid tag /],
28   [qw/ tagid tag cd /],
29 );
30
31 __PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', 'cd', {
32   proxy => [ 'year', { cd_title => 'title' } ],
33 });
34
35 1;