SQL: add erenew changes
authorChris Sharp <csharp@georgialibraries.org>
Wed, 21 Dec 2022 13:11:58 +0000 (08:11 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 21 Dec 2022 13:11:58 +0000 (08:11 -0500)
Open-ILS/src/sql/Pg/version-upgrade/pines-post-3.10-upgrade.sql

index e4e0521..c0a17d3 100644 (file)
@@ -51,6 +51,32 @@ UPDATE asset.stat_cat SET opac_visible=false WHERE opac_visible=true;
 -- Patron stat cats
 UPDATE actor.stat_cat SET opac_visible=false WHERE opac_visible=true;
 
+-- erenew
 
+-- ID has to be under 100 in order to prevent it from appearing as a dropdown in the patron editor.
+
+INSERT INTO config.standing_penalty (id, name, label, staff_alert, org_depth)
+VALUES (90, 'PATRON_TEMP_RENEWAL',
+        'Patron was given a 30-day temporary account renewal.
+        Please archive this message after the account is fully renewed.', TRUE, 0
 COMMIT;
 
+BEGIN;
+
+ALTER TABLE permission.grp_tree ADD COLUMN erenew BOOL;
+
+COMMIT;
+
+BEGIN;
+
+UPDATE permission.grp_tree SET erenew = FALSE;
+
+COMMIT;
+
+BEGIN;
+
+ALTER TABLE permission.grp_tree ALTER COLUMN erenew SET NOT NULL;
+
+COMMIT;
+
+