mirror of
https://github.com/docmost/docmost.git
synced 2025-11-18 14:51:09 +10:00
fix foreign keys
This commit is contained in:
@ -5,7 +5,7 @@ export async function up(db: Kysely<any>): Promise<void> {
|
|||||||
await db.schema
|
await db.schema
|
||||||
.alterTable('comments')
|
.alterTable('comments')
|
||||||
.addColumn('last_edited_by_id', 'uuid', (col) =>
|
.addColumn('last_edited_by_id', 'uuid', (col) =>
|
||||||
col.references('users.id').onDelete('cascade'),
|
col.references('users.id').onDelete('set null'),
|
||||||
)
|
)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ export async function up(db: Kysely<any>): Promise<void> {
|
|||||||
await db.schema
|
await db.schema
|
||||||
.alterTable('comments')
|
.alterTable('comments')
|
||||||
.addColumn('resolved_by_id', 'uuid', (col) =>
|
.addColumn('resolved_by_id', 'uuid', (col) =>
|
||||||
col.references('users.id').onDelete('cascade'),
|
col.references('users.id').onDelete('set null'),
|
||||||
)
|
)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user