1
0
Fork 1
mirror of https://example.com synced 2024-11-27 13:36:39 +09:00
firefish/packages/backend/migration/1684494870830-EmojiSize.js

20 lines
596 B
JavaScript
Raw Normal View History

2023-05-20 11:26:13 +09:00
export class EmojiSize1684494870830 {
name = "EmojiSize1684494870830";
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "emoji" ADD "width" integer`);
await queryRunner.query(
`COMMENT ON COLUMN "emoji"."width" IS 'Image width'`,
);
await queryRunner.query(`ALTER TABLE "emoji" ADD "height" integer`);
await queryRunner.query(
`COMMENT ON COLUMN "emoji"."height" IS 'Image height'`,
);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "height"`);
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "width"`);
}
}