-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(product): Add metadata to property to product category data model (…
…#8766) * fix: Add metadata to property to product category data model * chore: Add migration for adding metadata column to product category * chore: Added test for product category metadata
- Loading branch information
1 parent
ff6fcfb
commit ac18b5d
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/modules/product/src/migrations/Migration202408271511.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Migration } from "@mikro-orm/migrations" | ||
|
||
export class Migration202408271511 extends Migration { | ||
async up(): Promise<void> { | ||
this.addSql( | ||
'alter table if exists "product_category" add column if not exists "metadata" jsonb;' | ||
); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql( | ||
'alter table if exists "product_category" drop column if exists "metadata";' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters