From 15cac1b0662e84eb24f549e761a13eb2b5339f7c Mon Sep 17 00:00:00 2001 From: Harshil Sharma Date: Wed, 13 Apr 2022 12:12:50 +0530 Subject: [PATCH] Avoided using UUID() as function param for MySQL migration --- .../store/sqlstore/migrations/000018_populate_categories.up.sql | 2 +- .../sqlstore/migrations/000019_populate_category_blocks.up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/services/store/sqlstore/migrations/000018_populate_categories.up.sql b/server/services/store/sqlstore/migrations/000018_populate_categories.up.sql index dc5ead83d..b9ef73cc6 100644 --- a/server/services/store/sqlstore/migrations/000018_populate_categories.up.sql +++ b/server/services/store/sqlstore/migrations/000018_populate_categories.up.sql @@ -26,7 +26,7 @@ CREATE TABLE {{.prefix}}categories ( REPLACE(uuid_in(md5(random()::text || clock_timestamp()::text)::cstring)::varchar, '-', ''), {{ end }} {{ if .mysql }} - REPLACE(UUID(), '-', ''), + UUID(), {{ end }} COALESCE(nullif(c.DisplayName, ''), 'Direct Message') as category_name, cm.UserId, diff --git a/server/services/store/sqlstore/migrations/000019_populate_category_blocks.up.sql b/server/services/store/sqlstore/migrations/000019_populate_category_blocks.up.sql index 709a9407e..c31f5897f 100644 --- a/server/services/store/sqlstore/migrations/000019_populate_category_blocks.up.sql +++ b/server/services/store/sqlstore/migrations/000019_populate_category_blocks.up.sql @@ -16,7 +16,7 @@ CREATE TABLE {{.prefix}}category_blocks ( REPLACE(uuid_in(md5(random()::text || clock_timestamp()::text)::cstring)::varchar, '-', ''), {{ end }} {{ if .mysql }} - REPLACE(UUID(), '-', ''), + UUID(), {{ end }} {{.prefix}}categories.user_id, {{.prefix}}categories.id,