lots of updates to make the test suite work with databases other than sqlite
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ForceForeign.pm
CommitLineData
5b0b10fe 1package # hide from PAUSE
2 DBICTest::Schema::ForceForeign;
3
4use base 'DBIx::Class::Core';
5
6__PACKAGE__->table('forceforeign');
7__PACKAGE__->add_columns(
8 'artist' => { data_type => 'integer' },
9 'cd' => { data_type => 'integer' },
10);
11__PACKAGE__->set_primary_key(qw/artist/);
12
13# Normally this would not appear as a FK constraint
14# since it uses the PK
15__PACKAGE__->might_have(
16 'artist_1', 'DBICTest::Schema::Artist', {
89cf6a70 17 'foreign.artistid' => 'self.artist',
5b0b10fe 18 }, {
19 is_foreign_key_constraint => 1,
20 },
21);
22
23# Normally this would appear as a FK constraint
24__PACKAGE__->might_have(
25 'cd_1', 'DBICTest::Schema::CD', {
26 'foreign.cdid' => 'self.cd',
27 }, {
28 is_foreign_key_constraint => 0,
29 },
30);
31
321;