From: Chris Sharp Date: Mon, 2 Nov 2020 19:06:06 +0000 (-0500) Subject: SQL: adding pre-3.6 upgrade script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a7bad66c4ced968f0d85d9ff0c40c8737d3fa1f1;p=evergreen%2Fpines.git SQL: adding pre-3.6 upgrade script --- diff --git a/Open-ILS/src/sql/Pg/upgrade/pines-pre-3.6-upgrade.sql b/Open-ILS/src/sql/Pg/upgrade/pines-pre-3.6-upgrade.sql new file mode 100644 index 0000000000..267f97f7a9 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/pines-pre-3.6-upgrade.sql @@ -0,0 +1,13 @@ +begin; + + +-- SELECT COUNT(*), workstation, name FROM actor.workstation_setting +-- GROUP BY 2, 3 HAVING COUNT(*) > 1; + +-- we need to dedupe our workstation settings to prepare for the new index +create table actor.workstation_setting_temp like actor.workstation_setting; +insert into actor.workstation_setting_temp select * from actor.workstation_setting; +truncate actor.workstation_setting; +insert into actor.workstation_setting (select distinct on (workstation, name) id, workstation, name, value from actor.workstation_setting_temp); + +commit;