iceshrimp-161sh/packages/backend/src/migration/1585772678853-ap-url.ts
2023-10-13 18:44:25 +02:00

16 lines
477 B
TypeScript

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