Typeorm @Unique
@Entity()
@Unique(["field1"]) // one field
@Unique("index_name", ["field1", "field2"]) // named; multiple fields
export class MyEntity {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column()
field1: string;
@Column()
field2: string;
}
Jens