summaryrefslogtreecommitdiff
path: root/packages/backend/migration
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2022-02-27 13:59:10 +0900
committerGitHub <noreply@github.com>2022-02-27 13:59:10 +0900
commite314be5b59dc5b518f114c82a67a8546decb5a80 (patch)
tree269c4befe67f7e6c845ae975695ab4ceb0ba39ff /packages/backend/migration
parentrefactor: Use ESM (#8358) (diff)
downloadmisskey-e314be5b59dc5b518f114c82a67a8546decb5a80.tar.gz
misskey-e314be5b59dc5b518f114c82a67a8546decb5a80.tar.bz2
misskey-e314be5b59dc5b518f114c82a67a8546decb5a80.zip
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>
Diffstat (limited to 'packages/backend/migration')
-rw-r--r--packages/backend/migration/1626509500668-fix-remote-file-proxy.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/backend/migration/1626509500668-fix-remote-file-proxy.js b/packages/backend/migration/1626509500668-fix-remote-file-proxy.js
new file mode 100644
index 0000000000..163f73c66f
--- /dev/null
+++ b/packages/backend/migration/1626509500668-fix-remote-file-proxy.js
@@ -0,0 +1,23 @@
+"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;