Lazy Circ (AKA partial barcode lookup)
[evergreen-equinox.git] / Open-ILS / src / sql / Pg / 002.schema.config.sql
index 4b7b0ef..2f14205 100644 (file)
@@ -887,4 +887,19 @@ Upgrade script % can not be applied:
 END;
 $$ LANGUAGE PLPGSQL;
 
+CREATE TABLE config.barcode_completion (
+    id          SERIAL PRIMARY KEY,
+    active      BOOL NOT NULL DEFAULT true,
+    org_unit    INT NOT NULL, -- REFERENCES actor.org_unit(id) DEFERRABLE INITIALLY DEFERRED,
+    prefix      TEXT,
+    suffix      TEXT,
+    length      INT NOT NULL DEFAULT 0,
+    padding     TEXT,
+    padding_end BOOL NOT NULL DEFAULT false,
+    asset       BOOL NOT NULL DEFAULT true,
+    actor       BOOL NOT NULL DEFAULT true
+);
+
+CREATE TYPE evergreen.barcode_set AS (type TEXT, id BIGINT, barcode TEXT);
+
 COMMIT;