updating upgrade scripts for 1.2-1.4 for deficiency noted by John Craig. Thanks...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 10 Apr 2009 00:55:38 +0000 (00:55 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 10 Apr 2009 00:55:38 +0000 (00:55 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@12840 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/1.2.3-1.4-upgrade-db.sql
Open-ILS/src/sql/Pg/1.2.4-1.4-upgrade-db.sql

index 682713d..583c662 100644 (file)
@@ -1361,7 +1361,6 @@ CREATE TABLE config.circ_matrix_ruleset (
        recurring_fine_rule     INT     NOT NULL REFERENCES config.rule_recuring_fine (id) DEFERRABLE INITIALLY DEFERRED,
        max_fine_rule           INT     NOT NULL REFERENCES config.rule_max_fine (id) DEFERRABLE INITIALLY DEFERRED
 );
-INSERT INTO config.circ_matrix_ruleset (matchpoint,duration_rule,recurring_fine_rule,max_fine_rule) VALUES (1,11,1,1);
 
 CREATE OR REPLACE FUNCTION action.find_circ_matrix_matchpoint( context_ou INT, match_item BIGINT, match_user INT, renewal BOOL ) RETURNS INT AS $func$
 DECLARE
@@ -5729,3 +5728,10 @@ Added Log Comment
 
 COMMIT;
 
+INSERT INTO config.circ_matrix_ruleset (matchpoint,duration_rule,recurring_fine_rule,max_fine_rule)
+ SELECT  d.id, f.id, m.id
+   FROM  config.rule_circ_duration d
+               JOIN config.rule_recuring_fine f ON (f.name = d.name)
+               JOIN config.rule_max_fine m ON (f.name = m.name)
+   WHERE m.name = 'default';
+
index f7b2d09..71d492e 100644 (file)
@@ -1359,7 +1359,6 @@ CREATE TABLE config.circ_matrix_ruleset (
        recurring_fine_rule     INT     NOT NULL REFERENCES config.rule_recuring_fine (id) DEFERRABLE INITIALLY DEFERRED,
        max_fine_rule           INT     NOT NULL REFERENCES config.rule_max_fine (id) DEFERRABLE INITIALLY DEFERRED
 );
-INSERT INTO config.circ_matrix_ruleset (matchpoint,duration_rule,recurring_fine_rule,max_fine_rule) VALUES (1,11,1,1);
 
 CREATE OR REPLACE FUNCTION action.find_circ_matrix_matchpoint( context_ou INT, match_item BIGINT, match_user INT, renewal BOOL ) RETURNS INT AS $func$
 DECLARE
@@ -5727,3 +5726,10 @@ Added Log Comment
 
 COMMIT;
 
+INSERT INTO config.circ_matrix_ruleset (matchpoint,duration_rule,recurring_fine_rule,max_fine_rule)
+ SELECT  d.id, f.id, m.id
+   FROM  config.rule_circ_duration d
+               JOIN config.rule_recuring_fine f ON (f.name = d.name)
+               JOIN config.rule_max_fine m ON (f.name = m.name)
+   WHERE m.name = 'default';
+