aboutsummaryrefslogtreecommitdiff
path: root/perl/lib/Wallet/Schema/Result
diff options
context:
space:
mode:
authorJon Robertson <jonrober@stanford.edu>2014-10-09 22:24:18 -0700
committerJon Robertson <jonrober@stanford.edu>2014-10-09 22:24:18 -0700
commit58186415a0f232cf84ced650ecc1326df66f9c6d (patch)
tree5b34314712a2dd22497dbeab8692a1f3edc03762 /perl/lib/Wallet/Schema/Result
parent94cfb1c7969515a863d7b0e09f00b6ced5f4fc5c (diff)
Added new column in the Duo table
New column is required to differentiate the Duo table entries now that we have more than one Duo object type. Added the new field and rebuilt schema definitions and upgrade files. Change-Id: Icf538eaded93f4f2820984c087d4850a586a7db1
Diffstat (limited to 'perl/lib/Wallet/Schema/Result')
-rw-r--r--perl/lib/Wallet/Schema/Result/Duo.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl/lib/Wallet/Schema/Result/Duo.pm b/perl/lib/Wallet/Schema/Result/Duo.pm
index 80a71dc..6ad61e9 100644
--- a/perl/lib/Wallet/Schema/Result/Duo.pm
+++ b/perl/lib/Wallet/Schema/Result/Duo.pm
@@ -45,9 +45,19 @@ __PACKAGE__->table("duo");
__PACKAGE__->add_columns(
"du_name",
{ data_type => "varchar", is_nullable => 0, size => 255 },
+ "du_type",
+ { data_type => "varchar", is_nullable => 0, size => 16 },
"du_key",
{ data_type => "varchar", is_nullable => 0, size => 255 },
);
-__PACKAGE__->set_primary_key("du_name");
-
+__PACKAGE__->set_primary_key("du_name", "du_type");
+
+__PACKAGE__->belongs_to(
+ 'object',
+ 'Wallet::Schema::Result::Object',
+ {
+ 'foreign.ob_type' => 'self.du_type',
+ 'foreign.ob_name' => 'self.du_name',
+ },
+ );
1;