Avoided using UUID() as function param for MySQL migration

This commit is contained in:
Harshil Sharma 2022-04-13 12:12:50 +05:30
parent 539aee6a46
commit 15cac1b066
2 changed files with 2 additions and 2 deletions

View file

@ -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,

View file

@ -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,