Skip to content

Commit

Permalink
perf(core): Add indexes to Product & Collection slugs
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Indexes have been added to the ProductTranslation & CollectionTranslation slug
fields. This means a database migration will be needed - the change is small and non-destructive
so this is a routine migration which should not require manual editing of the migration script.
  • Loading branch information
michaelbromley committed Oct 11, 2022
1 parent a017936 commit 937cf67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export class CollectionTranslation extends VendureEntity implements Translation<

@Column() name: string;

@Column() slug: string;
@Index({ unique: false })
@Column()
slug: string;

@Column('text') description: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export class ProductTranslation extends VendureEntity implements Translation<Pro

@Column() name: string;

@Column() slug: string;
@Index({ unique: false })
@Column()
slug: string;

@Column('text') description: string;

Expand Down

0 comments on commit 937cf67

Please sign in to comment.