feat(server): add emoji publicUrl

This commit is contained in:
syuilo 2022-01-20 03:08:18 +09:00
parent 7627c43dee
commit fe5e6709a5
11 changed files with 40 additions and 15 deletions

View file

@ -0,0 +1,15 @@
const { MigrationInterface, QueryRunner } = require("typeorm");
module.exports = class emojiUrl1642611822809 {
name = 'emojiUrl1642611822809'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "emoji" RENAME COLUMN "url" TO "originalUrl"`);
await queryRunner.query(`ALTER TABLE "emoji" ADD "publicUrl" character varying(512) NOT NULL DEFAULT ''`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "originalUrl"`);
await queryRunner.query(`ALTER TABLE "emoji" RENAME COLUMN "originalUrl" TO "url"`);
}
}