Change ViewDeps schema to use meaningful tables; use the number of views a view depen...
[dbsrgits/DBIx-Class.git] / t / lib / ViewDeps / Result / Artist.pm
1 package    # hide from PAUSE
2     ViewDeps::Result::Artist;
3
4 use strict;
5 use warnings;
6 use base 'DBIx::Class::Core';
7
8 __PACKAGE__->table('artist');
9
10 __PACKAGE__->add_columns(
11     id   => { data_type => 'integer', is_auto_increment => 1 },
12     name => { data_type => 'text' },
13 );
14
15 __PACKAGE__->set_primary_key('id');
16
17 __PACKAGE__->has_many( 'cds', 'ViewDeps::Result::CD',
18     { "foreign.artist" => "self.id" },
19 );
20
21 1;