feat(database): add unique constraint on workspace subdomain (#9084)

Added a unique constraint to the "subdomain" column in the workspace
entity to ensure no duplicate subdomains exist in the database. Included
a TypeORM migration script to enforce this change at the database level.
This commit is contained in:
Antoine Moreaux
2024-12-16 19:41:18 +01:00
committed by GitHub
parent 33b028658e
commit 4e329d08b0
2 changed files with 20 additions and 1 deletions

View File

@ -144,7 +144,7 @@ export class Workspace {
databaseSchema: string;
@Field()
@Column()
@Column({ unique: true })
subdomain: string;
@Field()