mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
14 lines
456 B
TypeScript
14 lines
456 B
TypeScript
/* MIGRATION TO MAKE ALL EMAILS LOWERCASE
|
|
*
|
|
* Make all `email` values in `users` lowercase.
|
|
* This allows safe queries without any modificators
|
|
*/
|
|
|
|
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
await queryFn('UPDATE `users` SET `email` = LOWER(`email`);')
|
|
}
|
|
|
|
export async function downgrade(_queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
// This migration cannot be revered
|
|
}
|