feat(core): Add MFA (#4767)
https://linear.app/n8n/issue/ADO-947/sync-branch-with-master-and-fix-fe-e2e-tets --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import type { MigrationContext, ReversibleMigration } from '@/databases/types';
|
||||
import { TableColumn } from 'typeorm';
|
||||
|
||||
export class AddMfaColumns1690000000030 implements ReversibleMigration {
|
||||
async up({ queryRunner, tablePrefix }: MigrationContext) {
|
||||
await queryRunner.addColumns(`${tablePrefix}user`, [
|
||||
new TableColumn({
|
||||
name: 'mfaEnabled',
|
||||
type: 'boolean',
|
||||
isNullable: false,
|
||||
default: false,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: 'mfaSecret',
|
||||
type: 'text',
|
||||
isNullable: true,
|
||||
default: null,
|
||||
}),
|
||||
new TableColumn({
|
||||
name: 'mfaRecoveryCodes',
|
||||
type: 'text',
|
||||
isNullable: true,
|
||||
default: null,
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
async down({ queryRunner, tablePrefix }: MigrationContext) {
|
||||
await queryRunner.dropColumns(`${tablePrefix}user`, [
|
||||
'mfaEnabled',
|
||||
'mfaSecret',
|
||||
'mfaRecoveryCodes',
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user