aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Body.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-12-12 16:48:27 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-12-15 00:11:05 +0000
commitfa4947c017af7599699892c1c3a647fc61f971ed (patch)
tree71cf677abe1891f40a79fa2a1e606929ad8f7640 /perllib/FixMyStreet/DB/Result/Body.pm
parent07b07d90cf666a06cb071ceebcecbd21d91e6b60 (diff)
Rename area_id on Contacts table to body_id.
Add foreign key constraint from contacts to body.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Body.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Body.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Body.pm b/perllib/FixMyStreet/DB/Result/Body.pm
index 76835cbde..6071ef33e 100644
--- a/perllib/FixMyStreet/DB/Result/Body.pm
+++ b/perllib/FixMyStreet/DB/Result/Body.pm
@@ -50,10 +50,16 @@ __PACKAGE__->belongs_to(
on_update => "CASCADE",
},
);
+__PACKAGE__->has_many(
+ "contacts",
+ "FixMyStreet::DB::Result::Contact",
+ { "foreign.body_id" => "self.id" },
+ { cascade_copy => 0, cascade_delete => 0 },
+);
-# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-12 16:29:16
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7G4lkjrgUBXKmadSuK8emA
+# Created by DBIx::Class::Schema::Loader v0.07017 @ 2012-12-13 12:34:57
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YiDf4mhoPlG5cnxCIrqZxw
# You can replace this text with custom code or comments, and it will be preserved on regeneration