install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0449'); -- miker
+INSERT INTO config.upgrade_log (version) VALUES ('0450'); -- gmc
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
ADD COLUMN active BOOL NOT NULL DEFAULT TRUE;
ALTER TABLE acq.fund
- ADD COLUMN balance_warning_percent INT
- CONSTRAINT balance_warning_percent_limit
- CHECK( balance_warning_percent <= 100 );
+ ADD COLUMN balance_warning_percent INT;
ALTER TABLE acq.fund
- ADD COLUMN balance_stop_percent INT
- CONSTRAINT balance_stop_percent_limit
- CHECK( balance_stop_percent <= 100 );
+ ADD COLUMN balance_stop_percent INT;
CREATE VIEW acq.ordered_funding_source_credit AS
SELECT
rollover BOOL NOT NULL DEFAULT FALSE,
propagate BOOL NOT NULL DEFAULT TRUE,
active BOOL NOT NULL DEFAULT TRUE,
- balance_warning_percent INT CONSTRAINT balance_warning_percent_limit
- CHECK( balance_warning_percent <= 100 ),
- balance_stop_percent INT CONSTRAINT balance_stop_percent_limit
- CHECK( balance_stop_percent <= 100 ),
+ balance_warning_percent INT,
+ balance_stop_percent INT,
CONSTRAINT name_once_per_org_year UNIQUE (org,name,year),
CONSTRAINT code_once_per_org_year UNIQUE (org, code, year),
CONSTRAINT acq_fund_rollover_implies_propagate CHECK ( propagate OR NOT rollover )
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0450'); -- gmc
+
+-- libraries can choose to overcommit funds
+ALTER TABLE acq.fund DROP CONSTRAINT balance_warning_percent_limit;
+ALTER TABLE acq.fund DROP CONSTRAINT balance_stop_percent_limit;
+
+COMMIT;