Skip to content

Commit 6d7c819

Browse files
committed
chore: add db migration
1 parent dc213e2 commit 6d7c819

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class Migration1768904445609 implements MigrationInterface {
4+
name = 'Migration1768904445609'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`ALTER TABLE "wishlists" DROP COLUMN "summaryWants"`);
8+
await queryRunner.query(`ALTER TABLE "wishlists" ADD "summaryWants" jsonb`);
9+
await queryRunner.query(`ALTER TABLE "wishlists" DROP COLUMN "summaryOffers"`);
10+
await queryRunner.query(`ALTER TABLE "wishlists" ADD "summaryOffers" jsonb`);
11+
}
12+
13+
public async down(queryRunner: QueryRunner): Promise<void> {
14+
await queryRunner.query(`ALTER TABLE "wishlists" DROP COLUMN "summaryOffers"`);
15+
await queryRunner.query(`ALTER TABLE "wishlists" ADD "summaryOffers" text`);
16+
await queryRunner.query(`ALTER TABLE "wishlists" DROP COLUMN "summaryWants"`);
17+
await queryRunner.query(`ALTER TABLE "wishlists" ADD "summaryWants" text`);
18+
}
19+
20+
}

0 commit comments

Comments
 (0)