fix(medusa): Move migration to correct folder (#3067)
This commit is contained in:
1 parent
ff319cb800
commit
9427bc7f25
2 files changed
+5
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class uniquePaySessCartId1673550502785 implements MigrationInterface {
|
||||
name = 'uniquePaySessCartId1673550502785'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "public"."UniqPaymentSessionCartIdProviderId"`);
|
||||
await queryRunner.query(`CREATE UNIQUE INDEX "UniqPaymentSessionCartIdProviderId" ON "payment_session" ("cart_id", "provider_id") WHERE cart_id IS NOT NULL`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP INDEX "public"."UniqPaymentSessionCartIdProviderId"`);
|
||||
await queryRunner.query(`CREATE UNIQUE INDEX "UniqPaymentSessionCartIdProviderId" ON "payment_session" ("cart_id", "provider_id") `);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user