we need an index on LOWER(barcode) with r17018
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 21 Aug 2010 18:02:36 +0000 (18:02 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 21 Aug 2010 18:02:36 +0000 (18:02 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17299 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/005.schema.actors.sql
Open-ILS/src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql [new file with mode: 0644]

index 1257271..9c2478c 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 ('0376'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0377'); -- miker
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index 91d4eee..6dba42c 100644 (file)
@@ -315,6 +315,7 @@ COMMENT ON TABLE actor.card IS $$
 $$;
 
 CREATE INDEX actor_card_usr_idx ON actor.card (usr);
+CREATE INDEX actor_card_barcode_lower_idx ON actor.card (lower(barcode));
 
 CREATE TABLE actor.org_unit_type (
        id              SERIAL  PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql b/Open-ILS/src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql
new file mode 100644 (file)
index 0000000..f8912db
--- /dev/null
@@ -0,0 +1,4 @@
+
+INSERT INTO config.upgrade_log (version) VALUES ('0377'); -- miker .. no xact needed
+CREATE INDEX actor_card_barcode_lower_idx ON actor.card (lower(barcode));
+