should have had this index all along, but was less important until now where copy...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 15:55:50 +0000 (15:55 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 9 Sep 2010 15:55:50 +0000 (15:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17543 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/040.schema.asset.sql
Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql [new file with mode: 0644]

index 8ef60d8..ed21364 100644 (file)
@@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0390'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0391'); -- miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index a3fb73d..1c52cb0 100644 (file)
@@ -160,6 +160,7 @@ CREATE TABLE asset.copy_note (
        value           TEXT                            NOT NULL
 );
 CREATE INDEX asset_copy_note_creator_idx ON asset.copy_note ( creator );
+CREATE INDEX asset_copy_note_owning_copy_idx ON asset.copy_note ( owning_copy );
 
 CREATE TABLE asset.uri (
     id  SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql b/Open-ILS/src/sql/Pg/upgrade/0391.schema.copy_note_owner_index.sql
new file mode 100644 (file)
index 0000000..32af942
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0391'); -- miker
+CREATE INDEX asset_copy_note_owning_copy_idx ON asset.copy_note ( owning_copy );
+
+COMMIT;
+