mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 01:33:09 +02:00
831c74a25b
* wip * support new version * URLプレビュー無効化時、フロント側も非表示にしてリクエストをしないようにする * fix lint * fix lint * tweak preview request error handles * fix: CHANGELOG.md * fix * fix --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
/*
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
export class UrlPreviewMeta1710512074000 {
|
|
name = 'UrlPreviewMeta1710512074000'
|
|
|
|
async up(queryRunner) {
|
|
await queryRunner.query(`
|
|
alter table meta
|
|
rename column "summalyProxy" to "urlPreviewSummaryProxyUrl";
|
|
alter table meta
|
|
add "urlPreviewEnabled" boolean default true not null;
|
|
alter table meta
|
|
add "urlPreviewTimeout" integer default 10000 not null;
|
|
alter table meta
|
|
add "urlPreviewMaximumContentLength" bigint default 10485760 not null;
|
|
alter table meta
|
|
add "urlPreviewRequireContentLength" boolean default false not null;
|
|
alter table meta
|
|
add "urlPreviewUserAgent" varchar(1024) default null;
|
|
`);
|
|
}
|
|
|
|
async down(queryRunner) {
|
|
await queryRunner.query(`
|
|
alter table meta
|
|
rename column "urlPreviewSummaryProxyUrl" to "summalyProxy";
|
|
alter table meta
|
|
drop column "urlPreviewEnabled";
|
|
alter table meta
|
|
drop column "urlPreviewTimeout";
|
|
alter table meta
|
|
drop column "urlPreviewMaximumContentLength";
|
|
alter table meta
|
|
drop column "urlPreviewRequireContentLength";
|
|
alter table meta
|
|
drop column "urlPreviewUserAgent";
|
|
`);
|
|
}
|
|
}
|