-package DBICTest::CD;
+package DBICTest::Schema::CD;
use base 'DBIx::Class::Core';
-DBICTest::CD->table('cd');
-DBICTest::CD->add_columns(qw/cdid artist title year/);
-DBICTest::CD->set_primary_key('cdid');
-DBICTest::CD->add_relationship(
- artist => 'DBICTest::Artist',
- { 'foreign.artistid' => 'self.artist' }
+DBICTest::Schema::CD->table('cd');
+DBICTest::Schema::CD->add_columns(
+ 'cdid' => {
+ data_type => 'integer',
+ is_auto_increment => 1,
+ },
+ 'artist' => {
+ data_type => 'integer',
+ },
+ 'title' => {
+ data_type => 'varchar',
+ },
+ 'year' => {
+ data_type => 'varchar',
+ },
);
-DBICTest::CD->add_relationship(
- tracks => 'DBICTest::Track',
- { 'foreign.cd' => 'self.cdid' }
-);
-DBICTest::CD->add_relationship(
- tags => 'DBICTest::Tag',
- { 'foreign.cd' => 'self.cdid' }
-);
-#DBICTest::CD->might_have(liner_notes => 'DBICTest::LinerNotes' => qw/notes/);
+DBICTest::Schema::CD->set_primary_key('cdid');
+DBICTest::Schema::CD->add_unique_constraint(artist_title => [ qw/artist title/ ]);
1;