From dc611ac0103d560086ffb3becaa3b73278b32d2d Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 11 May 2015 18:50:46 -0400 Subject: [PATCH] Add SQL file for emergency rollback It's a generated SQL file - but golly let's have some eyes on it for real. Change-Id: I887bc9117d82917be9ab10f121cc1c2d8411f433 --- tools/gerrit-rollback-2.10-2.8.sql | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/gerrit-rollback-2.10-2.8.sql diff --git a/tools/gerrit-rollback-2.10-2.8.sql b/tools/gerrit-rollback-2.10-2.8.sql new file mode 100644 index 0000000000..1b1f874f53 --- /dev/null +++ b/tools/gerrit-rollback-2.10-2.8.sql @@ -0,0 +1,31 @@ +## mysqldiff 0.43 +## +## Run on Mon May 11 14:55:31 2015 +## Options: host=localhost, debug=0 +## +## --- db: new (host=localhost) +## +++ db: old (host=localhost) + +ALTER TABLE account_diff_preferences DROP COLUMN hide_top_menu; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE account_diff_preferences DROP COLUMN render_entire_file; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE account_diff_preferences DROP COLUMN theme; # was varchar(20) COLLATE utf8_bin DEFAULT NULL +ALTER TABLE account_diff_preferences DROP COLUMN hide_empty_pane; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE account_diff_preferences DROP COLUMN hide_line_numbers; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE account_group_by_id_aud DROP PRIMARY KEY; # was (group_id,include_uuid,added_on) +ALTER TABLE account_group_by_id_aud ADD PRIMARY KEY (added_on,group_id,include_uuid); +ALTER TABLE accounts DROP COLUMN size_bar_in_change_table; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE accounts DROP COLUMN review_category_strategy; # was varchar(20) COLLATE utf8_bin DEFAULT NULL +ALTER TABLE accounts DROP COLUMN legacycid_in_change_table; # was char(1) COLLATE utf8_bin NOT NULL DEFAULT 'N' +ALTER TABLE patch_set_approvals ADD INDEX patch_set_approvals_openByUser (change_open,account_id); +ALTER TABLE patch_set_approvals ADD INDEX patch_set_approvals_closedByU (change_open,account_id); +ALTER TABLE patch_sets DROP INDEX patch_sets_byRevision; # was INDEX (revision) + +insert into account_groups values + ('Anonymous Users', 'Any user, signed-in or not', 'SYSTEM', 'N', 'global:Anonymous-Users', 2, '2c6802522201d0091571720a39b3851e0cc805d5'), + ('Registered Users', 'Any signed-in user', 'SYSTEM', 'N', 'global:Registered-Users', 3, '2c6802522201d0091571720a39b3851e0cc805d5'), + ('Project Owners', 'Any owner of the project', 'SYSTEM', 'N', 'global:Project-Owners', 5, '2c6802522201d0091571720a39b3851e0cc805d5'), + ('Change Owner', 'The owner of a change', 'SYSTEM', 'N', 'global:Change-Owner', 325, '2c6802522201d0091571720a39b3851e0cc805d5'); + +update schema_version set version_nbr = '86'; +## Not accounted for +## - Create the All-Users git repo