Merge branch 'develop' into feat/disabling-of-notification

This commit is contained in:
--list
2021-06-24 08:51:45 +02:00
92 changed files with 1915 additions and 705 deletions
@@ -0,0 +1,31 @@
import { MigrationInterface, QueryRunner } from "typeorm"
export class gcRemoveUniqueOrder1624287602631 implements MigrationInterface {
name = "gcRemoveUniqueOrder1624287602631"
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "gift_card" DROP CONSTRAINT "FK_dfc1f02bb0552e79076aa58dbb0"`
)
await queryRunner.query(`COMMENT ON COLUMN "gift_card"."order_id" IS NULL`)
await queryRunner.query(
`ALTER TABLE "gift_card" DROP CONSTRAINT "REL_dfc1f02bb0552e79076aa58dbb"`
)
await queryRunner.query(
`ALTER TABLE "gift_card" ADD CONSTRAINT "FK_dfc1f02bb0552e79076aa58dbb0" FOREIGN KEY ("order_id") REFERENCES "order"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`
)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "gift_card" DROP CONSTRAINT "FK_dfc1f02bb0552e79076aa58dbb0"`
)
await queryRunner.query(
`ALTER TABLE "gift_card" ADD CONSTRAINT "REL_dfc1f02bb0552e79076aa58dbb" UNIQUE ("order_id")`
)
await queryRunner.query(`COMMENT ON COLUMN "gift_card"."order_id" IS NULL`)
await queryRunner.query(
`ALTER TABLE "gift_card" ADD CONSTRAINT "FK_dfc1f02bb0552e79076aa58dbb0" FOREIGN KEY ("order_id") REFERENCES "order"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`
)
}
}