drop name check constraint on config.hard_due_due
authorgmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 15:34:56 +0000 (15:34 +0000)
committergmc <gmc@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 19 Jan 2011 15:34:56 +0000 (15:34 +0000)
See https://bugs.launchpad.net/evergreen/+bug/704951 for context
and possible future direction.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19203 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/upgrade/0477.schema.remove-chdd-name-check.sql [new file with mode: 0644]

index a8370a0..c25dfc6 100644 (file)
@@ -70,7 +70,7 @@ CREATE TABLE config.upgrade_log (
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0476'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0477'); -- gmcharlt
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
@@ -344,7 +344,7 @@ $$;
 
 CREATE TABLE config.hard_due_date (
     id                  SERIAL      PRIMARY KEY,
-    name                TEXT        NOT NULL UNIQUE CHECK ( name ~ E'^\\w+$' ),
+    name                TEXT        NOT NULL UNIQUE,
     ceiling_date        TIMESTAMPTZ NOT NULL,
     forceto             BOOL        NOT NULL,
     owner               INT         NOT NULL   -- REFERENCES actor.org_unit (id) DEFERRABLE INITIALLY DEFERRED,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0477.schema.remove-chdd-name-check.sql b/Open-ILS/src/sql/Pg/upgrade/0477.schema.remove-chdd-name-check.sql
new file mode 100644 (file)
index 0000000..d91f648
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0477'); -- gmcharlt
+
+ALTER TABLE config.hard_due_date DROP CONSTRAINT hard_due_date_name_check;
+
+COMMIT;