mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix collate conversion due to inconsistencies with encoding
This commit is contained in:
parent
1c36192a65
commit
1324da1fe5
@ -6,11 +6,13 @@
|
||||
*/
|
||||
|
||||
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
// Explicitly change the charset and collate to the one used to then change it
|
||||
await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;')
|
||||
await queryFn(
|
||||
'ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;',
|
||||
)
|
||||
}
|
||||
|
||||
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
||||
await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8mb4;')
|
||||
await queryFn('ALTER TABLE `login_users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user