mirror of
https://github.com/docmost/docmost.git
synced 2026-07-13 06:44:48 +10:00
refactor: rename MFA enabled field to is_enabled
This commit is contained in:
@@ -9,11 +9,9 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
.addColumn('user_id', 'uuid', (col) =>
|
||||
col.references('users.id').onDelete('cascade').notNull(),
|
||||
)
|
||||
.addColumn('method', 'varchar(50)', (col) =>
|
||||
col.notNull().defaultTo('totp'),
|
||||
)
|
||||
.addColumn('secret', 'varchar(255)', (col) => col)
|
||||
.addColumn('enabled', 'boolean', (col) => col.defaultTo(false))
|
||||
.addColumn('method', 'varchar', (col) => col.notNull().defaultTo('totp'))
|
||||
.addColumn('secret', 'text', (col) => col)
|
||||
.addColumn('is_enabled', 'boolean', (col) => col.defaultTo(false))
|
||||
.addColumn('backup_codes', sql`text[]`, (col) => col)
|
||||
.addColumn('workspace_id', 'uuid', (col) =>
|
||||
col.references('workspaces.id').onDelete('cascade').notNull(),
|
||||
|
||||
@@ -190,7 +190,7 @@ export class UserRepo {
|
||||
.select([
|
||||
'userMfa.id',
|
||||
'userMfa.method',
|
||||
'userMfa.enabled',
|
||||
'userMfa.isEnabled',
|
||||
'userMfa.createdAt',
|
||||
])
|
||||
.whereRef('userMfa.userId', '=', 'users.id'),
|
||||
|
||||
+1
-1
@@ -250,8 +250,8 @@ export interface Spaces {
|
||||
export interface UserMfa {
|
||||
backupCodes: string[] | null;
|
||||
createdAt: Generated<Timestamp>;
|
||||
enabled: Generated<boolean | null>;
|
||||
id: Generated<string>;
|
||||
isEnabled: Generated<boolean | null>;
|
||||
method: Generated<string>;
|
||||
secret: string | null;
|
||||
updatedAt: Generated<Timestamp>;
|
||||
|
||||
Reference in New Issue
Block a user