mirror of
https://github.com/docmost/docmost.git
synced 2025-11-24 01:11:21 +10:00
rename column
This commit is contained in:
@ -3,15 +3,13 @@ import { type Kysely } from 'kysely';
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.alterTable('auth_providers')
|
||||
.addColumn('is_group_sync_enabled', 'boolean', (col) =>
|
||||
col.defaultTo(false).notNull(),
|
||||
)
|
||||
.addColumn('group_sync', 'boolean', (col) => col.defaultTo(false).notNull())
|
||||
.execute();
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.alterTable('auth_providers')
|
||||
.dropColumn('is_group_sync_enabled')
|
||||
.dropColumn('group_sync')// enable_group_sync
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
2
apps/server/src/database/types/db.d.ts
vendored
2
apps/server/src/database/types/db.d.ts
vendored
@ -62,7 +62,7 @@ export interface AuthProviders {
|
||||
deletedAt: Timestamp | null;
|
||||
id: Generated<string>;
|
||||
isEnabled: Generated<boolean>;
|
||||
isGroupSyncEnabled: Generated<boolean>;
|
||||
groupSync: Generated<boolean>;
|
||||
name: string;
|
||||
oidcClientId: string | null;
|
||||
oidcClientSecret: string | null;
|
||||
|
||||
Reference in New Issue
Block a user