1 --Upgrade Script for 3.4.1 to 3.4.2
2 \set eg_version '''3.4.2'''
4 INSERT INTO config.upgrade_log (version, applied_to) VALUES ('3.4.2', :eg_version);
6 SELECT evergreen.upgrade_deps_block_check('1197', :eg_version);
8 INSERT INTO config.workstation_setting_type (name, grp, datatype, label)
10 'eg.hatch.enable.printing', 'gui', 'bool',
12 'eg.hatch.enable.printing',
13 'Use Hatch for printing',
22 PERFORM COUNT(*), workstation, name
23 FROM actor.workstation_setting GROUP BY 2, 3 HAVING COUNT(*) > 1;
30 The actor.workstation_setting table contains duplicate rows. The duplicates
31 should be removed before applying a new UNIQUE constraint. To find the rows,
32 execute the following SQL:
34 SELECT COUNT(*), workstation, name FROM actor.workstation_setting
35 GROUP BY 2, 3 HAVING COUNT(*) > 1;
37 Once the duplicates are cleared, execute the following SQL:
39 ALTER TABLE actor.workstation_setting
40 ADD CONSTRAINT ws_once_per_key UNIQUE (workstation, name);
47 ALTER TABLE actor.workstation_setting
48 ADD CONSTRAINT ws_once_per_key UNIQUE (workstation, name);
58 -- Update auditor tables to catch changes to source tables.
59 -- Can be removed/skipped if there were no schema changes.
60 SELECT auditor.update_auditors();