Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Use utf8mb4_general_ci instead of the new MySQL 8.0.1 default utf8mb4_0900_ai_ci
天舟680eeb365eda
diff --git a/api/database.go b/api/database.goindex 1348d887cd..f503687a22 100644--- a/api/database.go+++ b/api/database.go@@ -9,7 +9,9 @@ import (const (ALL_DATABASE_NAME = "*"DEFAULT_CHARACTER_SET_NAME = "utf8mb4"- DEFAULT_COLLATION_NAME = "utf8mb4_0900_ai_ci"+ // Use utf8mb4_general_ci instead of the new MySQL 8.0.1 default utf8mb4_0900_ai_ci+ // because the former is compatible with more other MySQL flavors (e.g. MariaDB)+ DEFAULT_COLLATION_NAME = "utf8mb4_general_ci")type SyncStatus stringdiff --git a/db/mysql_migration_schema.sql b/db/mysql_migration_schema.sqlindex 0fcbd54dc3..5bc47ad395 100644--- a/db/mysql_migration_schema.sql+++ b/db/mysql_migration_schema.sql@@ -1,6 +1,6 @@-- This is the bytebase schema to track migration info for MySQL-- Create a database called bytebase-CREATE DATABASE bytebase CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_0900_ai_ci';+CREATE DATABASE bytebase CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';-- Create migration_history table-- Note, we don't create trigger to update created_ts and updated_ts because that may causes error:diff --git a/frontend/src/components/CreateDatabasePrepForm.vue b/frontend/src/components/CreateDatabasePrepForm.vueindex fbfce3a0f6..f62373d52b 100644--- a/frontend/src/components/CreateDatabasePrepForm.vue+++ b/frontend/src/components/CreateDatabasePrepForm.vue@@ -208,7 +208,7 @@ export default {const state = reactive<LocalState>({projectId: props.projectId,characterSet: "utf8mb4",- collation: "utf8mb4_0900_ai_ci",+ collation: "utf8mb4_general_ci",assigneeId: showAssigneeSelect.value ? undefined : SYSTEM_BOT_ID,});diff --git a/frontend/src/views/DatabaseCreate.vue b/frontend/src/views/DatabaseCreate.vueindex 5e04014008..7d10ef685c 100644--- a/frontend/src/views/DatabaseCreate.vue+++ b/frontend/src/views/DatabaseCreate.vue@@ -274,7 +274,7 @@ export default {(router.currentRoute.value.query.charset as string) || "utf8mb4",collation:(router.currentRoute.value.query.collation as string) ||- "utf8mb4_0900_ai_ci",+ "utf8mb4_general_ci",issueId: parseInt(router.currentRoute.value.query.issue as string) as IssueId,diff --git a/store/seed/release/10001__init_seed.sql b/store/seed/release/10001__init_seed.sqlindex 2ca8db0078..22f3990656 100644--- a/store/seed/release/10001__init_seed.sql+++ b/store/seed/release/10001__init_seed.sql@@ -82,7 +82,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -160,7 +160,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);diff --git a/store/seed/test/10070__db.sql b/store/seed/test/10070__db.sqlindex 71d1e7f58a..17b989ecda 100644--- a/store/seed/test/10070__db.sql+++ b/store/seed/test/10070__db.sql@@ -21,7 +21,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -48,7 +48,7 @@ VALUES3001,'testdb_dev','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624558090);@@ -75,7 +75,7 @@ VALUES3002,'shop','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -102,7 +102,7 @@ VALUES3003,'blog','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -130,7 +130,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -157,7 +157,7 @@ VALUES3001,'testdb_integration','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -184,7 +184,7 @@ VALUES3002,'shop','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -211,7 +211,7 @@ VALUES3003,'blog','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -239,7 +239,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -266,7 +266,7 @@ VALUES3001,'testdb_staging','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -293,7 +293,7 @@ VALUES3002,'shop','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -320,7 +320,7 @@ VALUES3003,'blog','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -348,7 +348,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -375,7 +375,7 @@ VALUES3001,'testdb_prod','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -402,7 +402,7 @@ VALUES3002,'shop','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -429,7 +429,7 @@ VALUES3003,'blog','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);@@ -457,7 +457,7 @@ VALUES1,'*','utf8mb4',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',0);\ No newline at end of filediff --git a/store/seed/test/10071__tbl.sql b/store/seed/test/10071__tbl.sqlindex 5ae5e7aba6..2b8fa0c32d 100644--- a/store/seed/test/10071__tbl.sql+++ b/store/seed/test/10071__tbl.sql@@ -25,7 +25,7 @@ VALUES'tbl1','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1625075289,1234,@@ -63,7 +63,7 @@ VALUES'tbl1','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1625075289,1234,@@ -101,7 +101,7 @@ VALUES'tbl1','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624475289,12234,@@ -139,7 +139,7 @@ VALUES'tbl1','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624475289,1234,@@ -177,7 +177,7 @@ VALUES'product','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624275289,1000,@@ -215,7 +215,7 @@ VALUES'product','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624575289,1000,@@ -253,7 +253,7 @@ VALUES'user','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624275289,1000,@@ -290,7 +290,7 @@ VALUES'post','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624275289,1000,@@ -327,7 +327,7 @@ VALUES'comment','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624275289,30000,@@ -365,7 +365,7 @@ VALUES'user','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624675289,100,@@ -402,7 +402,7 @@ VALUES'post','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624675289,300,@@ -439,7 +439,7 @@ VALUES'comment','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1624675289,2000,@@ -477,7 +477,7 @@ VALUES'user','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622675289,200,@@ -514,7 +514,7 @@ VALUES'post','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622675289,500,@@ -551,7 +551,7 @@ VALUES'comment','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622675289,4000,@@ -589,7 +589,7 @@ VALUES'user','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622275289,200,@@ -626,7 +626,7 @@ VALUES'post','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622275289,500,@@ -663,7 +663,7 @@ VALUES'comment','BASE TABLE','InnoDB',- 'utf8mb4_0900_ai_ci',+ 'utf8mb4_general_ci','OK',1622275289,7000,