jormungandr-bite/packages/backend/src/migration/1605965516823-instance-images.ts
2023-10-13 18:44:25 +02:00

20 lines
683 B
TypeScript

import { MigrationInterface, QueryRunner } from "typeorm";
export class instanceImages1605965516823 implements MigrationInterface {
constructor() {
this.name = "instanceImages1605965516823";
}
async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "meta" ADD "backgroundImageUrl" character varying(512)`,
);
await queryRunner.query(
`ALTER TABLE "meta" ADD "logoImageUrl" character varying(512)`,
);
}
async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "logoImageUrl"`);
await queryRunner.query(
`ALTER TABLE "meta" DROP COLUMN "backgroundImageUrl"`,
);
}
}