From: Chris Sharp Date: Mon, 30 Nov 2020 20:49:43 +0000 (-0500) Subject: SQL: comment out commit we already have X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=582e2ee5be1256274b47f7e2d01a956cb6598a29;p=evergreen%2Fpines.git SQL: comment out commit we already have Signed-off-by: Chris Sharp --- diff --git a/Open-ILS/src/sql/Pg/version-upgrade/3.6.0-3.6.1-upgrade-db.sql b/Open-ILS/src/sql/Pg/version-upgrade/3.6.0-3.6.1-upgrade-db.sql index de16955e45..4fe3e872fd 100644 --- a/Open-ILS/src/sql/Pg/version-upgrade/3.6.0-3.6.1-upgrade-db.sql +++ b/Open-ILS/src/sql/Pg/version-upgrade/3.6.0-3.6.1-upgrade-db.sql @@ -5,22 +5,24 @@ INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.6.1', :eg_versio SELECT evergreen.upgrade_deps_block_check('1241', :eg_version); -SET CONSTRAINTS ALL IMMEDIATE; -- to address "pending trigger events" error +-- PINES has this already --- Dedupe the table before applying the script. Preserve the original to allow the admin to delete it manually later. -CREATE TABLE reporter.schedule_original (LIKE reporter.schedule); -INSERT INTO reporter.schedule_original SELECT * FROM reporter.schedule; -TRUNCATE reporter.schedule; -INSERT INTO reporter.schedule (SELECT DISTINCT ON (report, folder, runner, run_time) id, report, folder, runner, run_time, start_time, complete_time, email, excel_format, html_format, csv_format, chart_pie, chart_bar, chart_line, error_code, error_text FROM reporter.schedule_original); -\qecho NOTE: This has created a backup of the original reporter.schedule -\qecho table, named reporter.schedule_original. Once you are sure that everything -\qecho works as expected, you can delete that table by issuing the following: -\qecho -\qecho 'DROP TABLE reporter.schedule_original;' -\qecho - --- Explicitly supply the name because it is referenced in clark-kent.pl -CREATE UNIQUE INDEX rpt_sched_recurrence_once_idx ON reporter.schedule (report,folder,runner,run_time,COALESCE(email,'')); +--SET CONSTRAINTS ALL IMMEDIATE; -- to address "pending trigger events" error +-- +---- Dedupe the table before applying the script. Preserve the original to allow the admin to delete it manually later. +--CREATE TABLE reporter.schedule_original (LIKE reporter.schedule); +--INSERT INTO reporter.schedule_original SELECT * FROM reporter.schedule; +--TRUNCATE reporter.schedule; +--INSERT INTO reporter.schedule (SELECT DISTINCT ON (report, folder, runner, run_time) id, report, folder, runner, run_time, start_time, complete_time, email, excel_format, html_format, csv_format, chart_pie, chart_bar, chart_line, error_code, error_text FROM reporter.schedule_original); +--\qecho NOTE: This has created a backup of the original reporter.schedule +--\qecho table, named reporter.schedule_original. Once you are sure that everything +--\qecho works as expected, you can delete that table by issuing the following: +--\qecho +--\qecho 'DROP TABLE reporter.schedule_original;' +--\qecho +-- +---- Explicitly supply the name because it is referenced in clark-kent.pl +--CREATE UNIQUE INDEX rpt_sched_recurrence_once_idx ON reporter.schedule (report,folder,runner,run_time,COALESCE(email,''));