Rename a couple of indexes (recuring -> recurring)
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Sep 2010 14:31:32 +0000 (14:31 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 23 Sep 2010 14:31:32 +0000 (14:31 +0000)
M    Open-ILS/src/sql/Pg/002.schema.config.sql
A    Open-ILS/src/sql/Pg/upgrade/0416.schema.rename-recuring-idx.sql

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

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0416.schema.rename-recuring-idx.sql [new file with mode: 0644]

index 3baba2f..6f4c362 100644 (file)
@@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0415'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0416'); -- Scott McKellar
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0416.schema.rename-recuring-idx.sql b/Open-ILS/src/sql/Pg/upgrade/0416.schema.rename-recuring-idx.sql
new file mode 100644 (file)
index 0000000..dde360e
--- /dev/null
@@ -0,0 +1,11 @@
+INSERT INTO config.upgrade_log (version) VALUES ('0416'); -- Scott McKellar
+
+\qecho No transaction.  Renaming two indexes to correct spelling.
+\qecho If either change fails, then the index was probably created
+\qecho correctly in the first place; ignore the failure.
+
+ALTER INDEX config.rule_recuring_fine_name_key
+       RENAME TO rule_recurring_fine_name_key;
+
+ALTER INDEX config.rule_recuring_fine_pkey
+       RENAME TO rule_recurring_fine_pkey;