LP#1851831 - Add permission descriptions where there are none. user/csharp/lp1851831_force_perm_descriptions
authorChris Sharp <csharp@georgialibraries.org>
Fri, 8 Nov 2019 12:54:15 +0000 (07:54 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 8 Nov 2019 12:54:15 +0000 (07:54 -0500)
The new Angular perm group interface requires perm descriptions,
so we do the very least we can do and update null descriptions
to the perm code.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix_null_perm_descriptions.sql [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix_null_perm_descriptions.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.fix_null_perm_descriptions.sql
new file mode 100644 (file)
index 0000000..6767953
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- The angular-ized permission group editor presumes that every
+-- permission in permission.perm_list has a description.  Ideally
+-- staff would add these manually and make them useful, but with
+-- the need for *something*, we just updated it to whatever the 
+-- code is.
+UPDATE permission.perm_list SET description = code WHERE description IS NULL;
+
+COMMIT;