4395923c874e85516f0cfac615b12f31ed43cd54
[dbsrgits/DBIx-Class.git] / t / lib / ViewDeps / Result / AbaNameArtistsAnd2010CDsWithManyTracks.pm
1 package    # hide from PAUSE
2     ViewDeps::Result::AbaNameArtistsAnd2010CDsWithManyTracks;
3
4 use strict;
5 use warnings;
6 use base 'DBIx::Class::Core';
7
8 __PACKAGE__->table_class('DBIx::Class::ResultSource::View');
9 __PACKAGE__->table('aba_name_artists_and_2010_cds_with_many_tracks');
10 __PACKAGE__->result_source_instance->view_definition(
11     "SELECT aba.id,aba.name,cd.title,cd.year,cd.number_tracks FROM aba_name_artists aba JOIN year_2010_cds_with_many_tracks cd on (aba.id = cd.artist)"
12 );
13 __PACKAGE__->result_source_instance->deploy_depends_on(
14     ["AbNameArtists","Year2010CDsWithManyTracks"] );
15
16 __PACKAGE__->add_columns(
17     id            => { data_type => 'integer', is_auto_increment => 1 },
18     name          => { data_type => 'text' },
19     title         => { data_type => 'text' },
20     year          => { data_type => 'integer' },
21     number_tracks => { data_type => 'integer' },
22 );
23
24 __PACKAGE__->set_primary_key('id');
25
26 1;