mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-23 13:11:02 +10:00
* Fixes
* use lower case db column names * fix signup workspaceId
This commit is contained in:
@ -4,18 +4,8 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.alterTable('workspaces')
|
||||
.addForeignKeyConstraint(
|
||||
'workspaces_creatorId_fkey',
|
||||
['creatorId'],
|
||||
'users',
|
||||
['id'],
|
||||
)
|
||||
.execute();
|
||||
|
||||
await db.schema
|
||||
.alterTable('workspaces')
|
||||
.addForeignKeyConstraint(
|
||||
'workspaces_defaultSpaceId_fkey',
|
||||
['defaultSpaceId'],
|
||||
'workspaces_default_space_id_fkey',
|
||||
['default_space_id'],
|
||||
'spaces',
|
||||
['id'],
|
||||
)
|
||||
@ -26,11 +16,6 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.alterTable('workspaces')
|
||||
.dropConstraint('workspaces_creatorId_fkey')
|
||||
.execute();
|
||||
|
||||
await db.schema
|
||||
.alterTable('workspaces')
|
||||
.dropConstraint('workspaces_defaultSpaceId_fkey')
|
||||
.dropConstraint('workspaces_default_space_id_fkey')
|
||||
.execute();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user