2024-03-03 05:20:32 +01:00
|
|
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
2023-05-20 04:26:13 +02:00
|
|
|
|
2024-03-03 05:20:32 +01:00
|
|
|
export class EmojiSize1684494870830 implements MigrationInterface {
|
|
|
|
async up(queryRunner: QueryRunner): Promise<void> {
|
2023-05-20 04:26:13 +02:00
|
|
|
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'`,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2024-03-03 05:20:32 +01:00
|
|
|
async down(queryRunner: QueryRunner): Promise<void> {
|
2023-05-20 04:26:13 +02:00
|
|
|
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "height"`);
|
|
|
|
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "width"`);
|
|
|
|
}
|
|
|
|
}
|