trashposs/packages/backend/migration/1626509500668-fix-remote-file-proxy.js
tamaina 13cc69fe1c Fix avatar/banner proxy (#8346)
* Fix avatar/banner proxy

Co-authored-by: mei23 <m@m544.net>

* use getAvatarUrl

* fix

* join avatar and banner to improve performance

* join

* Update hybrid-timeline.ts

* fix

Co-authored-by: mei23 <m@m544.net>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-02-27 13:59:10 +09:00

24 lines
1.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class fixRemoteFileProxy1626509500668 {
constructor() {
this.name = 'fixRemoteFileProxy1626509500668';
}
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarUrl"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerUrl"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarBlurhash"`);
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerBlurhash"`);
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "proxyRemoteFiles"`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "proxyRemoteFiles" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`ALTER TABLE "user" ADD "bannerBlurhash" character varying(128)`);
await queryRunner.query(`ALTER TABLE "user" ADD "avatarBlurhash" character varying(128)`);
await queryRunner.query(`ALTER TABLE "user" ADD "bannerUrl" character varying(512)`);
await queryRunner.query(`ALTER TABLE "user" ADD "avatarUrl" character varying(512)`);
}
}
exports.fixRemoteFileProxy1626509500668 = fixRemoteFileProxy1626509500668;