Documentation improvements cherry-picked from latest
[dbsrgits/DBIx-Class.git] / examples / Schema / MyApp / Schema / Result / Track.pm
CommitLineData
a5bd5d88 1package MyApp::Schema::Result::Track;
d88ecca6 2
3use warnings;
4use strict;
5
20bfea3f 6use base qw( DBIx::Class::Core );
d88ecca6 7
0c337847 8__PACKAGE__->table('track');
d88ecca6 9
20bfea3f 10__PACKAGE__->add_columns(
11 trackid => {
12 data_type => 'integer',
13 is_auto_increment => 1
14 },
60fbfe7d 15 cdid => {
20bfea3f 16 data_type => 'integer',
17 },
18 title => {
19 data_type => 'text',
20 },
21);
d88ecca6 22
0c337847 23__PACKAGE__->set_primary_key('trackid');
d88ecca6 24
60fbfe7d 25__PACKAGE__->add_unique_constraint([qw( title cdid )]);
20bfea3f 26
60fbfe7d 27__PACKAGE__->belongs_to('cd' => 'MyApp::Schema::Result::Cd', 'cdid');
0c337847 28
291;