chore: Convert user emails to lowercase
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { Knex } from 'knex';
|
||||
|
||||
export async function up(knex: Knex): Promise<void> {
|
||||
await knex('users')
|
||||
.whereRaw('email != LOWER(email)')
|
||||
.update({
|
||||
email: knex.raw('LOWER(email)'),
|
||||
});
|
||||
}
|
||||
|
||||
export async function down(): Promise<void> {
|
||||
// void
|
||||
}
|
Reference in New Issue
Block a user