[open-ils-commits] r17734 - in branches/rel_2_0/Open-ILS/src/sql/Pg: . upgrade (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 16 11:38:16 EDT 2010
Author: scottmk
Date: 2010-09-16 11:38:13 -0400 (Thu, 16 Sep 2010)
New Revision: 17734
Added:
branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0404.schema.acq-provider-contact-null-null.sql
Modified:
branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
branches/rel_2_0/Open-ILS/src/sql/Pg/200.schema.acq.sql
Log:
Make acq.provider_contact.name NOT NULL.
This change corrects the effect of a typo (NULL NULL instead of NOT NULL).
M Open-ILS/src/sql/Pg/200.schema.acq.sql
M Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
A Open-ILS/src/sql/Pg/upgrade/0404.schema.acq-provider-contact-null-null.sql
Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-16 15:38:03 UTC (rev 17733)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-09-16 15:38:13 UTC (rev 17734)
@@ -17859,6 +17859,9 @@
WHERE deleted IS FALSE or deleted = FALSE
;
+ALTER TABLE acq.provider_contact
+ ALTER COLUMN name SET NOT NULL;
+
COMMIT;
-- Some operations go outside of the transaction, because they may
Modified: branches/rel_2_0/Open-ILS/src/sql/Pg/200.schema.acq.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/200.schema.acq.sql 2010-09-16 15:38:03 UTC (rev 17733)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/200.schema.acq.sql 2010-09-16 15:38:13 UTC (rev 17734)
@@ -106,7 +106,7 @@
CREATE TABLE acq.provider_contact (
id SERIAL PRIMARY KEY,
provider INT NOT NULL REFERENCES acq.provider (id) DEFERRABLE INITIALLY DEFERRED,
- name TEXT NULL NULL,
+ name TEXT NOT NULL,
role TEXT, -- free-form.. e.g. "our sales guy"
email TEXT,
phone TEXT
Added: branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0404.schema.acq-provider-contact-null-null.sql
===================================================================
--- branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0404.schema.acq-provider-contact-null-null.sql (rev 0)
+++ branches/rel_2_0/Open-ILS/src/sql/Pg/upgrade/0404.schema.acq-provider-contact-null-null.sql 2010-09-16 15:38:13 UTC (rev 17734)
@@ -0,0 +1,11 @@
+BEGIN;
+
+-- Make this column NOT NULL. This was the intent all along,
+-- thwarted by a typo (NULL NULL instead of NOT NULL).
+
+INSERT INTO config.upgrade_log (version) VALUES ('0404'); -- Scott McKellar
+
+ALTER TABLE acq.provider_contact
+ ALTER COLUMN name SET NOT NULL;
+
+COMMIT;
More information about the open-ils-commits
mailing list