LP#1737016 Stamping upgrade script for easing constraints on afs.code
[working/Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 1091.schema.lp1737016_afs_code.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('1091', :eg_version);
4
5 ALTER TABLE acq.funding_source DROP CONSTRAINT funding_source_code_key;
6 ALTER TABLE acq.funding_source ALTER COLUMN code SET NOT NULL;
7 ALTER TABLE acq.funding_source ADD CONSTRAINT funding_source_code_once_per_owner UNIQUE (code,owner);
8
9 COMMIT;