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
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17733
dcc99617-32d9-48b4-a31d-
7c20da2025e4
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
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
--- /dev/null
+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;