Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / Year1999CDs.pm
CommitLineData
8273e845 1package # hide from PAUSE
a1e6f9a5 2 DBICTest::Schema::Year1999CDs;
3## Used in 104view.t
4
4a233f30 5use warnings;
6use strict;
7
660cf1be 8use base qw/DBICTest::BaseResult/;
a1e6f9a5 9
10__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
11
12__PACKAGE__->table('year1999cds');
13__PACKAGE__->result_source_instance->is_virtual(1);
14__PACKAGE__->result_source_instance->view_definition(
f549392f 15 "SELECT cdid, artist, title, single_track FROM cd WHERE year ='1999'"
a1e6f9a5 16);
17__PACKAGE__->add_columns(
18 'cdid' => {
19 data_type => 'integer',
20 is_auto_increment => 1,
21 },
22 'artist' => {
23 data_type => 'integer',
24 },
25 'title' => {
26 data_type => 'varchar',
27 size => 100,
28 },
f549392f 29 'single_track' => {
30 data_type => 'integer',
31 is_nullable => 1,
32 is_foreign_key => 1,
33 },
a1e6f9a5 34);
35__PACKAGE__->set_primary_key('cdid');
36__PACKAGE__->add_unique_constraint([ qw/artist title/ ]);
37
59d89269 38__PACKAGE__->belongs_to( artist => 'DBICTest::Schema::Artist' );
18129e81 39__PACKAGE__->has_many( tracks => 'DBICTest::Schema::Track',
40 { "foreign.cd" => "self.cdid" });
59d89269 41
a1e6f9a5 421;