Add migration to restrict users without workspaces (#5369)

- update set null ON DELETE constraint to RESTRICT
- update missing updates
This commit is contained in:
martmull
2024-05-13 14:18:45 +02:00
committed by GitHub
parent 1ac8abb118
commit 8576127b47
3 changed files with 48 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export class User {
@Field(() => Workspace, { nullable: false })
@ManyToOne(() => Workspace, (workspace) => workspace.users, {
onDelete: 'SET NULL',
onDelete: 'RESTRICT',
})
defaultWorkspace: Relation<Workspace>;