A long time ago, miker said we could correct typos in the schema as long as we add...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Apr 2009 15:35:26 +0000 (15:35 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Apr 2009 15:35:26 +0000 (15:35 +0000)
Let's take advantage of his openness before we hit 2.0 :)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@12829 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql [new file with mode: 0644]

index b8749a5..16cd91e 100644 (file)
@@ -84,12 +84,12 @@ CREATE TABLE asset.copy_transparency (
        CONSTRAINT scte_name_once_per_lib UNIQUE (owner,name)
 );
 
-CREATE TABLE asset.copy_tranparency_map (
+CREATE TABLE asset.copy_transparency_map (
        id              BIGSERIAL       PRIMARY KEY,
-       tansparency     INT     NOT NULL REFERENCES asset.copy_transparency (id) DEFERRABLE INITIALLY DEFERRED,
+       transparency    INT     NOT NULL REFERENCES asset.copy_transparency (id) DEFERRABLE INITIALLY DEFERRED,
        target_copy     INT     NOT NULL UNIQUE REFERENCES asset.copy (id) DEFERRABLE INITIALLY DEFERRED
 );
-CREATE INDEX cp_tr_cp_idx ON asset.copy_tranparency_map (tansparency);
+CREATE INDEX cp_tr_cp_idx ON asset.copy_transparency_map (transparency);
 
 CREATE TABLE asset.stat_cat_entry_transparency_map (
        id                      BIGSERIAL       PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql b/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql
new file mode 100644 (file)
index 0000000..f62b04e
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker@esilibrary.com.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+BEGIN;
+
+------------------
+/* Typos begone */
+------------------
+
+DROP INDEX asset.cp_tr_cp_idx;
+ALTER TABLE asset.copy_tranparency_map RENAME COLUMN tansparency TO transparency;
+ALTER TABLE asset.copy_tranparency_map RENAME TO copy_transparency_map;
+CREATE INDEX cp_tr_cp_idx ON asset.copy_transparency_map (transparency);
+
+COMMIT;