Change constraint on acq.provider. Instead of making code unique
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Aug 2009 17:49:26 +0000 (17:49 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 24 Aug 2009 17:49:26 +0000 (17:49 +0000)
commitdbd4db5c08b96af9d2cefe2fa97eb2ec3e96734f
tree2ee6f056c525fc9e4e1b19c75c7fe36fb08bbe9c
parent7c4dddbc73b661039169c5e0af5703f5f4d61464
Change constraint on acq.provider.  Instead of making code unique
by itself, make code + owner unique.

To change an existing table:

ALTER TABLE acq.provider
DROP CONSTRAINT provider_code_key;

ALTER TABLE acq.provider
ALTER COLUMN code SET NOT NULL;

ALTER TABLE acq.provider
ADD CONSTRAINT code_once_per_owner
UNIQUE (code, owner);

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13926 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/sql/Pg/200.schema.acq.sql