From d4adb0e6e5b1dfe60ad6ab700bbd4641d495d151 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Tue, 19 Apr 2022 21:30:38 -0500 Subject: [PATCH 1/2] Fix migration 0 for cd server setting every component to 1901 instead of just component 39 Add migration to fix it for existing users and set the values back to what they were --- migrations/cdserver/0_nt_footrace.sql | 2 +- migrations/cdserver/4_nt_footrace_parrot.sql | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 migrations/cdserver/4_nt_footrace_parrot.sql diff --git a/migrations/cdserver/0_nt_footrace.sql b/migrations/cdserver/0_nt_footrace.sql index 2019f07..fd37599 100644 --- a/migrations/cdserver/0_nt_footrace.sql +++ b/migrations/cdserver/0_nt_footrace.sql @@ -1,6 +1,6 @@ BEGIN TRANSACTION; -UPDATE ComponentsRegistry SET component_id = 1901 WHERE id = 12916; +UPDATE ComponentsRegistry SET component_id = 1901 WHERE id = 12916 AND component_type = 39; INSERT INTO ActivityRewards (objectTemplate, ActivityRewardIndex, activityRating, LootMatrixIndex, CurrencyIndex, ChallengeRating, description) VALUES (1901, 166, -1, 598, 1, 4, 'NT Foot Race'); COMMIT; diff --git a/migrations/cdserver/4_nt_footrace_parrot.sql b/migrations/cdserver/4_nt_footrace_parrot.sql new file mode 100644 index 0000000..b1e7e01 --- /dev/null +++ b/migrations/cdserver/4_nt_footrace_parrot.sql @@ -0,0 +1,3 @@ +UPDATE ComponentsRegistry SET component_id = 12702 WHERE id = 12916 AND component_type = 2; +UPDATE ComponentsRegistry SET component_id = 6280 WHERE id = 12916 AND component_type = 3; +UPDATE ComponentsRegistry SET component_id = 1791 WHERE id = 12916 AND component_type = 7; \ No newline at end of file From d42cbb24739d20c69951a9279ffd3283b591befa Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Tue, 19 Apr 2022 21:36:09 -0500 Subject: [PATCH 2/2] make newline at end of file --- migrations/cdserver/4_nt_footrace_parrot.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/cdserver/4_nt_footrace_parrot.sql b/migrations/cdserver/4_nt_footrace_parrot.sql index b1e7e01..3d54981 100644 --- a/migrations/cdserver/4_nt_footrace_parrot.sql +++ b/migrations/cdserver/4_nt_footrace_parrot.sql @@ -1,3 +1,3 @@ UPDATE ComponentsRegistry SET component_id = 12702 WHERE id = 12916 AND component_type = 2; UPDATE ComponentsRegistry SET component_id = 6280 WHERE id = 12916 AND component_type = 3; -UPDATE ComponentsRegistry SET component_id = 1791 WHERE id = 12916 AND component_type = 7; \ No newline at end of file +UPDATE ComponentsRegistry SET component_id = 1791 WHERE id = 12916 AND component_type = 7;