863263bd30414c46bd1eb854829a9ff8646d2ef9
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Year2000CDs.pm
1 package # hide from PAUSE 
2     DBICTest::Schema::Year2000CDs;
3
4 use base 'DBIx::Class::Core::View';
5
6 __PACKAGE__->view('cd');
7 __PACKAGE__->view_definition("SELECT cdid, artist, title FROM cd WHERE year ='2000'");
8 __PACKAGE__->add_columns(
9   'cdid' => {
10     data_type => 'integer',
11     is_auto_increment => 1,
12   },
13   'artist' => {
14     data_type => 'integer',
15   },
16   'title' => {
17     data_type => 'varchar',
18     size      => 100,
19   },
20
21 );
22 __PACKAGE__->set_primary_key('cdid');
23 __PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
24
25 1;