From: Joseph Lewis Date: Mon, 20 Jun 2011 19:36:25 +0000 (-0600) Subject: Fixed my database errors (although some still exist, I can't tell if they X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d2ae9eddb7e9e324e7dad774c9fdd284ab2102de;p=contrib%2FConifer.git Fixed my database errors (although some still exist, I can't tell if they are mine or not, I'm going to test the master and see if they exist there...) Signed-off-by: Joseph Lewis Signed-off-by: Thomas Berezansky Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 2e032a2b1b..6f61662e1e 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -918,13 +918,13 @@ CREATE TYPE evergreen.barcode_set AS (type TEXT, id BIGINT, barcode TEXT); CREATE TABLE config.org_unit_setting_type_log ( date_applied TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() PRIMARY KEY, - org SERIAL REFERENCES actor.org_unit (id), + org SERIAL, --REFERENCES actor.org_unit (id), original_value TEXT, new_value TEXT, field_name TEXT REFERENCES config.org_unit_setting_type (name) ); -COMMENT ON TABLE config.org_unit_setting_log IS $$ +COMMENT ON TABLE config.org_unit_setting_type_log IS $$ Org Unit setting Logs This table contains the most recent changes to each setting diff --git a/Open-ILS/src/sql/Pg/800.fkeys.sql b/Open-ILS/src/sql/Pg/800.fkeys.sql index 3777df3c39..224ca4a9af 100644 --- a/Open-ILS/src/sql/Pg/800.fkeys.sql +++ b/Open-ILS/src/sql/Pg/800.fkeys.sql @@ -124,4 +124,6 @@ CREATE INDEX by_heading ON authority.record_entry (authority.simple_normalize_he ALTER TABLE config.z3950_source ADD CONSTRAINT use_perm_fkey FOREIGN KEY (use_perm) REFERENCES permission.perm_list (id) ON UPDATE CASCADE ON DELETE RESTRICT DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE config.org_unit_setting_type_log ADD CONSTRAINT config_org_unit_setting_type_log_fkey FORIEGN KEY (org) REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; + COMMIT;