Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ForceForeign.pm
CommitLineData
5b0b10fe 1package # hide from PAUSE
2 DBICTest::Schema::ForceForeign;
3
4a233f30 4use warnings;
5use strict;
6
660cf1be 7use base qw/DBICTest::BaseResult/;
5b0b10fe 8
9__PACKAGE__->table('forceforeign');
10__PACKAGE__->add_columns(
11 'artist' => { data_type => 'integer' },
12 'cd' => { data_type => 'integer' },
13);
14__PACKAGE__->set_primary_key(qw/artist/);
15
16# Normally this would not appear as a FK constraint
17# since it uses the PK
98fcc1c0 18__PACKAGE__->might_have('artist_1', 'DBICTest::Schema::Artist', 'artistid',
a705b175 19 { is_foreign_key_constraint => 1 },
5b0b10fe 20);
21
22# Normally this would appear as a FK constraint
a705b175 23__PACKAGE__->might_have('cd_1', 'DBICTest::Schema::CD',
24 { 'foreign.cdid' => 'self.cd' },
25 { is_foreign_key_constraint => 0 },
5b0b10fe 26);
27
6bf6ba2f 28# Normally this would appear as a FK constraint
a705b175 29__PACKAGE__->belongs_to('cd_3', 'DBICTest::Schema::CD',
30 { 'foreign.cdid' => 'self.cd' },
31 { is_foreign_key_constraint => 0 },
6bf6ba2f 32);
33
5b0b10fe 341;