« blib/lib/DBIO/Test/Schema/Serialized.pm
↑ Summary
blib/lib/DBIO/Test/Schema/TimestampPrimaryKey.pm »
| 1 | package DBIO::Test::Schema::Tag; | ||
| 2 | # ABSTRACT: Test result class for the tags table | ||
| 3 | |||
| 4 | 256 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 256 | our $VERSION = '0.900007'; | |
| 7 | |||
| 8 | 256 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 256 | ▶ | use base qw/DBIO::Test::BaseResult/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 256 | __PACKAGE__->table('tags'); | |
| 13 | 256 | __PACKAGE__->add_columns( | |
| 14 | 'tagid' => { | ||
| 15 | data_type => 'integer', | ||
| 16 | is_auto_increment => 1, | ||
| 17 | }, | ||
| 18 | 'cd' => { | ||
| 19 | data_type => 'integer', | ||
| 20 | }, | ||
| 21 | 'tag' => { | ||
| 22 | data_type => 'varchar', | ||
| 23 | size => 100, | ||
| 24 | }, | ||
| 25 | ); | ||
| 26 | 256 | __PACKAGE__->set_primary_key('tagid'); | |
| 27 | |||
| 28 | 256 | __PACKAGE__->add_unique_constraints( # do not remove, part of a test | |
| 29 | tagid_cd => [qw/ tagid cd /], | ||
| 30 | tagid_cd_tag => [qw/ tagid cd tag /], | ||
| 31 | ); | ||
| 32 | 256 | __PACKAGE__->add_unique_constraints( # do not remove, part of a test | |
| 33 | [qw/ tagid tag /], | ||
| 34 | [qw/ tagid tag cd /], | ||
| 35 | ); | ||
| 36 | |||
| 37 | 256 | __PACKAGE__->belongs_to( cd => 'DBIO::Test::Schema::CD', 'cd', { | |
| 38 | proxy => [ 'year', { cd_title => 'title' } ], | ||
| 39 | }); | ||
| 40 | |||
| 41 | 256 | 1; | |
| 42 | |||
| 43 | __END__ | ||