From 269fa80324ba5bd38572cb27c4b044c24c99ee9e Mon Sep 17 00:00:00 2001 From: miker Date: Sat, 21 Aug 2010 18:02:36 +0000 Subject: [PATCH] we need an index on LOWER(barcode) with r17018 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 | 2 +- Open-ILS/src/sql/Pg/005.schema.actors.sql | 1 + .../src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 125727140..9c2478c69 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -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, diff --git a/Open-ILS/src/sql/Pg/005.schema.actors.sql b/Open-ILS/src/sql/Pg/005.schema.actors.sql index 91d4eee18..6dba42c2b 100644 --- a/Open-ILS/src/sql/Pg/005.schema.actors.sql +++ b/Open-ILS/src/sql/Pg/005.schema.actors.sql @@ -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 index 000000000..f8912dbf6 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0377.schema.actor.card.barcode-lower-index.sql @@ -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)); + -- 2.11.0