[open-ils-commits] r12829 - trunk/Open-ILS/src/sql/Pg (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Apr 9 11:35:28 EDT 2009


Author: dbs
Date: 2009-04-09 11:35:26 -0400 (Thu, 09 Apr 2009)
New Revision: 12829

Added:
   trunk/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
Log:
A long time ago, miker said we could correct typos in the schema as long as we add corresponding upgrade logic
Let's take advantage of his openness before we hit 2.0 :)


Modified: trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2009-04-09 15:18:03 UTC (rev 12828)
+++ trunk/Open-ILS/src/sql/Pg/040.schema.asset.sql	2009-04-09 15:35:26 UTC (rev 12829)
@@ -84,12 +84,12 @@
 	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,

Added: trunk/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/1.4-2.0-upgrade-db.sql	2009-04-09 15:35:26 UTC (rev 12829)
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2008  Equinox Software, Inc.
+ * Mike Rylander <miker at 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;



More information about the open-ils-commits mailing list