mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
18 lines
645 B
TypeScript
18 lines
645 B
TypeScript
/* MIGRATION TO MAKE ALL EMAILS LOWERCASE
|
|
*
|
|
* Make all `email` values in `users` lowercase.
|
|
* This allows safe queries without any modificators
|
|
*/
|
|
|
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
|
|
export async function upgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
await queryFn('UPDATE `users` SET `email` = LOWER(`email`);')
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
export async function downgrade(queryFn: (query: string, values?: any[]) => Promise<Array<any>>) {
|
|
// This migration cannot be revered
|
|
}
|