From 58186415a0f232cf84ced650ecc1326df66f9c6d Mon Sep 17 00:00:00 2001
From: Jon Robertson <jonrober@stanford.edu>
Date: Thu, 9 Oct 2014 22:24:18 -0700
Subject: 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
---
 perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql

(limited to 'perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql')

diff --git a/perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql b/perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql
new file mode 100644
index 0000000..3c54c6d
--- /dev/null
+++ b/perl/sql/Wallet-Schema-0.09-0.10-MySQL.sql
@@ -0,0 +1,14 @@
+-- Convert schema 'sql/Wallet-Schema-0.09-MySQL.sql' to 'Wallet::Schema v0.10':;
+
+BEGIN;
+
+ALTER TABLE duo DROP PRIMARY KEY,
+                ADD COLUMN du_type varchar(16) NOT NULL,
+                ADD INDEX duo_idx_du_type_du_name (du_type, du_name),
+                ADD PRIMARY KEY (du_name, du_type),
+                ADD CONSTRAINT duo_fk_du_type_du_name FOREIGN KEY (du_type, du_name) REFERENCES objects (ob_type, ob_name),
+                ENGINE=InnoDB;
+
+
+COMMIT;
+
-- 
cgit v1.2.3

