fix(core): Fix RemoveResetPasswordColumns migration for sqlite (no-changelog) (#6739)
This commit is contained in:
committed by
GitHub
parent
fc7aa8bd66
commit
1438a737b3
@@ -3,27 +3,24 @@ import { TableColumn } from 'typeorm';
|
||||
|
||||
export class RemoveResetPasswordColumns1690000000030 implements ReversibleMigration {
|
||||
async up({ queryRunner, tablePrefix }: MigrationContext) {
|
||||
await queryRunner.dropColumn(`${tablePrefix}user`, 'resetPasswordToken');
|
||||
await queryRunner.dropColumn(`${tablePrefix}user`, 'resetPasswordTokenExpiration');
|
||||
await queryRunner.dropColumns(`${tablePrefix}user`, [
|
||||
'resetPasswordToken',
|
||||
'resetPasswordTokenExpiration',
|
||||
]);
|
||||
}
|
||||
|
||||
async down({ queryRunner, tablePrefix }: MigrationContext) {
|
||||
await queryRunner.addColumn(
|
||||
`${tablePrefix}user`,
|
||||
await queryRunner.addColumns(`${tablePrefix}user`, [
|
||||
new TableColumn({
|
||||
name: 'resetPasswordToken',
|
||||
type: 'varchar',
|
||||
isNullable: true,
|
||||
}),
|
||||
);
|
||||
|
||||
await queryRunner.addColumn(
|
||||
`${tablePrefix}user`,
|
||||
new TableColumn({
|
||||
name: 'resetPasswordTokenExpiration',
|
||||
type: 'int',
|
||||
isNullable: true,
|
||||
}),
|
||||
);
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user