aboutsummaryrefslogtreecommitdiff
path: root/perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-12-08 20:57:57 -0800
committerRuss Allbery <eagle@eyrie.org>2014-12-08 20:57:57 -0800
commit7856dc7cc5e16140c0084474fe54338f293bf77e (patch)
tree5948678fb9c0a30b7d72057c9952ac8836ae2499 /perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql
parentdd295a55a6f02e7585a9f5be9e8b434c6d14d040 (diff)
parente73a80c6bc23f16544c35e7dc3bf61ca9292c3b5 (diff)
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql')
-rw-r--r--perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql18
1 files changed, 18 insertions, 0 deletions
diff --git a/perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql b/perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql
new file mode 100644
index 0000000..c69e6a5
--- /dev/null
+++ b/perl/sql/Wallet-Schema-0.09-0.10-PostgreSQL.sql
@@ -0,0 +1,18 @@
+-- Convert schema 'sql/Wallet-Schema-0.09-PostgreSQL.sql' to 'sql/Wallet-Schema-0.10-PostgreSQL.sql':;
+
+BEGIN;
+
+ALTER TABLE duo DROP CONSTRAINT duo_pkey;
+
+ALTER TABLE duo ADD COLUMN du_type character varying(16) NOT NULL;
+
+CREATE INDEX duo_idx_du_type_du_name on duo (du_type, du_name);
+
+ALTER TABLE duo ADD PRIMARY KEY (du_name, du_type);
+
+ALTER TABLE duo ADD CONSTRAINT duo_fk_du_type_du_name FOREIGN KEY (du_type, du_name)
+ REFERENCES objects (ob_type, ob_name) DEFERRABLE;
+
+
+COMMIT;
+