Commit | Line | Data |
4f6386b0 |
1 | package # hide from PAUSE |
2 | DBICTest::Schema::LyricVersion; |
3 | |
4a233f30 |
4 | use warnings; |
5 | use strict; |
6 | |
660cf1be |
7 | use base qw/DBICTest::BaseResult/; |
4f6386b0 |
8 | |
9 | __PACKAGE__->table('lyric_versions'); |
10 | __PACKAGE__->add_columns( |
11 | 'id' => { |
12 | data_type => 'integer', |
13 | is_auto_increment => 1, |
14 | }, |
15 | 'lyric_id' => { |
16 | data_type => 'integer', |
17 | is_foreign_key => 1, |
18 | }, |
19 | 'text' => { |
20 | data_type => 'varchar', |
21 | size => 100, |
22 | }, |
23 | ); |
24 | __PACKAGE__->set_primary_key('id'); |
3904d3c3 |
25 | __PACKAGE__->add_unique_constraint ([qw/lyric_id text/]); |
4f6386b0 |
26 | __PACKAGE__->belongs_to('lyric', 'DBICTest::Schema::Lyrics', 'lyric_id'); |
27 | |
28 | 1; |