diff --git a/.config/example.yml b/.config/example.yml index 900ac09051..9d20e44a0b 100644 --- a/.config/example.yml +++ b/.config/example.yml @@ -62,6 +62,16 @@ redis: #prefix: example-prefix #db: 1 +# ┌─────────────────────┐ +#───┘ Sonic configuration └───────────────────────────────────── + +#sonic: +# host: localhost +# port: 1491 +# auth: SecretPassword +# collection: notes +# bucket: default + # ┌─────────────────────────────┐ #───┘ Elasticsearch configuration └───────────────────────────── @@ -69,8 +79,8 @@ redis: # host: localhost # port: 9200 # ssl: false -# user: -# pass: +# user: +# pass: # ┌───────────────┐ #───┘ ID generation └─────────────────────────────────────────── @@ -96,6 +106,17 @@ id: 'aid' # Max note length, should be < 8000. #maxNoteLength: 3000 +# Maximum lenght of an image caption or file comment (default 1500, max 8192) +#maxCaptionLength: 1500 + +# Reserved usernames that only the administrator can register with +reservedUsernames: + - root + - admin + - administrator + - me + - system + # Whether disable HSTS #disableHsts: true @@ -126,6 +147,7 @@ id: 'aid' #proxy: http://127.0.0.1:3128 #proxyBypassHosts: [ +# 'web.kaiteki.app', # 'example.com', # '192.0.2.8' #] @@ -198,4 +220,4 @@ id: 'aid' # !!!!!!!!!! # Seriously. Do NOT fill out the above settings if you're self-hosting. -# They're much better off being set from the control panel. +# They're much better off being set from the control panel. diff --git a/.gitignore b/.gitignore index 52139614c2..5e1d4a26d0 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ ormconfig.json packages/backend/assets/instance.css packages/backend/assets/sounds/None.mp3 +!packages/backend/src/db # blender backups *.blend1 diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..abb787e4c2 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +use-lockfile-v6=true diff --git a/.okteto/okteto-pipeline.yml b/.okteto/okteto-pipeline.yml deleted file mode 100644 index e2996fbbc9..0000000000 --- a/.okteto/okteto-pipeline.yml +++ /dev/null @@ -1,6 +0,0 @@ -build: - misskey: - args: - - NODE_ENV=development -deploy: - - helm upgrade --install misskey chart --set image=${OKTETO_BUILD_MISSKEY_IMAGE} --set url="https://misskey-$(kubectl config view --minify -o jsonpath='{..namespace}').cloud.okteto.net" --set environment=development diff --git a/.weblate b/.weblate new file mode 100644 index 0000000000..18f45edbbd --- /dev/null +++ b/.weblate @@ -0,0 +1,3 @@ +[weblate] +url = https://hosted.weblate.org/api/ +translation = calckey/locales diff --git a/.woodpecker/commit.yml b/.woodpecker/commit.yml index 386484ce22..6bb1b2d814 100644 --- a/.woodpecker/commit.yml +++ b/.woodpecker/commit.yml @@ -18,4 +18,4 @@ services: image: redis branches: - include: [ main, develop, feature/* ] + include: [ main, beta, develop, feature/* ] diff --git a/CALCKEY.md b/CALCKEY.md index 015232f700..923cbe6805 100644 --- a/CALCKEY.md +++ b/CALCKEY.md @@ -3,27 +3,24 @@ ## Planned - Stucture - - [Sonic](https://crates.io/crates/sonic-server) support as an ElasticSearch alternative - [DragonflyDB](https://dragonflydb.io/) support as a Redis alternative - Optionally use [ScyllaDB](https://www.scylladb.com/open-source-nosql-database/) for storing notes - - Rewrite backend in Rust and [Axum](https://github.com/tokio-rs/axum) + - Rewrite backend in Rust and [Rocket](https://rocket.rs/) + - Use [Magic RegExP](https://regexp.dev/) for RegEx 🦄 - Function - Federate with note edits - - Admin customizable max note length (100-8000) - User "choices" (recommended users) like Mastodon and Soapbox - Join Reason system like Mastodon/Pleroma - Option to publicize instance blocks - - Backfill remote users - Build flag to remove NSFW/AI stuff - - Timeline filters - Filter notifications by user - - Non-nyaify cat mode - Exclude self from antenna - Form - MFM button - Personal notes for all accounts - Fully revamp non-logged-in screen - Classic mode make instance icon bring up new context menu + - Lookup/details for post/file/instance - [Rat mode?](https://stop.voring.me/notes/933fx97bmd) ## Work in progress @@ -37,6 +34,7 @@ - Admin custom CSS - Add back time machine (jump to date) - Improve accesibility +- Timeline filters ## Implemented @@ -108,6 +106,22 @@ - Allows custom emoji - Fix lint errors - Use Rome instead of ESLint +- Mastodon API support +- More antenna options +- New dashboard +- Backfill follower counts +- Improved emoji licensing + - This feature was ported from Misskey. + - https://github.com/misskey-dev/misskey/commit/8ae9d2eaa8b0842671558370f787902e94b7f5a3: enhance: カスタム絵文字にライセンス情報を付与できるように + - https://github.com/misskey-dev/misskey/commit/ed51209172441927d24339f0759a5badbee3c9b6: 絵文字のライセンスを表示できるように +- Compile time compression +- Sonic search +- Popular color schemes, including Nord, Gruvbox, and Catppuccin +- Non-nyaify cat mode + +## Implemented (remote) + + - MissV: [fix Misskey Forkbomb](https://code.vtopia.live/Vtopia/MissV/commit/40b23c070bd4adbb3188c73546c6c625138fb3c1) - [Make showing ads optional](https://github.com/misskey-dev/misskey/pull/8996) - [Tapping avatar in mobile opens account modal](https://github.com/misskey-dev/misskey/pull/9056) @@ -121,32 +135,32 @@ - [Add additional background for acrylic popups if backdrop-filter is unsupported](https://github.com/misskey-dev/misskey/pull/8671) - [Add parameters to MFM rotate](https://github.com/misskey-dev/misskey/pull/8549) - Many changes from [Foundkey](https://akkoma.dev/FoundKeyGang/Foundkey) - - 0ece67b04c3f0365057624c1068808276ccab981: refactor pages/auth.form.vue to composition API - - 0ece67b04c3f0365057624c1068808276ccab981: refactor pages/auth.form.vue to composition API - - 4bc9610d8bf5af736b5e89e4782395705de45d7d: remove unnecessary joins - - 9ee609d70082f7a6dc119a5d83c0e7c5e1208676: enhance privacy of notes - - 0fec6e10477b1c1b95d9469fbaf4e249a3722f12: remove ms dependency - - 46fff77accbe8bf0fd3cc88170d67b997bf2bdc3: client uses new API for child notes depth - - c35372a20d22cddb75e93a0b407f2b652cd7faf0: pack children without detail - - aca724e0bfff3e58b4d273f3ee744e3f3aa9c39b: enable to fetch replies recursively - - 2fe64c11502fd8d89c126558cd715e095c83754e: Refactor components/page/page.textarea.vue to composition API - - 6d3181f9835955e5b79bde5484c74bd70e7f9535: Refactor components/page/page.text.vue to composition API - - b630cd7eacd695bb705e6748c87f38425ec4ed45: refactor: add NoteReactions.packMany - - 3fe351df6d4e21f7748c46adfa6ca165abd030c0: fix: catch errors from packing with detail - - 63591da33e233b2ed0ab331ae6bb3c9eff5020ae: refactor: colours in queue chart - - 0f6d94f1e7e1f58cfbf8d07e5f835f8de626842e: backend: improve mutes and blocks - - e2bf2715a6462ed377b033956d65260157f042ea: fix spelling error - - 09a7eabda137e77f81ab31f65d69329670693c8d: backend: fix lint "no-throw-literal" - - 4fbe2e065e75ed3e5b4dfdfd4be3baa03cc447c3: client: fix lint "quotes" - - 585e4f5c42cfafb6cdf7eb601ab435d6a4d85a96: fix textarea not updating properly - - 30d8bc9259cb6b72ed76d67b21dbb4cdceca8327: refactor: welcome.setup.vue to composition api - - 751921e24f37ed707fe44a40d88eebb1299efa35: make emoji picker case insensitive - - 298febeb9c9501e3e3df16982c08657d1da474e0: enhance: add re-collapsing to quoted notes - - b0fdedb264db87575063abed45e52ad71ce4a6af: fix lints in folder.vue - - 6fed87f85d132304eb84b0a59b84dce299a1822f: fix pagination.vue lints - - Tosti's security fixes - - 384e8c49b738f576ba8843296de6cebf01c1b247: server: allow to like own gallery posts - - 4c5aa9e53887cca5561fcec6ab0754e018f589a5: server: allow to like own pages - - 923c93da1228458dd65be47483c198a1a9191bcf: use await for notes.countBy - - ca90cedba0a0704b503c2778694230f5a7dfbace: server: reduce dead instance detection to 7 days - - e9ab42c10afb4e27516c2d2b5e3e06630efe9edd: Alt text in image viewer + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/0ece67b04c3f0365057624c1068808276ccab981: refactor pages/auth.form.vue to composition API + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/4bc9610d8bf5af736b5e89e4782395705de45d7d: remove unnecessary joins + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/9ee609d70082f7a6dc119a5d83c0e7c5e1208676: enhance privacy of notes + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/0fec6e10477b1c1b95d9469fbaf4e249a3722f12: remove ms dependency + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/46fff77accbe8bf0fd3cc88170d67b997bf2bdc3: client uses new API for child notes depth + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/c35372a20d22cddb75e93a0b407f2b652cd7faf0: pack children without detail + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/aca724e0bfff3e58b4d273f3ee744e3f3aa9c39b: enable to fetch replies recursively + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/2fe64c11502fd8d89c126558cd715e095c83754e: Refactor components/page/page.textarea.vue to composition API + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/6d3181f9835955e5b79bde5484c74bd70e7f9535: Refactor components/page/page.text.vue to composition API + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/b630cd7eacd695bb705e6748c87f38425ec4ed45: refactor: add NoteReactions.packMany + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/3fe351df6d4e21f7748c46adfa6ca165abd030c0: fix: catch errors from packing with detail + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/63591da33e233b2ed0ab331ae6bb3c9eff5020ae: refactor: colours in queue chart + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/0f6d94f1e7e1f58cfbf8d07e5f835f8de626842e: backend: improve mutes and blocks + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/e2bf2715a6462ed377b033956d65260157f042ea: fix spelling error + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/09a7eabda137e77f81ab31f65d69329670693c8d: backend: fix lint "no-throw-literal" + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/4fbe2e065e75ed3e5b4dfdfd4be3baa03cc447c3: client: fix lint "quotes" + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/585e4f5c42cfafb6cdf7eb601ab435d6a4d85a96: fix textarea not updating properly + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/30d8bc9259cb6b72ed76d67b21dbb4cdceca8327: refactor: welcome.setup.vue to composition api + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/751921e24f37ed707fe44a40d88eebb1299efa35: make emoji picker case insensitive + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/298febeb9c9501e3e3df16982c08657d1da474e0: enhance: add re-collapsing to quoted notes + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/b0fdedb264db87575063abed45e52ad71ce4a6af: fix lints in folder.vue + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/6fed87f85d132304eb84b0a59b84dce299a1822f: fix pagination.vue lints + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/384e8c49b738f576ba8843296de6cebf01c1b247: server: allow to like own gallery posts + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/4c5aa9e53887cca5561fcec6ab0754e018f589a5: server: allow to like own pages + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/923c93da1228458dd65be47483c198a1a9191bcf: use await for notes.countBy + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/ca90cedba0a0704b503c2778694230f5a7dfbace: server: reduce dead instance detection to 7 days + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/e9ab42c10afb4e27516c2d2b5e3e06630efe9edd: Alt text in image viewer + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/ed9d4023d41bba7c4ac53a1a3422246feed37de2: add argon2 support + - https://akkoma.dev/FoundKeyGang/FoundKey/commit/c414f24a2c123774246c7eca65edda4d3afaf8b3: feat: per-user renote muting diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f824432e29..7a1fdee31d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,8 +48,8 @@ Thank you for your PR! Before creating a PR, please check the following: - If there is an Issue which will be resolved by this PR, please include a reference to the Issue in the text. Good examples include `Closing: #21` or `Resolves: #21` - Check if there are any documents that need to be created or updated due to this change. - If you have added a feature or fixed a bug, please add a test case if possible. -- Please make sure that tests and Lint are passed in advance. - - You can run it with `pnpm run test` and `pnpm run lint`. [See more info](#testing) +- Please make sure that formatting, tests and Lint are passed in advance. + - You can run it with `pnpm run format`, `pnpm run test` and `pnpm run lint`. [See more info](#testing) - If this PR includes UI changes, please attach a screenshot in the text. Thanks for your cooperation 🤗 diff --git a/Dockerfile b/Dockerfile index 03ede16c71..bdf11a9df4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,17 @@ FROM node:19-alpine as build WORKDIR /calckey # Install compilation dependencies -RUN apk add --no-cache --no-progress git alpine-sdk python3 +RUN apk add --no-cache --no-progress git alpine-sdk python3 rust cargo vips # Copy only the dependency-related files first, to cache efficiently COPY package.json pnpm*.yaml ./ COPY packages/backend/package.json packages/backend/package.json COPY packages/client/package.json packages/client/package.json COPY packages/sw/package.json packages/sw/package.json +COPY packages/calckey-js/package.json packages/calckey-js/package.json +COPY packages/backend/native-utils/package.json packages/backend/native-utils/package.json +COPY packages/backend/native-utils/npm/linux-x64-musl/package.json packages/backend/native-utils/npm/linux-x64-musl/package.json +COPY packages/backend/native-utils/npm/linux-arm64-musl/package.json packages/backend/native-utils/npm/linux-arm64-musl/package.json # Configure corepack and pnpm RUN corepack enable @@ -31,7 +35,7 @@ FROM node:19-alpine WORKDIR /calckey # Install runtime dependencies -RUN apk add --no-cache --no-progress tini ffmpeg +RUN apk add --no-cache --no-progress tini ffmpeg vips-dev COPY . ./ @@ -40,11 +44,14 @@ COPY --from=build /calckey/node_modules /calckey/node_modules COPY --from=build /calckey/packages/backend/node_modules /calckey/packages/backend/node_modules COPY --from=build /calckey/packages/sw/node_modules /calckey/packages/sw/node_modules COPY --from=build /calckey/packages/client/node_modules /calckey/packages/client/node_modules +COPY --from=build /calckey/packages/calckey-js/node_modules /calckey/packages/calckey-js/node_modules # Copy the finished compiled files COPY --from=build /calckey/built /calckey/built COPY --from=build /calckey/packages/backend/built /calckey/packages/backend/built COPY --from=build /calckey/packages/backend/assets/instance.css /calckey/packages/backend/assets/instance.css +COPY --from=build /calckey/packages/backend/native-utils/built /calckey/packages/backend/native-utils/built +COPY --from=build /calckey/packages/backend/native-utils/target /calckey/packages/backend/native-utils/target RUN corepack enable ENTRYPOINT [ "/sbin/tini", "--" ] diff --git a/README.md b/README.md index 55f599235e..af117ac4aa 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,9 @@ - OCR image captioning - New and improved Groups - Better intro tutorial + - Compatibility with Mastodon clients/apps + - Backfill user information + - Sonic search - Many more user and admin settings - [So much more!](./CALCKEY.md) @@ -66,7 +69,7 @@ If you have access to a server that supports one of the sources below, I recomme ### 🐋 Docker -[How to run Calckey with Docker](./docker-README.md). +[How to run Calckey with Docker](./docs/docker.md). ## 🧑‍💻 Dependencies @@ -78,8 +81,9 @@ If you have access to a server that supports one of the sources below, I recomme ### 😗 Optional dependencies - [FFmpeg](https://ffmpeg.org/) for video transcoding -- [ElasticSearch](https://www.elastic.co/elasticsearch/) for full-text search - - OpenSearch/Sonic are not supported as of right now +- Full text search (choost one of the following) + - 🦔 [Sonic](https://crates.io/crates/sonic-server) (highly recommended!) + - [ElasticSearch](https://www.elastic.co/elasticsearch/) - Management (choose one of the following) - 🛰️ [pm2](https://pm2.io/) - 🐳 [Docker](https://docker.com) @@ -87,6 +91,7 @@ If you have access to a server that supports one of the sources below, I recomme ### 🏗️ Build dependencies +- 🦀 [Rust toolchain](https://www.rust-lang.org/) - 🦬 C/C++ compiler & build tools - `build-essential` on Debian/Ubuntu Linux - `base-devel` on Arch Linux @@ -119,6 +124,17 @@ Assuming you set up PostgreSQL correctly, all you have to run is: psql postgres -c "create database calckey with encoding = 'UTF8';" ``` +In Calckey's directory, fill out the `db` section of `.config/default.yml` with the correct information, where the `db` key is `calckey`. + +## 🦔 Set up search + +Follow sonic's [installation guide](https://github.com/valeriansaliou/sonic#installation) + +If you use IPv4: in Sonic's directory, edit the `config.cfg` file to change `inet` to `"0.0.0.0:1491"`. + +In Calckey's directory, fill out the `sonic` section of `.config/default.yml` with the correct information. + + ## 💅 Customize - To add custom CSS for all users, edit `./custom/assets/instance.css`. @@ -136,12 +152,7 @@ psql postgres -c "create database calckey with encoding = 'UTF8';" ## 🚚 Migrating from Misskey to Calckey -> ⚠️ Because of their changes, migrating from Foundkey is not supported. - -```sh -cp ../misskey/.config/default.yml ./.config/default.yml # replace `../misskey/` with misskey path, add `docker.env` if you use Docker -cp -r ../misskey/files . -``` +For migrating from Misskey v13, Misskey v12, and Foundkey, read [this document](./docs/migrate.md). ## 🍀 NGINX @@ -160,7 +171,8 @@ cp -r ../misskey/files . ```sh # git pull -NODE_ENV=production pnpm install && pnpm run build && pnpm run migrate +pnpm install +NODE_ENV=production pnpm run build && pnpm run migrate pm2 start "NODE_ENV=production pnpm run start" --name Calckey ``` diff --git a/custom/assets/sounds/None.mp3 b/custom/assets/sounds/None.mp3 deleted file mode 100644 index d1312e721e..0000000000 Binary files a/custom/assets/sounds/None.mp3 and /dev/null differ diff --git a/docker-compose.yml b/docker-compose.yml index f51cf1b9a9..5de14d0c8f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ services: depends_on: - db - redis -# - es + - sonic ports: - "3000:3000" networks: @@ -40,16 +40,14 @@ services: volumes: - ./db:/var/lib/postgresql/data -# es: -# restart: unless-stopped -# image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.2 -# environment: -# - "ES_JAVA_OPTS=-Xms512m -Xmx512m" -# - "TAKE_FILE_OWNERSHIP=111" -# networks: -# - calcnet -# volumes: -# - ./elasticsearch:/usr/share/elasticsearch/data + sonic: + restart: unless-stopped + image: docker.io/valeriansaliou/sonic:v1.4.0 + networks: + - calcnet + volumes: + - ./sonic:/var/lib/sonic/store + - ./sonic/config.cfg:/etc/sonic.cfg networks: calcnet: diff --git a/docker-README.md b/docs/docker.md similarity index 93% rename from docker-README.md rename to docs/docker.md index 1119b34f12..8c42ee54d7 100644 --- a/docker-README.md +++ b/docs/docker.md @@ -14,7 +14,7 @@ There is a `docker-compose.yml` in the root of the project that you can use to b Rename the files: -`cp .config/default_example.yml .config/default.yml` +`cp .config/example.yml .config/default.yml` `cp .config/example.env .config/docker.env` @@ -23,6 +23,7 @@ You can configure `docker.env` with anything you like, but you will have to pay - `url` should be set to the URL you will be hosting the web interface for the instance at. - `host`, `db`, `user`, `pass` will have to be configured in the `PostgreSQL configuration` section - `host` is the name of the postgres container (eg: *calckey_db_1*), and the others should match your `docker.env`. - `host`will need to be configured in the *Redis configuration* section - it is the name of the redis container (eg: *calckey_redis_1*) +- `auth` will need to be configured in the *Sonic* section - cannot be the default `SecretPassword` Everything else can be left as-is. diff --git a/docs/migrate.md b/docs/migrate.md new file mode 100644 index 0000000000..07a5fea07f --- /dev/null +++ b/docs/migrate.md @@ -0,0 +1,82 @@ +# 🚚 Migrating from Misskey to Calckey + +## Misskey v13 and above + +```sh +wget -O mkv13.patch https://codeberg.org/calckey/calckey/raw/branch/develop/docs/mkv13.patch +git apply mkv13.patch + +cd packages/backend + +LINE_NUM="$(npx typeorm migration:show -d ormconfig.js | grep -n activeEmailValidation1657346559800 | cut -d ':' -f 1)" +NUM_MIGRATIONS="$(npx typeorm migration:show -d ormconfig.js | tail -n+"$LINE_NUM" | grep '\[X\]' | nl)" + +for i in $(seq 1 $NUM_MIGRAIONS); do + npx typeorm migration:revert -d ormconfig.js +done + +git remote set-url origin https://codeberg.org/calckey/calckey.git +git fetch +git checkout main # or beta or develop +git pull --ff + +NODE_ENV=production pnpm run migrate +# build using prefered method +``` + +Depending on the version you're migrating from, you may have to open Postgres with `psql -d your_database` and run the following commands: + +```sql +ALTER TABLE "meta" ADD COLUMN "disableLocalTimeline" boolean DEFAULT false; +ALTER TABLE "meta" ADD COLUMN "disableGlobalTimeline" boolean DEFAULT false; +ALTER TABLE "meta" ADD COLUMN "localDriveCapacityMb" integer DEFAULT 512; +ALTER TABLE "meta" ADD COLUMN "remoteDriveCapacityMb" integer DEFAULT 128; +ALTER TABLE "user" ADD COLUMN "isSilenced" boolean DEFAULT false; +ALTER TABLE "user" ADD COLUMN "isAdmin" boolean DEFAULT false; +ALTER TABLE "user" ADD COLUMN "isModerator" boolean DEFAULT false; +ALTER TABLE "user" ADD COLUMN "remoteDriveCapacityMb" integer DEFAULT 128; +ALTER TABLE "user" ADD COLUMN "driveCapacityOverrideMb" integer DEFAULT 128; +ALTER TABLE "instance" ADD COLUMN "caughtAt" date; +ALTER TABLE "instance" ADD COLUMN "latestRequestSentAt" date; +ALTER TABLE "instance" ADD COLUMN "latestStatus" character varying(512); +ALTER TABLE "instance" ADD COLUMN "lastCommunicatedAt" date; +``` + +then quit with `\q`, and restart Calckey. + +## Misskey v12.119 and before + +```sh +git remote set-url origin https://codeberg.org/calckey/calckey.git +git fetch +git checkout main # or beta or develop +git pull --ff + +NODE_ENV=production pnpm run migrate +# build using prefered method +``` + +## Foundkey + +```sh +cd packages/backend + +LINE_NUM="$(npx typeorm migration:show -d ormconfig.js | grep -n uniformThemecolor1652859567549 | cut -d ':' -f 1)" +NUM_MIGRATIONS="$(npx typeorm migration:show -d ormconfig.js | tail -n+"$LINE_NUM" | grep '\[X\]' | nl)" + +for i in $(seq 1 $NUM_MIGRAIONS); do + npx typeorm migration:revert -d ormconfig.js +done + +git remote set-url origin https://codeberg.org/calckey/calckey.git +git fetch +git checkout main # or beta or develop +git pull --ff + +NODE_ENV=production pnpm run migrate +# build using prefered method +``` + +## Reverse + +You ***cannot*** migrate back to Misskey from Calckey due to re-hashing passwords on signin with argon2. You can migrate from Calckey to Foundkey, though. diff --git a/docs/mkv13.patch b/docs/mkv13.patch new file mode 100644 index 0000000000..e6106b16f2 --- /dev/null +++ b/docs/mkv13.patch @@ -0,0 +1,45 @@ +diff --git a/packages/backend/migration/1672704017999-remove-lastCommunicatedAt.js b/packages/backend/migration/1672704017999-remove-lastCommunicatedAt.js +index 38a676985..c4ae690e0 100644 +--- a/packages/backend/migration/1672704017999-remove-lastCommunicatedAt.js ++++ b/packages/backend/migration/1672704017999-remove-lastCommunicatedAt.js +@@ -6,6 +6,8 @@ export class removeLastCommunicatedAt1672704017999 { + } + + async down(queryRunner) { +- await queryRunner.query(`ALTER TABLE "instance" ADD "lastCommunicatedAt" TIMESTAMP WITH TIME ZONE NOT NULL`); ++ await queryRunner.query(`ALTER TABLE "instance" ADD "lastCommunicatedAt" TIMESTAMP WITH TIME ZONE`); ++ await queryRunner.query(`UPDATE "instance" SET "lastCommunicatedAt" = COALESCE("infoUpdatedAt", "caughtAt")`); ++ await queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "lastCommunicatedAt" SET NOT NULL`); + } + } +diff --git a/packages/backend/migration/1673336077243-PollChoiceLength.js b/packages/backend/migration/1673336077243-PollChoiceLength.js +index 810c626e0..5809528cb 100644 +--- a/packages/backend/migration/1673336077243-PollChoiceLength.js ++++ b/packages/backend/migration/1673336077243-PollChoiceLength.js +@@ -6,6 +6,6 @@ export class PollChoiceLength1673336077243 { + } + + async down(queryRunner) { +- await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(128) array`); ++ //await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(128) array`); + } + } +diff --git a/packages/backend/migration/1674118260469-achievement.js b/packages/backend/migration/1674118260469-achievement.js +index 131ab96f8..57a922f83 100644 +--- a/packages/backend/migration/1674118260469-achievement.js ++++ b/packages/backend/migration/1674118260469-achievement.js +@@ -18,12 +18,13 @@ export class achievement1674118260469 { + + async down(queryRunner) { + await queryRunner.query(`CREATE TYPE "public"."user_profile_mutingnotificationtypes_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'pollEnded')`); ++ await queryRunner.query(`CREATE TYPE "public"."notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); + await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" DROP DEFAULT`); + await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" TYPE "public"."user_profile_mutingnotificationtypes_enum_old"[] USING "mutingNotificationTypes"::"text"::"public"."user_profile_mutingnotificationtypes_enum_old"[]`); + await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" SET DEFAULT '{}'`); + await queryRunner.query(`DROP TYPE "public"."user_profile_mutingnotificationtypes_enum"`); + await queryRunner.query(`ALTER TYPE "public"."user_profile_mutingnotificationtypes_enum_old" RENAME TO "user_profile_mutingnotificationtypes_enum"`); +- await queryRunner.query(`CREATE TYPE "public"."notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); ++ await queryRunner.query(`DELETE FROM "public"."notification" WHERE "type" = 'achievementEarned'`); + await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "public"."notification_type_enum_old" USING "type"::"text"::"public"."notification_type_enum_old"`); + await queryRunner.query(`DROP TYPE "public"."notification_type_enum"`); + await queryRunner.query(`ALTER TYPE "public"."notification_type_enum_old" RENAME TO "notification_type_enum"`); diff --git a/gulpfile.js b/gulpfile.js index 87063c0bc0..f994f0029a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -24,10 +24,6 @@ gulp.task('copy:client:fonts', () => gulp.src('./packages/client/node_modules/three/examples/fonts/**/*').pipe(gulp.dest('./built/_client_dist_/fonts/')) ); -gulp.task('copy:client:phosphor', () => - gulp.src('./node_modules/phosphor-icons/src/fonts/*').pipe(gulp.dest('./built/_client_dist_/phosphor/')) -); - gulp.task('copy:client:locales', cb => { fs.mkdirSync('./built/_client_dist_/locales', { recursive: true }); @@ -59,7 +55,7 @@ gulp.task('build:backend:style', () => { }); gulp.task('build', gulp.parallel( - 'copy:client:locales', 'copy:backend:views', 'copy:backend:custom', 'build:backend:script', 'build:backend:style', 'copy:client:fonts', 'copy:client:phosphor' + 'copy:client:locales', 'copy:backend:views', 'copy:backend:custom', 'build:backend:script', 'build:backend:style', 'copy:client:fonts' )); gulp.task('default', gulp.task('build')); diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index fc29623ddc..844cfb5d56 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -1027,27 +1027,6 @@ _time: minute: "د" hour: "سا" day: "ي" -_tutorial: - title: "How to use Calckey" - step1_1: "Welcome!" - step1_2: "Let's get you set up. You'll be up and running in no time!" - step2_1: "First, please fill out your profile." - step2_2: "Providing some information about who you are will make it easier for others to tell if they want to see your notes or follow you." - step3_1: "Now time to follow some people!" - step3_2: "Your home and social timelines are based off of who you follow, so try following a couple accounts to get started.\nClick the plus circle on the top right of a profile to follow them." - step4_1: "Let's get you out there." - step4_2: "For your first post, some people like to made a {introduction} post or a simple \"Hello world!\"" - step5_1: "Timelines, timelines everywhere!" - step5_2: "Your instance has {timelines} different timelines enabled." - step5_3: "The Home {icon} timeline is where you can see posts from your followers." - step5_4: "The Local {icon} timeline is where you can see posts from everyone else on this instance." - step5_5: "The Recommended {icon} timeline is where you can see posts from instances the admins recommend." - step5_6: "The Social {icon} timeline is where you can see posts from friends of your followers." - step5_7: "The Global {icon} timeline is where you can see posts from every other connected instance." - step6_1: "So, what is this place?" - step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse, an interconnected network of thousands of servers, called \"instances\"." - step6_3: "Each server works in different ways, and not all servers run Calckey. This one does though! It's a bit complicated, but you'll get the hang of it in no time." - step6_4: "Now go, explore, and have fun!" _2fa: alreadyRegistered: "سجلت سلفًا جهازًا للاستيثاق بعاملين." registerDevice: "سجّل جهازًا جديدًا" diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index 3ed6e53aa6..8a9358e2a1 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -1108,27 +1108,6 @@ _time: minute: "মিনিট" hour: "ঘণ্টা" day: "দিন" -_tutorial: - title: "How to use Calckey" - step1_1: "Welcome!" - step1_2: "Let's get you set up. You'll be up and running in no time!" - step2_1: "First, please fill out your profile." - step2_2: "Providing some information about who you are will make it easier for others to tell if they want to see your notes or follow you." - step3_1: "Now time to follow some people!" - step3_2: "Your home and social timelines are based off of who you follow, so try following a couple accounts to get started.\nClick the plus circle on the top right of a profile to follow them." - step4_1: "Let's get you out there." - step4_2: "For your first post, some people like to made a {introduction} post or a simple \"Hello world!\"" - step5_1: "Timelines, timelines everywhere!" - step5_2: "Your instance has {timelines} different timelines enabled." - step5_3: "The Home {icon} timeline is where you can see posts from your followers." - step5_4: "The Local {icon} timeline is where you can see posts from everyone else on this instance." - step5_5: "The Recommended {icon} timeline is where you can see posts from instances the admins recommend." - step5_6: "The Social {icon} timeline is where you can see posts from friends of your followers." - step5_7: "The Global {icon} timeline is where you can see posts from every other connected instance." - step6_1: "So, what is this place?" - step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse, an interconnected network of thousands of servers, called \"instances\"." - step6_3: "Each server works in different ways, and not all servers run Calckey. This one does though! It's a bit complicated, but you'll get the hang of it in no time." - step6_4: "Now go, explore, and have fun!" _2fa: alreadyRegistered: "আপনি ইতিমধ্যে একটি 2-ফ্যাক্টর অথেনটিকেশন ডিভাইস নিবন্ধন করেছেন৷" registerDevice: "নতুন ডিভাইস নিবন্ধন করুন" diff --git a/locales/ca-ES.yml b/locales/ca-ES.yml index f329275191..24e4b6d7d1 100644 --- a/locales/ca-ES.yml +++ b/locales/ca-ES.yml @@ -1,7 +1,8 @@ ---- _lang_: "Català" -headlineMisskey: "Una xarxa connectada per notes" -introMisskey: "Benvingut! Misskey és un servei de microblogging descentralitzat de codi obert.\nCrea \"notes\" per compartir els teus pensaments amb tots els que t'envolten. 📡\nAmb \"reaccions\", també pots expressar ràpidament els teus sentiments sobre les notes de tothom. 👍\nExplorem un món nou! 🚀" +headlineMisskey: "Una xarxa social de codi obert, descentralitzada i gratuita per\ + \ sempre \U0001F680" +introMisskey: "Benvinguts! Calckey es una plataforma social de codi obert, descentralitzada\ + \ i gratuita per sempre! \U0001F680" monthAndDay: "{day}/{month}" search: "Cercar" notifications: "Notificacions" @@ -13,43 +14,44 @@ ok: "OK" gotIt: "Ho he entès!" cancel: "Cancel·lar" enterUsername: "Introdueix el teu nom d'usuari" -renotedBy: "Resignat per {usuari}" -noNotes: "Cap nota" +renotedBy: "Resignat per {user}" +noNotes: "Cap publicació" noNotifications: "Cap notificació" -instance: "Instàncies" +instance: "Instància" settings: "Preferències" basicSettings: "Configuració bàsica" -otherSettings: "Configuració avançada" -openInWindow: "Obrir en una nova finestra" +otherSettings: "Altres opcions" +openInWindow: "Obrir en una finestra nova" profile: "Perfil" timeline: "Línia de temps" noAccountDescription: "Aquest usuari encara no ha escrit la seva biografia." login: "Iniciar sessió" -loggingIn: "Identificant-se" -logout: "Tancar la sessió" +loggingIn: "Iniciant sessió" +logout: "Tancar sessió" signup: "Registrar-se" uploading: "Pujant..." save: "Desar" users: "Usuaris" addUser: "Afegir un usuari" -favorite: "Afegir a preferits" +favorite: "Afegir a favorits" favorites: "Favorits" -unfavorite: "Eliminar dels preferits" -favorited: "Afegit als preferits." -alreadyFavorited: "Ja s'ha afegit als preferits." -cantFavorite: "No s'ha pogut afegir als preferits." +unfavorite: "Eliminar de favorits" +favorited: "Afegit a favorits." +alreadyFavorited: "Ja s'ha afegit a favorits." +cantFavorite: "No s'ha pogut afegir a favorits." pin: "Fixar al perfil" -unpin: "Para de fixar del perfil" -copyContent: "Copiar el contingut" -copyLink: "Copiar l'enllaç" -delete: "Eliminar" -deleteAndEdit: "Esborrar i editar" -deleteAndEditConfirm: "Estàs segur que vols suprimir aquesta nota i editar-la? Perdràs totes les reaccions, notes i respostes." -addToList: "Afegir a una llista" +unpin: "Deixar de fixar al perfil" +copyContent: "Còpia el contingut" +copyLink: "Còpia l'enllaç" +delete: "Esborra" +deleteAndEdit: "Esborrar i edita" +deleteAndEditConfirm: "Estàs segur que vols esborrar aquesta nota i editar-la? Perdràs\ + \ totes les reaccions, resignats i respostes." +addToList: "Afegir a la llista" sendMessage: "Enviar un missatge" -copyUsername: "Copiar nom d'usuari" -searchUser: "Cercar usuaris" -reply: "Respondre" +copyUsername: "Còpia nom d'usuari" +searchUser: "Cercar un usuari" +reply: "Respon" loadMore: "Carregar més" showMore: "Veure més" youGotNewFollower: "t'ha seguit" @@ -57,20 +59,22 @@ receiveFollowRequest: "Sol·licitud de seguiment rebuda" followRequestAccepted: "Sol·licitud de seguiment acceptada" mention: "Menció" mentions: "Mencions" -directNotes: "Notes directes" -importAndExport: "Importar / Exportar" +directNotes: "Missatges directes" +importAndExport: "Importar / Exportar Dades" import: "Importar" export: "Exportar" files: "Fitxers" -download: "Baixar" -driveFileDeleteConfirm: "Estàs segur que vols suprimir el fitxer \"{name}\"? Les notes associades a aquest fitxer adjunt també se suprimiran." +download: "Descarregar" +driveFileDeleteConfirm: "Estàs segur que vols suprimir el fitxer \"{name}\"? Les publicacions\ + \ associades a aquest fitxer adjunt també es suprimiran." unfollowConfirm: "Estàs segur que vols deixar de seguir {name}?" -exportRequested: "Has sol·licitat una exportació. Això pot trigar una estona. S'afegirà a la teva unitat un cop completat." +exportRequested: "Has sol·licitat una exportació. Això pot trigar una estona. S'afegirà\ + \ al teu Disc un cop completada." importRequested: "Has sol·licitat una importació. Això pot trigar una estona." lists: "Llistes" noLists: "No tens cap llista" -note: "Nota" -notes: "Notes" +note: "Publicació" +notes: "Publicacions" following: "Seguint" followers: "Seguidors" followsYou: "Et segueix" @@ -79,10 +83,13 @@ manageLists: "Gestionar les llistes" error: "Error" somethingHappened: "S'ha produït un error" retry: "Torna-ho a intentar" -pageLoadError: "S'ha produït un error en carregar la pàgina" -pageLoadErrorDescription: "Això normalment es deu a errors de xarxa o a la memòria cau del navegador. Prova d'esborrar la memòria cau i torna-ho a provar després d'esperar una estona." +pageLoadError: "Alguna cosa a sortit malament al carregar la pàgina." +pageLoadErrorDescription: "Això normalment es deu a errors de xarxa o a la memòria\ + \ cau del navegador. Prova d'esborrar la memòria cau i torna-ho a provar després\ + \ d'esperar una estona." serverIsDead: "Aquest servidor no respon. Espera una estona i torna-ho a provar." -youShouldUpgradeClient: "Per veure aquesta pàgina, actualitzeu-la per actualitzar el vostre client." +youShouldUpgradeClient: "Per veure aquesta pàgina, actualitzeu-la per actualitzar\ + \ el vostre client." enterListName: "Introdueix un nom per a la llista" privacy: "Privadesa" makeFollowManuallyApprove: "Les sol·licituds de seguiment requereixen aprovació" @@ -93,13 +100,13 @@ followRequests: "Sol·licituds de seguiment" unfollow: "Deixar de seguir" followRequestPending: "Sol·licituds de seguiment pendents" enterEmoji: "Introduir un emoji" -renote: "Renotar" -unrenote: "Anul·lar renota" -renoted: "Renotat." -cantRenote: "Aquesta publicació no pot ser renotada." -cantReRenote: "Impossible renotar una renota." +renote: "Impulsà" +unrenote: "Anul·lar impuls" +renoted: "Impulsat." +cantRenote: "Aquesta publicació no pot ser impulsada." +cantReRenote: "No es pot impulsar un impuls." quote: "Citar" -pinnedNote: "Nota fixada" +pinnedNote: "Publicació fixada" pinned: "Fixar al perfil" you: "Tu" clickToShow: "Fes clic per mostrar" @@ -107,8 +114,9 @@ sensitive: "NSFW" add: "Afegir" reaction: "Reaccions" reactionSetting: "Reaccions a mostrar al selector de reaccions" -reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, prem \"+\" per afegir." -rememberNoteVisibility: "Recorda la configuració de visibilitat de les notes" +reactionSettingDescription2: "Arrossega per reordenar, fes clic per suprimir, prem\ + \ \"+\" per afegir." +rememberNoteVisibility: "Recorda la configuració de visibilitat de les publicacions" attachCancel: "Eliminar el fitxer adjunt" markAsSensitive: "Marcar com a NSFW" unmarkAsSensitive: "Deixar de marcar com a sensible" @@ -122,7 +130,7 @@ unsuspend: "Deixa de suspendre" instances: "Instàncies" remove: "Eliminar" nsfw: "NSFW" -pinnedNotes: "Nota fixada" +pinnedNotes: "Publicació fixada" userList: "Llistes" smtpUser: "Nom d'usuari" smtpPass: "Contrasenya" @@ -139,9 +147,9 @@ _mfm: _theme: keys: mention: "Menció" - renote: "Renotar" + renote: "Impulsar" _sfx: - note: "Notes" + note: "Posts" notification: "Notificacions" _2fa: step2Url: "També pots inserir aquest enllaç i utilitzes una aplicació d'escriptori:" @@ -183,15 +191,487 @@ _notification: _types: follow: "Seguint" mention: "Menció" - renote: "Renotar" + renote: "Impulsos" quote: "Citar" reaction: "Reaccions" _actions: reply: "Respondre" - renote: "Renotar" + renote: "Impulsos" _deck: _columns: notifications: "Notificacions" tl: "Línia de temps" list: "Llistes" mentions: "Mencions" +blockConfirm: Estás segur que vols bloquejar aquest compte? +unsuspendConfirm: Estás segur que vols treure la suspensió d'aquesta compte? +unblockConfirm: Estás segur que vols treure el bloqueig d'aquesta compte? +suspendConfirm: Estás segur que vols suspendre aquesta compte? +selectList: Selecciona una llista +selectAntenna: Selecciona una antena +selectWidget: Selecciona un giny +editWidgets: Edita ginys +editWidgetsExit: Fet +customEmojis: Emoji personalitzat +cacheRemoteFilesDescription: Quant aquesta opció es deshabilitada, els fitxers remots + es carregant directament de l'instància remota. Deshabilitar això farà que baixi + l'ús d'emmagatzematge, però incrementa el tràfic, perquè les previsualitzacions + no es generarán. +flagAsBot: Marca aquest compte com un bot +flagAsBotDescription: Activa aquesta opció si aquest compte és controlat per un programa. + Si s'activa, això actuarà com una bandera per a altres desenvolupadors i prevenir + cadenes de interaccions infinites amb altres bots a més d'ajustar els sistemes interns + de Calckey per tractar aquest compte com un bot. +flagAsCat: Ets un gat? 🐱 +flagShowTimelineReplies: Mostrar respostes a la línea de temps +flagAsCatDescription: Guanyaràs unes orelles de gat i parlares com un gat! +flagShowTimelineRepliesDescription: Mostrará respostes d'usuaris a notes d'altres + usuaris si s'activa. +general: General +autoAcceptFollowed: Aprova automàticament les peticions de seguiment d'usuaris que + segueixes +accountMoved: "L'usuari s'ha mogut a un compte nou:" +addAccount: Afegir compte +loginFailed: No s'ha pogut iniciar sessió +showOnRemote: Veure a l'instància remota +wallpaper: Fons de pantalla +setWallpaper: Estableix fons de pantalla +removeWallpaper: Esborra fons de pantalla +followConfirm: Segur que vols seguir a l'usuari {name}? +proxyAccount: Compte proxy +proxyAccountDescription: Un compte proxy es un compte que actua com un seguidor remot + per a usuaris sota determinades condicions. Per exemple, quant un usuari afegeix + un usuari remot a la llista, l'activitat de l'usuari remot no serà entregada a l'instància + si cap usuari local el segueix, així el compte proxy el seguirà. +host: Amfitrió +selectUser: Selecciona un usuari +latestStatus: Últim estat +storageUsage: Ús del emmagatzematge +metadata: Metadata +withNFiles: '{n} fitxer(s)' +monitor: Seguiment +software: Programari +version: Versió +jobQueue: Cua de Feina +cpuAndMemory: CPU i Memòria +network: Xarxa +disk: Disc +instanceInfo: Informació de l'instància +statistics: Estadístiques +clearCachedFiles: Neteja memòria cau +clearQueueConfirmText: Qualsevol nota que continuï a la cua sense entrega no será + federada. Normalment aquesta operació no es necessària. +clearCachedFilesConfirm: Segur que vols esborrar els fitxers remots de la memòria + cau? +blockedUsers: Usuaris blocats +noUsers: No hi han usuaris +editProfile: Editar perfil +noteDeleteConfirm: Segur que vols esborrar aquesta nota? +pinLimitExceeded: No pots fixar més notes +muteAndBlock: Silenciats i Bloquejats +mutedUsers: Usuaris silenciats +done: Fet +preview: Vista prèvia +default: Per defecte +intro: La instalació de Calckey a acabat! Si us plau crea un compte d'usuari. +processing: Processant... +noCustomEmojis: No hi ha emoji +noJobs: No hi han feines +federating: Federant +blocked: Bloquejat +subscribing: Subscrivint +publishing: Publicant +notResponding: Sense resposta +instanceUsers: Usuaris d'aquesta instància +instanceFollowing: Seguint a l'instància +instanceFollowers: Seguidors de l'instància +security: Seguretat +newPasswordRetype: Torna a entrar la nova contrasenya +more: Més! +featured: Destacat +usernameOrUserId: Nom d'usuari o id d'usuari +noSuchUser: No s'ha trobat l'usuari +lookup: Cercar +attachFile: Afegeix un arxiu +currentPassword: Contrasenya actual +newPassword: Nova contrasenya +announcements: Anuncis +imageUrl: URL de la imatge +removed: S'ha esborrat correctament +removeAreYouSure: Segur que vols esborrar "{x}"? +deleteAreYouSure: Segur que vols esborrar "{x}"? +resetAreYouSure: Restablir? Segur? +fromUrl: Des de URL +saved: Desat +messaging: Xat +upload: Pujar +keepOriginalUploading: Desa imatge original +keepOriginalUploadingDescription: Desa la imatge original pujada tal com es. Si es + desactiva, es generarà una versió per mostrar en la web al pujar. +fromDrive: Des de Drive +uploadFromUrl: Puja des de una adreça URL +uploadFromUrlDescription: Adreça URL del fitxer que vols pujar +uploadFromUrlRequested: Pujada demanada +noMoreHistory: S'ha acabat la historia +tos: Termes d'us +start: Començar +startMessaging: Comença un nou xat +manageGroups: Gestiona els grups +nUsersRead: llegit per {n} +agreeTo: Estic d'acord amb {0} +activity: Activitat +home: Inici +remoteUserCaution: L'informació d'usuaris remots pot estar incompleta. +themeForDarkMode: En Mode Fosc fes servir el tema +light: Clar +registeredDate: Data de registre +dark: Fosc +lightThemes: Temes clars +location: Lloc +theme: Temes +themeForLightMode: En Mode Clar fes servir el tema +drive: Disc +selectFile: Tria un fitxer +selectFiles: Tria fitxers +darkThemes: Temes foscos +syncDeviceDarkMode: Sincronitza el Mode Fosc amb la configuració del teu dispositiu +fileName: Nom del fitxer +createFolder: Crea una carpeta +renameFolder: Posa un nom nou a aquesta carpeta +deleteFolder: Esborra aquesta carpeta +selectFolder: Tria una carpeta +selectFolders: Tria carpetes +renameFile: Canvia el nom del fitxer +folderName: Nom de la carpeta +inputNewFolderName: Escriu un nou nom per la carpeta +addFile: Afegeix un fitxer +emptyDrive: El teu Disc és buit +emptyFolder: Aquesta carpeta és buida +unableToDelete: No es pot esborrar +inputNewFileName: Escriu un nou nom per al fitxer +inputNewDescription: Escriu una nova descripció +circularReferenceFolder: La carpeta de destí es una subcarpeta de la carpeta que vols + moure. +hasChildFilesOrFolders: Degut a que aquesta carpeta no es buida, no es pot esborrar. +whenServerDisconnected: Quant es perd la conexió amb el servidor +disconnectedFromServer: S'ha perdut la conexió al servidor +reload: Torna a carregar +avatar: Avatar +banner: Banner +doNothing: Ignora +reloadConfirm: Vols tornar a carregar la línea temporal? +watch: Veure +maintainerName: Administrador +maintainerEmail: Correu electrònic de l'administrador +instanceName: Nom de l'instància +instanceDescription: Descripció de l'instància +today: Avui +dayX: '{day}' +tosUrl: Adreça URL dels terminis d'ús +thisYear: Any +thisMonth: Mes +integration: Integracions +driveCapacityPerRemoteAccount: Capacitat del Disc per usuari remot +inMb: En megabytes +iconUrl: Adreça URL de la icona +enableRegistration: Activa el registre d'usuaris nous +invite: Convidar +driveCapacityPerLocalAccount: Capacitat del Disc per usuari local +bannerUrl: Adreça URL del banner +backgroundImageUrl: Adreça URL del fons de pantalla +basicInfo: Informació bàsica +pinnedPages: Pàgines fixades +pinnedUsersDescription: Llista de noms d'usuaris per fixar a la pestanya "Explorar" + Un nom per línea. +pinnedPagesDescription: Introdueix la ruta a les pàgines que vols fixar a la página + principal d'aquesta instància, una ruta per línea. +pinnedUsers: Usuaris fixats +enableHcaptcha: Activa hCaptcha +hcaptchaSiteKey: Clau del lloc +hcaptchaSecretKey: Clau secreta +recaptcha: reCAPTCHA +enableGlobalTimeline: Activa la línea de temps global +disablingTimelinesInfo: Els Administradors i Moderadors sempre tenen accés a totes + les líneas temporals, inclòs si hi són desactivades. +showLess: Tanca +clearQueue: Neteja cua +uploadFromUrlMayTakeTime: Pot trigar un temps fins que la pujada es completi. +noThankYou: No, gràcies +addInstance: Afegeix una instància +emoji: Emoji +emojis: Emoji +emojiName: Nom del emoji +emojiUrl: URL del emoji +addEmoji: Afegir +settingGuide: Configuració recomenada +searchWith: 'Buscar: {q}' +youHaveNoLists: No tens cap llista +flagSpeakAsCat: Parla com un gat +selectInstance: Selecciona una instància +flagSpeakAsCatDescription: Les teves notes es transformaran en miols quant estiguis + en mode gat +recipient: Destinatari(s) +annotation: Comentaris +blockedInstances: Instàncies Bloquejades +blockedInstancesDescription: Llista les adreces de les instàncies que vols bloquejar. + Les instàncies de la llista no podrán comunicarse amb aquesta instància. +hiddenTags: Etiquetes Ocultes +hiddenTagsDescription: 'Llista de les etiquetes (sense el #) que vulguis amagar de + les tendències i el explorador. Les etiquetes amagades es poden descobrir per altres + mitjans.' +noInstances: No hi han instàncies +defaultValueIs: 'Per defecte: {value}' +suspended: Suspès +all: Tot +changePassword: Canvia la contrasenya +clearQueueConfirmTitle: Segur que vols netejar la cua? +retypedNotMatch: Els camps no coincideixen. +normal: Normal +monthX: '{month}' +enableRecaptcha: Activa reCAPTCHA +recaptchaSiteKey: Clau del lloc +recaptchaSecretKey: Clau secreta +avoidMultiCaptchaConfirm: Fent servir diferents sistemes de Captcha pot causar interferències + entre ells. Vols desactivar els altres sistemes que es troben activats? Si vols + deixar-los activats fes clic a cancelar. +antennas: Antenes +enableEmojiReactions: Activa reaccions amb emojis +blockThisInstance: Bloqueja aquesta instància +registration: Registre +showEmojisInReactionNotifications: Mostra els emojis a les notificacions de les reaccions +renoteMute: Silencia les renotas +renoteUnmute: Treu el silenci a les renotas +cacheRemoteFiles: Fitxers remots a la memoria cau +federation: Federació +registeredAt: Registrat a +latestRequestSentAt: Última petició enviada +latestRequestReceivedAt: Última petició rebuda +charts: Gràfics +perHour: Per Hora +perDay: Per Dia +stopActivityDelivery: Para d'enviar activitats +operations: Operacions +explore: Explorar +messageRead: Llegir +images: Imatges +birthday: Aniversari +yearsOld: '{age} anys' +copyUrl: Copiar l'adreça URL +rename: Renombrar +unwatch: Deixa de veure +accept: Acceptar +reject: Rebutja +yearX: '{year}' +pages: Pàgines +disconnectService: Desconnectar +connectService: Connectar +enableLocalTimeline: Activa la línea de temps local +enableRecommendedTimeline: Activa la línea de temps de recomanats +pinnedClipId: ID del clip que vols fixar +hcaptcha: hCaptcha +manageAntennas: Gestiona les Antenes +name: Nom +notesAndReplies: Articles i respostes +silence: Posa en silenci +withFiles: Amb fitxers +popularUsers: Usuaris populars +exploreUsersCount: Hi han {count} usuaris +exploreFediverse: Explora el Fesiverse +popularTags: Etiquetes populars +about: Sobre +recentlyUpdatedUsers: Usuaris actius fa poc +recentlyRegisteredUsers: Usuaris registrats fa poc +recentlyDiscoveredUsers: Nous suaris descoberts +administrator: Administrador +token: Token +registerSecurityKey: Registra una clau de seguretat +securityKeyName: Nom clau +lastUsed: Feta servir per última vegada +unregister: Anul·lar el registre +passwordLessLogin: Identificació sense contrasenya +share: Comparteix +notFound: No s'ha trobat +newPasswordIs: La nova contrasenya és "{password}" +notFoundDescription: No es pot trobar cap pàgina que correspongui a aquesta adreça + URL. +uploadFolder: Carpeta per defecte per pujar arxius +cacheClear: Netejar la memòria cau +markAsReadAllNotifications: Marca totes les notificacions com llegides +markAsReadAllUnreadNotes: Marca totes les publicacions com a llegides +markAsReadAllTalkMessages: Marca tots els missatges com llegits +help: Ajuda +inputMessageHere: Escriu aquí el missatge +close: Tancar +group: Grup +groups: Grups +createGroup: Crea un grup +ownedGroups: Grups que et pertanyen +joinedGroups: Grups als que t'has unit +groupName: Nom del grup +members: Membres +transfer: Transferir +messagingWithUser: Conversa privada +title: Títol +text: Text +enable: Activar +next: Següent +retype: Torna a entrar +noteOf: Publicat per {user} +inviteToGroup: Invitar a un grup +quoteAttached: Cita +quoteQuestion: Adjuntar com a cita? +noMessagesYet: Encara no hi han missatges +signinRequired: Si us plau registrat o inicia sessió per continuar +invitations: Invitacions +invitationCode: Codi d'invitació +checking: Comprovant... +usernameInvalidFormat: Pots fer servir lletres en majúscules o minúscules, nombres + i guions baixos. +tooShort: Massa curt +tooLong: Massa llarg +weakPassword: Contrasenya amb seguretat feble +strongPassword: Contrasenya amb seguretat forta +passwordMatched: Coincidències +signinWith: Inicieu sessió com {x} +signinFailed: No es pot iniciar sessió. El nom d'usuari o la contrasenya són incorrectes. +or: O +language: Idioma +uiLanguage: Idioma de la interfície d'usuari +groupInvited: T'han invitat a un grup +aboutX: Sobre {x} +youHaveNoGroups: No tens grups +disableDrawer: No facis servir els menús amb estil de calaix +noHistory: No ha historial disponible +signinHistory: Historial d'inicis de sessió +disableAnimatedMfm: Desactiva les animacions amb MFM +doing: Processant... +category: Categoría +existingAccount: El compte ja existeix +regenerate: Regenerar +docSource: Font d'aquest document +createAccount: Crear compte +fontSize: Mida del text +noFollowRequests: No tens cap sol·licitud de seguiment per aprovar +openImageInNewTab: Obre les imatges en una pestanya nova +dashboard: Panell +local: Local +remote: Remot +total: Total +weekOverWeekChanges: Canvis d'ençà la passada setmana +dayOverDayChanges: Canvis d'ençà ahir +appearance: Aparença +clientSettings: Configuració del client +accountSettings: Configuració del compte +promotion: Promogut +promote: Promoure +numberOfDays: Nombre de dies +objectStorageBaseUrl: Adreça URL base +hideThisNote: Amaga aquest article +showFeaturedNotesInTimeline: Mostra els articles destacats a la línea de temps +objectStorage: Emmagatzematge d'objectes +useObjectStorage: Fes servir l'emmagatzema d'objectes +expandTweet: Amplia el tuit +themeEditor: Editor de temes +description: Descripció +leaveConfirm: Hi han canvis que no s'han desat. Els vols descartar? +manage: Administració +plugins: Afegits +preferencesBackups: Preferències de còpies de seguretat +undeck: Treure el Deck +useBlurEffectForModal: Fes servir efectes de difuminació en les finestres modals +useFullReactionPicker: Fes servir el selector de reaccions a tamany complert +deck: Deck +width: Amplada +generateAccessToken: Genera un token d'accés +medium: Mitja +small: Petit +permission: Permisos +enableAll: Activa tots +tokenRequested: Garantir accés al compte +pluginTokenRequestedDescription: Aquest afegit podrà fer servir els permisos configurats + aquí. +emailServer: Servidor de correu electrònic +notificationType: Tipus de notificació +edit: Editar +emailAddress: Adreça de Correu electrònic +smtpConfig: Configuració del servidor SMTP +smtpHost: Host +enableEmail: Activa la distribució de correu electrònic +smtpPort: Port +emailConfigInfo: Fet servir per confirmar les adreçats de correu electrònic al registrar-se + o si s'oblida la contrasenya +email: Correu electrònic +smtpSecure: Fes servir SSL/TLS implícit per connectar-se per SMTP +emptyToDisableSmtpAuth: Deixa el nom d'usuari i la contrasenya sense emplenar per + desactivar la verificació SMTP +smtpSecureInfo: Desactiva això quant facis servir STARTTLS +testEmail: Envia un correu electrònic de verificació +wordMute: Silenciar paraules +regexpError: Error a la Expressió Regular +regexpErrorDescription: 'Hi ha un error a la expressió regular a la línea {line} de + la teva {tab} de paraules silenciades:' +userSaysSomething: '{name} va dir alguna cosa' +instanceMute: Silenciar instàncies +logs: Registres +copy: Copiar +delayed: Retardat +metrics: Mètriques +overview: Vista general +database: Base de dades +regenerateLoginToken: Regenera el token d'inici de sessió +reduceUiAnimation: Redueix les animacions de la UI +messagingWithGroup: Conversa en grup +invites: Invitacions +unavailable: No disponible +newMessageExists: Tens nous missatges +onlyOneFileCanBeAttached: Només pots adjuntar un fitxer per missatge +normalPassword: Contrasenya amb seguretat mitjana +passwordNotMatched: No hi han coincidències +useOsNativeEmojis: Fes servir els emojis per defecte del Sistema Operatiu +joinOrCreateGroup: Fes que et convidin a un grup o crea el teu propi. +objectStorageBaseUrlDesc: "Es l'adreça URL que serveix com a referència. Específica\ + \ la adreça URL del CDN o Proxy si fas servir.\nPer fer servir S3 'https://.s3.amazonaws.com'\ + \ i per GCS o serveis semblants 'https://storage.googleapis.com/', etc." +height: Alçada +large: Gran +notificationSetting: Preferències de notificacions +makeActive: Activar +notificationSettingDesc: Tria el tipus de notificació que es veure. +notifyAntenna: Notificar noves articles +withFileAntenna: Només articles amb fitxers +enableServiceworker: Activa les notificacions push per al teu navegador +antennaUsersDescription: Escriu un nom d'usuari per línea +antennaInstancesDescription: Escriu la adreça d'una instància per línea +tags: Etiquetes +antennaSource: Font de la antena +antennaKeywords: Paraules claus a escolta +antennaExcludeKeywords: Paraules clau a excluir +antennaKeywordsDescription: Separades amb espais per fer una condició AND i amb una + línea nova per fer una condició OR. +caseSensitive: Sensible a majúscules i minúscules +withReplies: Inclou respostes +connectedTo: Aquest(s) compte(s) estan connectats +silenceConfirm: Segur que vols posa en silenci aquest usuari? +unsilence: Desfés posar en silenci +unsilenceConfirm: Segur que vols treure el silenci a aquest usuari? +aboutMisskey: Sobre Calckey +twoStepAuthentication: Autentificació de dos factors +moderator: Moderador +moderation: Moderació +available: Disponible +tapSecurityKey: Escriu la teva clau de seguretat +nUsersMentioned: Esmentat per {n} usuari(s) +securityKey: Clau de seguretat +resetPassword: Restablir contrasenya +describeFile: Afegeix un subtítol +enterFileDescription: Entra un subtítol +author: Autor +disableAll: Desactiva tots +userSaysSomethingReason: '{name} va dir {reason}' +display: Visualització +channel: Canals +create: Crear +useGlobalSetting: Fes servir els ajustos globals +useGlobalSettingDesc: Si s'activa, es faran servir els ajustos de notificacions del + teu compte. Si es desactiva , es poden fer configuracions individuals. +other: Altres diff --git a/locales/de-DE.yml b/locales/de-DE.yml index a51bc0c486..81098fe3f5 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -1,7 +1,10 @@ ---- _lang_: "Deutsch" headlineMisskey: "Ein durch Posts verbundenes Netzwerk" -introMisskey: "Willkommen! Calckey ist eine dezentralisierte Open-Source Microblogging-Platform.\nVerfasse „Posts“ um mitzuteilen, was gerade passiert oder um Ereignisse mit anderen zu teilen. 📡\nMit „Reaktionen“ kannst du außerdem schnell deine Gefühle über Posts anderer Benutzer zum Ausdruck bringen. 👍\nEine neue Welt wartet auf dich! 🚀" +introMisskey: "Willkommen! Calckey ist eine dezentralisierte Open-Source Microblogging-Platform.\n\ + Verfasse „Posts“ um mitzuteilen, was gerade passiert oder um Ereignisse mit anderen\ + \ zu teilen. \U0001F4E1\nMit „Reaktionen“ kannst du außerdem schnell deine Gefühle\ + \ über Posts anderer Benutzer zum Ausdruck bringen. \U0001F44D\nEine neue Welt wartet\ + \ auf dich! \U0001F680" monthAndDay: "{day}.{month}." search: "Suchen" notifications: "Benachrichtigungen" @@ -44,7 +47,8 @@ copyContent: "Inhalt kopieren" copyLink: "Link kopieren" delete: "Löschen" deleteAndEdit: "Löschen und Bearbeiten" -deleteAndEditConfirm: "Möchtest du diese Notiz wirklich löschen und bearbeiten? Alle Reaktionen, Renotes und Antworten dieser Notiz werden verloren gehen." +deleteAndEditConfirm: "Möchtest du diese Notiz wirklich löschen und bearbeiten? Alle\ + \ Reaktionen, Renotes und Antworten dieser Notiz werden verloren gehen." addToList: "Zu Liste hinzufügen" sendMessage: "Nachricht senden" copyUsername: "Benutzernamen kopieren" @@ -64,10 +68,13 @@ import: "Import" export: "Export" files: "Dateien" download: "Herunterladen" -driveFileDeleteConfirm: "Möchtest du die Datei „{name}“ wirklich löschen? Notizen mit dieser Datei werden ebenso verschwinden." +driveFileDeleteConfirm: "Möchtest du die Datei „{name}“ wirklich löschen? Notizen\ + \ mit dieser Datei werden ebenso verschwinden." unfollowConfirm: "Möchtest du {name} nicht mehr folgen?" -exportRequested: "Du hast einen Export angefragt. Dies kann etwas Zeit in Anspruch nehmen. Sobald der Export abgeschlossen ist, wird er deiner Drive hinzugefügt." -importRequested: "Du hast einen Import angefragt. Dies kann etwas Zeit in Anspruch nehmen." +exportRequested: "Du hast einen Export angefragt. Dies kann etwas Zeit in Anspruch\ + \ nehmen. Sobald der Export abgeschlossen ist, wird er deiner Drive hinzugefügt." +importRequested: "Du hast einen Import angefragt. Dies kann etwas Zeit in Anspruch\ + \ nehmen." lists: "Listen" noLists: "Keine Listen gefunden" note: "Notiz" @@ -81,9 +88,13 @@ error: "Fehler" somethingHappened: "Ein Fehler ist aufgetreten" retry: "Wiederholen" pageLoadError: "Die Seite konnte nicht geladen werden." -pageLoadErrorDescription: "Dieser Fehler wird meist durch Netzwerkfehler oder den Browser-Cache verursacht. Bitte leere den Cache oder versuche es nach einiger Zeit erneut." -serverIsDead: "Dieser Server antwortet nicht. Bitte warte einen Moment und versuche es dann erneut." -youShouldUpgradeClient: "Bitte aktualisiere diese Seite, um eine neuere Version deines Clients zu verwenden." +pageLoadErrorDescription: "Dieser Fehler wird meist durch Netzwerkfehler oder den\ + \ Browser-Cache verursacht. Bitte leere den Cache oder versuche es nach einiger\ + \ Zeit erneut." +serverIsDead: "Dieser Server antwortet nicht. Bitte warte einen Moment und versuche\ + \ es dann erneut." +youShouldUpgradeClient: "Bitte aktualisiere diese Seite, um eine neuere Version deines\ + \ Clients zu verwenden." enterListName: "Listennamen eingeben" privacy: "Privatsphäre" makeFollowManuallyApprove: "Follow-Anfragen benötigen Bestätigung" @@ -108,7 +119,8 @@ sensitive: "NSFW" add: "Hinzufügen" reaction: "Reaktionen" reactionSetting: "In der Reaktionsauswahl anzuzeigende Reaktionen" -reactionSettingDescription2: "Ziehe um Anzuordnen, klicke um zu löschen, drücke „+“ um hinzuzufügen" +reactionSettingDescription2: "Ziehe um Anzuordnen, klicke um zu löschen, drücke „+“\ + \ um hinzuzufügen" rememberNoteVisibility: "Notizsichtbarkeit merken" attachCancel: "Anhang entfernen" markAsSensitive: "Als NSFW markieren" @@ -138,13 +150,21 @@ emojiUrl: "Emoji-URL" addEmoji: "Emoji hinzufügen" settingGuide: "Empfohlene Einstellung" cacheRemoteFiles: "Dateien von fremden Instanzen im Cache speichern" -cacheRemoteFilesDescription: "Ist diese Einstellung deaktiviert, so werden Dateien fremder Instanzen direkt von dort geladen. Hierdurch wird Speicherplatz auf diesem Server gespart, aber durch fehlende Generierung von Vorschaubildern mehr Bandbreite verwendet." +cacheRemoteFilesDescription: "Ist diese Einstellung deaktiviert, so werden Dateien\ + \ fremder Instanzen direkt von dort geladen. Hierdurch wird Speicherplatz auf diesem\ + \ Server gespart, aber durch fehlende Generierung von Vorschaubildern mehr Bandbreite\ + \ verwendet." flagAsBot: "Als Bot markieren" -flagAsBotDescription: "Aktiviere diese Option, falls dieses Benutzerkonto durch ein Programm gesteuert wird. Falls aktiviert, agiert es als Flag für andere Entwickler zur Verhinderung von endlosen Kettenreaktionen mit anderen Bots und lässt Misskeys interne Systeme dieses Benutzerkonto als Bot behandeln." +flagAsBotDescription: "Aktiviere diese Option, falls dieses Benutzerkonto durch ein\ + \ Programm gesteuert wird. Falls aktiviert, agiert es als Flag für andere Entwickler\ + \ zur Verhinderung von endlosen Kettenreaktionen mit anderen Bots und lässt Misskeys\ + \ interne Systeme dieses Benutzerkonto als Bot behandeln." flagAsCat: "Als Katze markieren" -flagAsCatDescription: "Aktiviere diese Option, um dieses Benutzerkonto als Katze zu markieren." +flagAsCatDescription: "Aktiviere diese Option, um dieses Benutzerkonto als Katze zu\ + \ markieren." flagShowTimelineReplies: "Antworten in der Chronik anzeigen" -flagShowTimelineRepliesDescription: "Ist diese Option aktiviert, so werden Antworten von Benutzern auf die Notizen anderer Benutzer in der Chronik angezeigt." +flagShowTimelineRepliesDescription: "Ist diese Option aktiviert, so werden Antworten\ + \ von Benutzern auf die Notizen anderer Benutzer in der Chronik angezeigt." autoAcceptFollowed: "Follow-Anfragen von Benutzern, denen du folgst, automatisch akzeptieren" addAccount: "Benutzerkonto hinzufügen" loginFailed: "Anmeldung fehlgeschlagen" @@ -156,8 +176,13 @@ removeWallpaper: "Hintergrund entfernen" searchWith: "Suchen: {q}" youHaveNoLists: "Du hast keine Listen" followConfirm: "Möchtest du {name} wirklich folgen?" -proxyAccount: "Proxy-Benutzerkonto" -proxyAccountDescription: "Ein Proxy-Benutzerkonto ist ein Benutzerkonto, das sich für Nutzer unter bestimmten Konditionen wie ein Follower aus einer fremden Instanz verhält. Zum Beispiel wird die Aktivität eines Nutzers aus einer fremden Instanz nicht an diese Instanz übermittelt, falls es keinen Benutzer dieser Instanz gibt, der diesem Nutzer aus fremder Instanz folgt. In diesem Fall folgt stattdessen das Proxy-Benutzerkonto." +proxyAccount: "Proxy-Konto" +proxyAccountDescription: "Ein Proxy-Benutzerkonto ist ein Benutzerkonto, das sich\ + \ für Nutzer unter bestimmten Konditionen wie ein Follower aus einer fremden Instanz\ + \ verhält. Zum Beispiel wird die Aktivität eines Nutzers aus einer fremden Instanz\ + \ nicht an diese Instanz übermittelt, falls es keinen Benutzer dieser Instanz gibt,\ + \ der diesem Nutzer aus fremder Instanz folgt. In diesem Fall folgt stattdessen\ + \ das Proxy-Benutzerkonto." host: "Hostname" selectUser: "Benutzer auswählen" recipient: "Empfänger" @@ -188,11 +213,15 @@ instanceInfo: "Instanzinformationen" statistics: "Statistiken" clearQueue: "Warteschlange leeren" clearQueueConfirmTitle: "Möchtest du die Warteschlange wirklich leeren?" -clearQueueConfirmText: "Hierdurch werden jegliche noch nicht gesendete Notizen nicht förderiert. Normalerweise wird dies nicht benötigt." +clearQueueConfirmText: "Hierdurch werden jegliche noch nicht gesendete Notizen nicht\ + \ förderiert. Normalerweise wird dies nicht benötigt." clearCachedFiles: "Cache leeren" -clearCachedFilesConfirm: "Sollen alle im Cache gespeicherten Dateien von anderen Instanzen wirklich gelöscht werden?" +clearCachedFilesConfirm: "Sollen alle im Cache gespeicherten Dateien von anderen Instanzen\ + \ wirklich gelöscht werden?" blockedInstances: "Blockierte Instanzen" -blockedInstancesDescription: "Gib die Hostnamen der Instanzen, welche blockiert werden sollen, durch Zeilenumbrüche getrennt an. Blockierte Instanzen können mit dieser instanz nicht mehr kommunizieren." +blockedInstancesDescription: "Gib die Hostnamen der Instanzen, welche blockiert werden\ + \ sollen, durch Zeilenumbrüche getrennt an. Blockierte Instanzen können mit dieser\ + \ instanz nicht mehr kommunizieren." muteAndBlock: "Stummschaltungen und Blockierungen" mutedUsers: "Stummgeschaltete Benutzer" blockedUsers: "Blockierte Benutzer" @@ -241,13 +270,15 @@ saved: "Erfolgreich gespeichert" messaging: "Chat" upload: "Hochladen" keepOriginalUploading: "Originalbild speichern" -keepOriginalUploadingDescription: "Speichert das Originalbild so, wie es ist. Ist dies deaktiviert, wird eine Version zum Anzeigen im Internet generiert." +keepOriginalUploadingDescription: "Speichert das Originalbild so, wie es ist. Ist\ + \ dies deaktiviert, wird eine Version zum Anzeigen im Internet generiert." fromDrive: "Aus Drive" fromUrl: "Von einer URL" uploadFromUrl: "Von einer URL hochladen" uploadFromUrlDescription: "URL der hochzuladenden Datei" uploadFromUrlRequested: "Upload angefordert" -uploadFromUrlMayTakeTime: "Es kann eine Weile dauern, bis das Hochladen abgeschlossen ist." +uploadFromUrlMayTakeTime: "Es kann eine Weile dauern, bis das Hochladen abgeschlossen\ + \ ist." explore: "Erkunden" messageRead: "Gelesen" noMoreHistory: "Kein weiterer Verlauf vorhanden" @@ -290,8 +321,10 @@ unableToDelete: "Nicht löschbar" inputNewFileName: "Gib einen neuen Dateinamen ein" inputNewDescription: "Gib eine neue Beschreibung ein" inputNewFolderName: "Gib einen neuen Ordnernamen ein" -circularReferenceFolder: "Der Zielordner ist ein Unterorder des Ordners, den du verschieben möchtest." -hasChildFilesOrFolders: "Dieser Ordner kann nicht gelöscht werden, da er nicht leer ist." +circularReferenceFolder: "Der Zielordner ist ein Unterorder des Ordners, den du verschieben\ + \ möchtest." +hasChildFilesOrFolders: "Dieser Ordner kann nicht gelöscht werden, da er nicht leer\ + \ ist." copyUrl: "URL kopieren" rename: "Umbenennen" avatar: "Profilbild" @@ -324,7 +357,8 @@ connectService: "Verbinden" disconnectService: "Trennen" enableLocalTimeline: "Lokale Chronik aktivieren" enableGlobalTimeline: "Globale Chronik aktivieren" -disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle Chroniken, auch wenn diese deaktiviert sind." +disablingTimelinesInfo: "Administratoren und Moderatoren haben immer Zugriff auf alle\ + \ Chroniken, auch wenn diese deaktiviert sind." registration: "Registrieren" enableRegistration: "Registration neuer Benutzer erlauben" invite: "Einladen" @@ -336,9 +370,11 @@ bannerUrl: "Banner-URL" backgroundImageUrl: "Hintergrundbild-URL" basicInfo: "Grundlegende Informationen" pinnedUsers: "Angeheftete Benutzer" -pinnedUsersDescription: "Gib durch Leerzeichen getrennte Benutzer an, die an die \"Erkunden\"-Seite angeheftet werden sollen." +pinnedUsersDescription: "Gib durch Leerzeichen getrennte Benutzer an, die an die \"\ + Erkunden\"-Seite angeheftet werden sollen." pinnedPages: "Angeheftete Seiten" -pinnedPagesDescription: "Gib durch Leerzeilen getrennte Pfäde zu Seiten an, die an die Startseite dieser Instanz angeheftet werden sollen.\n" +pinnedPagesDescription: "Gib durch Leerzeilen getrennte Pfäde zu Seiten an, die an\ + \ die Startseite dieser Instanz angeheftet werden sollen.\n" pinnedClipId: "ID des anzuheftenden Clips" pinnedNotes: "Angeheftete Notizen" hcaptcha: "hCaptcha" @@ -349,14 +385,18 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "reCAPTCHA aktivieren" recaptchaSiteKey: "Site key" recaptchaSecretKey: "Secret key" -avoidMultiCaptchaConfirm: "Das Verwenden von mehreren Captcha-Systemen kann zu Störungen führen. Sollen die anderen Systeme deaktiviert werden? Durch Abbrechen können mehrere Systeme aktiviert bleiben." +avoidMultiCaptchaConfirm: "Das Verwenden von mehreren Captcha-Systemen kann zu Störungen\ + \ führen. Sollen die anderen Systeme deaktiviert werden? Durch Abbrechen können\ + \ mehrere Systeme aktiviert bleiben." antennas: "Antennen" manageAntennas: "Antennen verwalten" name: "Name" antennaSource: "Antennenquelle" antennaKeywords: "Zu beobachtende Schlüsselwörter" antennaExcludeKeywords: "Zu ignorierende Schlüsselwörter" -antennaKeywordsDescription: "Zum Nutzen einer \"UND\"-Verknüpfung Einträge mit Leerzeichen trennen, zum Nutzen einer \"ODER\"-Verknüpfung Einträge mit einem Zeilenumbruch trennen" +antennaKeywordsDescription: "Zum Nutzen einer \"UND\"-Verknüpfung Einträge mit Leerzeichen\ + \ trennen, zum Nutzen einer \"ODER\"-Verknüpfung Einträge mit einem Zeilenumbruch\ + \ trennen" notifyAntenna: "Über neue Notizen benachrichtigen" withFileAntenna: "Nur Notizen mit Dateien" enableServiceworker: "Push-Benachrichtigungen im Browser aktivieren" @@ -369,7 +409,8 @@ withFiles: "Notizen mit Dateien" silence: "Instanzweit stummschalten" silenceConfirm: "Möchtest du diesen Benutzer wirklich instanzweit stummschalten?" unsilence: "Instanzweite Stummschaltung aufheben" -unsilenceConfirm: "Möchtest du die instanzweite Stummschaltung dieses Benutzers wirklich aufheben?" +unsilenceConfirm: "Möchtest du die instanzweite Stummschaltung dieses Benutzers wirklich\ + \ aufheben?" popularUsers: "Beliebte Benutzer" recentlyUpdatedUsers: "Vor kurzem aktive Benutzer" recentlyRegisteredUsers: "Vor kurzem registrierte Benutzer" @@ -435,7 +476,8 @@ invitationCode: "Einladungscode" checking: "Wird überprüft …" available: "Verfügbar" unavailable: "Unverfügbar" -usernameInvalidFormat: "Du kannst Klein- und Großbuchstaben, Zahlen sowie Unterstriche verwenden" +usernameInvalidFormat: "Du kannst Klein- und Großbuchstaben, Zahlen sowie Unterstriche\ + \ verwenden" tooShort: "Zu kurz" tooLong: "Zu lang" weakPassword: "Schwaches Passwort" @@ -485,19 +527,27 @@ showFeaturedNotesInTimeline: "Beliebte Notizen in der Chronik anzeigen" objectStorage: "Object Storage" useObjectStorage: "Object Storage verwenden" objectStorageBaseUrl: "Basis-URL" -objectStorageBaseUrlDesc: "Die als Referenz verwendete URL. Verwendest du einen CDN oder Proxy, gib dessen URL an. Für S3 verwende 'https://.s3.amazonaws.com'. Für GCS o.ä. verwende 'https://storage.googleapis.com/'." +objectStorageBaseUrlDesc: "Die als Referenz verwendete URL. Verwendest du einen CDN\ + \ oder Proxy, gib dessen URL an. Für S3 verwende 'https://.s3.amazonaws.com'.\ + \ Für GCS o.ä. verwende 'https://storage.googleapis.com/'." objectStorageBucket: "Bucket" -objectStorageBucketDesc: "Bitte gib den Namen des Buckets an, der bei deinem Anbieter verwendet wird." +objectStorageBucketDesc: "Bitte gib den Namen des Buckets an, der bei deinem Anbieter\ + \ verwendet wird." objectStoragePrefix: "Prefix" objectStoragePrefixDesc: "Dateien werden in Ordnern unter diesem Prefix gespeichert." objectStorageEndpoint: "Endpoint" -objectStorageEndpointDesc: "Im Falle von S3 leerlassen, für andere Anbieter den relevanten Endpoint im Format „“ oder „:“ angeben." +objectStorageEndpointDesc: "Im Falle von S3 leerlassen, für andere Anbieter den relevanten\ + \ Endpoint im Format „“ oder „:“ angeben." objectStorageRegion: "Region" -objectStorageRegionDesc: "Gib eine Region wie z.B. „xx-east-1“ an. Falls dein Anbieter nicht zwischen Regionen unterscheidet, lass dieses Feld leer oder gib „us-east-1“ an." +objectStorageRegionDesc: "Gib eine Region wie z.B. „xx-east-1“ an. Falls dein Anbieter\ + \ nicht zwischen Regionen unterscheidet, lass dieses Feld leer oder gib „us-east-1“\ + \ an." objectStorageUseSSL: "SSL verwenden" -objectStorageUseSSLDesc: "Deaktiviere dies, falls du für API-Verbindungen kein HTTPS verwenden wirst" +objectStorageUseSSLDesc: "Deaktiviere dies, falls du für API-Verbindungen kein HTTPS\ + \ verwenden wirst" objectStorageUseProxy: "Über Proxy verbinden" -objectStorageUseProxyDesc: "Deaktiviere dies, falls du keinen Proxy für den Objektspeicher verwenden wirst" +objectStorageUseProxyDesc: "Deaktiviere dies, falls du keinen Proxy für den Objektspeicher\ + \ verwenden wirst" objectStorageSetPublicRead: "Bei Upload auf \"public-read\" stellen" serverLogs: "Serverprotokolle" deleteAll: "Alle löschen" @@ -525,7 +575,9 @@ sort: "Sortieren" ascendingOrder: "Aufsteigende Reihenfolge" descendingOrder: "Absteigende Reihenfolge" scratchpad: "Testumgebung" -scratchpadDescription: "Die Testumgebung bietet einen Bereich für AiScript-Experimente. Dort kannst du AiScript schreiben, ausführen sowie dessen Auswirkungen auf Misskey überprüfen." +scratchpadDescription: "Die Testumgebung bietet einen Bereich für AiScript-Experimente.\ + \ Dort kannst du AiScript schreiben, ausführen sowie dessen Auswirkungen auf Misskey\ + \ überprüfen." output: "Ausgabe" script: "Skript" disablePagesScript: "AiScript auf Seiten deaktivieren" @@ -533,11 +585,15 @@ updateRemoteUser: "Benutzerinformationen aktualisieren" deleteAllFiles: "Alle Dateien löschen" deleteAllFilesConfirm: "Möchtest du wirklich alle Dateien löschen?" removeAllFollowing: "Allen gefolgten Benutzern entfolgen" -removeAllFollowingDescription: "Dies entfolgt allen Benutzerkonten von {host}. Bitte führe dies durch, falls diese Instanz z.B. nicht mehr existiert." +removeAllFollowingDescription: "Dies entfolgt allen Benutzerkonten von {host}. Bitte\ + \ führe dies durch, falls diese Instanz z.B. nicht mehr existiert." userSuspended: "Dieser Benutzer wurde gesperrt." userSilenced: "Dieser Benutzer wurde instanzweit stummgeschaltet." yourAccountSuspendedTitle: "Dieses Benutzerkonto ist gesperrt" -yourAccountSuspendedDescription: "Dieses Benutzerkonto wurde gesperrt, da es gegen die Nutzungsbedingungen dieses Servers verstoßen hat. Trete mit dem Betreiber in Kontakt, falls du weitere Details erfahren möchtest. Bitte erstelle kein neues Benutzerkonto." +yourAccountSuspendedDescription: "Dieses Benutzerkonto wurde gesperrt, da es gegen\ + \ die Nutzungsbedingungen dieses Servers verstoßen hat. Trete mit dem Betreiber\ + \ in Kontakt, falls du weitere Details erfahren möchtest. Bitte erstelle kein neues\ + \ Benutzerkonto." menu: "Menü" divider: "Trenner" addItem: "Element hinzufügen" @@ -578,12 +634,14 @@ permission: "Berechtigungen" enableAll: "Alle aktivieren" disableAll: "Alle deaktivieren" tokenRequested: "Zugriff zum Benutzerkonto gewähren" -pluginTokenRequestedDescription: "Dieses Plugin wird die hier konfigurierten Berechtigungen verwenden können." +pluginTokenRequestedDescription: "Dieses Plugin wird die hier konfigurierten Berechtigungen\ + \ verwenden können." notificationType: "Art der Benachrichtigung" edit: "Bearbeiten" emailServer: "Email-Server" enableEmail: "Email-Versand aktivieren" -emailConfigInfo: "Zur Email-Bestätigung bei Registrierung oder zum Zurücksetzen des Passworts verwendet" +emailConfigInfo: "Zur Email-Bestätigung bei Registrierung oder zum Zurücksetzen des\ + \ Passworts verwendet" email: "Email" emailAddress: "Email-Adresse" smtpConfig: "SMTP-Server Konfiguration" @@ -591,13 +649,15 @@ smtpHost: "Host" smtpPort: "Port" smtpUser: "Benutzername" smtpPass: "Passwort" -emptyToDisableSmtpAuth: "Benutzername und Passwort leer lassen, um SMTP-Verifizierung zu deaktivieren" +emptyToDisableSmtpAuth: "Benutzername und Passwort leer lassen, um SMTP-Verifizierung\ + \ zu deaktivieren" smtpSecure: "Für SMTP-Verbindungen implizit SSL/TLS verwenden" smtpSecureInfo: "Schalte dies aus, falls du STARTTLS verwendest." testEmail: "Emailversand testen" wordMute: "Wortstummschaltung" regexpError: "Fehler in einem regulären Ausdruck" -regexpErrorDescription: "Im regulären Ausdruck deiner {tab}en Wortstummschaltungen ist ein Fehler aufgetreten:" +regexpErrorDescription: "Im regulären Ausdruck deiner {tab}en Wortstummschaltungen\ + \ ist ein Fehler aufgetreten:" instanceMute: "Instanzstummschaltungen" userSaysSomething: "{name} hat etwas gesagt" makeActive: "Aktivieren" @@ -613,44 +673,53 @@ create: "Erstellen" notificationSetting: "Benachrichtigungseinstellungen" notificationSettingDesc: "Wähle die Art der anzuzeigenden Benachrichtigungen." useGlobalSetting: "Globale Einstellung verwenden" -useGlobalSettingDesc: "Ist diese Option aktiviert, werden die Benachrichtigungseinstellungen deines Benutzerkontos verwendet. Durch ausschalten dieser Option können individuelle Einstellungen vorgenommen werden." +useGlobalSettingDesc: "Ist diese Option aktiviert, werden die Benachrichtigungseinstellungen\ + \ deines Benutzerkontos verwendet. Durch ausschalten dieser Option können individuelle\ + \ Einstellungen vorgenommen werden." other: "Anderes" regenerateLoginToken: "Anmeldetoken regenerieren" -regenerateLoginTokenDescription: "Den zur Anmeldung intern verwendeten Token regenerieren. Normalerweise wird dies nicht benötigt. Bei Regeneration werden alle Geräte ausgeloggt." -setMultipleBySeparatingWithSpace: "Trenne Elemente durch ein Leerzeichen um mehrere Einstellungen zu kofigurieren." +regenerateLoginTokenDescription: "Den zur Anmeldung intern verwendeten Token regenerieren.\ + \ Normalerweise wird dies nicht benötigt. Bei Regeneration werden alle Geräte ausgeloggt." +setMultipleBySeparatingWithSpace: "Trenne Elemente durch ein Leerzeichen um mehrere\ + \ Einstellungen zu kofigurieren." fileIdOrUrl: "Datei-ID oder URL" behavior: "Verhalten" sample: "Beispiel" abuseReports: "Meldungen" reportAbuse: "Melden" reportAbuseOf: "{name} melden" -fillAbuseReportDescription: "Bitte gib zusätzliche Informationen zu dieser Meldung an. Falls es sich um eine spezielle Notiz handelt, bitte gib dessen URL an." +fillAbuseReportDescription: "Bitte gib zusätzliche Informationen zu dieser Meldung\ + \ an. Falls es sich um eine spezielle Notiz handelt, bitte gib dessen URL an." abuseReported: "Deine Meldung wurde versendet. Vielen Dank." reporter: "Melder" reporteeOrigin: "Herkunft des Gemeldeten" reporterOrigin: "Herkunft des Meldenden" forwardReport: "Meldung an fremde Instanz weiterleiten" -forwardReportIsAnonymous: "Anstatt deines Benutzerkontos wird bei der fremden Instanz ein anonymes Systemkonto als Melder angezeigt." +forwardReportIsAnonymous: "Anstatt deines Benutzerkontos wird bei der fremden Instanz\ + \ ein anonymes Systemkonto als Melder angezeigt." send: "Senden" abuseMarkAsResolved: "Meldung als gelöst markieren" openInNewTab: "In neuem Tab öffnen" openInSideView: "In Seitenansicht öffnen" defaultNavigationBehaviour: "Standardnavigationsverhalten" -editTheseSettingsMayBreakAccount: "Bei Bearbeitung dieser Einstellungen besteht die Gefahr, dein Benutzerkonto zu beschädigen." +editTheseSettingsMayBreakAccount: "Bei Bearbeitung dieser Einstellungen besteht die\ + \ Gefahr, dein Benutzerkonto zu beschädigen." instanceTicker: "Instanz-Informationen von Notizen" waitingFor: "Warte auf {x} …" random: "Zufällig" system: "System" -switchUi: "UI wechseln" +switchUi: "Layout" desktop: "Desktop" clip: "Clip erstellen" createNew: "Neu erstellen" optional: "Optional" createNewClip: "Neuen Clip erstellen" unclip: "Aus Clip entfernen" -confirmToUnclipAlreadyClippedNote: "Diese Notiz ist bereits im \"{name}\" Clip enthalten. Möchtest du sie aus diesem Clip entfernen?" +confirmToUnclipAlreadyClippedNote: "Diese Notiz ist bereits im \"{name}\" Clip enthalten.\ + \ Möchtest du sie aus diesem Clip entfernen?" public: "Öffentlich" -i18nInfo: "Calckey wird durch freiwillige Helfer in viele verschiedene Sprachen übersetzt. Auf {link} kannst du mithelfen." +i18nInfo: "Calckey wird durch freiwillige Helfer in viele verschiedene Sprachen übersetzt.\ + \ Auf {link} kannst du mithelfen." manageAccessTokens: "Zugriffstokens verwalten" accountInfo: "Benutzerkonto-Informationen" notesCount: "Anzahl der Notizen" @@ -669,12 +738,16 @@ no: "Nein" driveFilesCount: "Anzahl der Dateien in Drive" driveUsage: "Drive-Auslastung" noCrawle: "Crawler-Indexierung ablehnen" -noCrawleDescription: "Suchmaschinen bitten, die eigene Profilseite, Notizen, Seiten usw. nicht zu indexieren." -lockedAccountInfo: "Auch wenn du Follow-Anfragen auf manuelle Bestätigung setzt, wird jede deiner Notizen öffentlich sichtbar sein, sofern du ihre Notizsichtbarkeit nicht auf \"Nur Follower\" setzt." +noCrawleDescription: "Suchmaschinen bitten, die eigene Profilseite, Notizen, Seiten\ + \ usw. nicht zu indexieren." +lockedAccountInfo: "Auch wenn du Follow-Anfragen auf manuelle Bestätigung setzt, wird\ + \ jeder deiner Posts öffentlich sichtbar sein, sofern du ihre Sichtbarkeit nicht\ + \ auf \"Nur Follower\" setzt." alwaysMarkSensitive: "Medien standardmäßig als NSFW markieren" loadRawImages: "Anstatt Vorschaubilder immer Originalbilder anzeigen" disableShowingAnimatedImages: "Animierte Bilder nicht abspielen" -verificationEmailSent: "Eine Bestätigungsmail wurde an deine Email-Adresse versendet. Besuche den dort enthaltenen Link, um die Verifizierung abzuschließen." +verificationEmailSent: "Eine Bestätigungsmail wurde an deine Email-Adresse versendet.\ + \ Besuche den dort enthaltenen Link, um die Verifizierung abzuschließen." notSet: "Nicht konfiguriert" emailVerified: "Email-Adresse bestätigt" noteFavoritesCount: "Anzahl an als Favorit markierter Notizen" @@ -686,22 +759,29 @@ clips: "Clips" experimentalFeatures: "Experimentelle Funktionalitäten" developer: "Entwickler" makeExplorable: "Benutzerkonto in „Erkunden“ sichtbar machen" -makeExplorableDescription: "Wenn diese Option deaktiviert ist, ist dein Benutzerkonto nicht im „Erkunden“-Bereich sichtbar." +makeExplorableDescription: "Wenn diese Option deaktiviert ist, ist dein Benutzerkonto\ + \ nicht im „Erkunden“-Bereich sichtbar." showGapBetweenNotesInTimeline: "Abstände zwischen Notizen auf der Chronik anzeigen" duplicate: "Duplizieren" left: "Links" center: "Mittig" wide: "Breit" narrow: "Schmal" -reloadToApplySetting: "Diese Einstellung tritt nach einer Aktualisierung der Seite in Kraft. Jetzt aktualisieren?" -needReloadToApply: "Diese Einstellung tritt nach einer Aktualisierung der Seite in Kraft." +reloadToApplySetting: "Diese Einstellung tritt nach einer Aktualisierung der Seite\ + \ in Kraft. Jetzt aktualisieren?" +needReloadToApply: "Diese Einstellung tritt nach einer Aktualisierung der Seite in\ + \ Kraft." showTitlebar: "Titelleiste anzeigen" clearCache: "Cache leeren" onlineUsersCount: "{n} Benutzer sind online" nUsers: "{n} Benutzer" nNotes: "{n} Notizen" sendErrorReports: "Fehlerberichte senden" -sendErrorReportsDescription: "Ist diese Option aktiviert, so werden beim Auftreten von Fehlern detaillierte Fehlerinformationen an Misskey weitergegeben, was zur Verbesserung der Qualität von Misskey beiträgt.\nEnthalten in diesen Informationen sind u.a. die Version deines Betriebssystems, welchen Browser du verwendest und ein Verlauf deiner Aktivitäten innerhalb Misskey." +sendErrorReportsDescription: "Ist diese Option aktiviert, so werden beim Auftreten\ + \ von Fehlern detaillierte Fehlerinformationen an Calckey weitergegeben, was zur\ + \ Verbesserung der Qualität von Calckey beiträgt.\nEnthalten in diesen Informationen\ + \ sind u.a. die Version deines Betriebssystems, welchen Browser du verwendest und\ + \ ein Verlauf deiner Aktivitäten innerhalb Calckey." myTheme: "Mein Farbschema" backgroundColor: "Hintergrundfarbe" accentColor: "Akzentfarbe" @@ -740,14 +820,17 @@ unlikeConfirm: "\"Gefällt mir\" wirklich entfernen?" fullView: "Vollansicht" quitFullView: "Vollansicht verlassen" addDescription: "Beschreibung hinzufügen" -userPagePinTip: "Um Notizen hier erscheinen zu lassen, drücke \"An dein Profil anheften\" im Menü individueller Notizen." -notSpecifiedMentionWarning: "Diese Notiz enthält Erwähnungen von Nutzern, die nicht als Empfänger ausgewählt sind" +userPagePinTip: "Um Notizen hier erscheinen zu lassen, drücke \"An dein Profil anheften\"\ + \ im Menü individueller Notizen." +notSpecifiedMentionWarning: "Diese Notiz enthält Erwähnungen von Nutzern, die nicht\ + \ als Empfänger ausgewählt sind" info: "Über" userInfo: "Benutzerinformation" unknown: "Unbekannt" onlineStatus: "Onlinestatus" hideOnlineStatus: "Onlinestatus verbergen" -hideOnlineStatusDescription: "Das Verbergen deines Onlinestatuses reduziert die Nützlichkeit von Funktionen wie der Suche." +hideOnlineStatusDescription: "Das Verbergen deines Onlinestatuses reduziert die Nützlichkeit\ + \ von Funktionen wie der Suche." online: "Online" active: "Aktiv" offline: "Offline" @@ -782,7 +865,8 @@ emailNotConfiguredWarning: "Keine Email-Adresse hinterlegt." ratio: "Verhältnis" previewNoteText: "Vorschau anzeigen" customCss: "Benutzerdefiniertes CSS" -customCssWarn: "Verwende diese Einstellung nur, wenn du weißt, was sie tut. Ungültige Eingaben können dazu führen, dass der Client nicht mehr normal funktioniert." +customCssWarn: "Verwende diese Einstellung nur, wenn du weißt, was sie tut. Ungültige\ + \ Eingaben können dazu führen, dass der Client nicht mehr normal funktioniert." global: "Global" squareAvatars: "Profilbilder quadratisch anzeigen" sent: "Gesendet" @@ -797,7 +881,9 @@ whatIsNew: "Änderungen anzeigen" translate: "Übersetzen" translatedFrom: "Aus {x} übersetzt" accountDeletionInProgress: "Die Löschung deines Benutzerkontos ist momentan in Bearbeitung." -usernameInfo: "Ein Name, durch den dein Benutzerkonto auf diesem Server identifiziert werden kann. Du kannst das Alphabet (a~z, A~Z), Ziffern (0~9) oder Unterstriche (_) verwenden. Benutzernamen können später nicht geändert werden." +usernameInfo: "Ein Name, durch den dein Benutzerkonto auf diesem Server identifiziert\ + \ werden kann. Du kannst das Alphabet (a~z, A~Z), Ziffern (0~9) oder Unterstriche\ + \ (_) verwenden. Benutzernamen können später nicht geändert werden." aiChanMode: "Ai-Modus" keepCw: "Inhaltswarnungen beibehalten" pubSub: "Pub/Sub Benutzerkonten" @@ -813,12 +899,14 @@ filter: "Filter" controlPanel: "Systemsteuerung" manageAccounts: "Benutzerkonten verwalten" makeReactionsPublic: "Reaktionsverlauf veröffentlichen" -makeReactionsPublicDescription: "Jeder wird die Liste deiner gesendeten Reaktionen einsehen können." +makeReactionsPublicDescription: "Jeder wird die Liste deiner gesendeten Reaktionen\ + \ einsehen können." classic: "Classic" muteThread: "Thread stummschalten" unmuteThread: "Threadstummschaltung aufheben" ffVisibility: "Sichtbarkeit von Gefolgten/Followern" -ffVisibilityDescription: "Konfiguriere wer sehen kann, wem du folgst sowie wer dir folgt." +ffVisibilityDescription: "Konfiguriere wer sehen kann, wem du folgst sowie wer dir\ + \ folgt." continueThread: "Weiteren Threadverlauf anzeigen" deleteAccountConfirm: "Dein Benutzerkonto wird unwiderruflich gelöscht. Trotzdem fortfahren?" incorrectPassword: "Falsches Passwort." @@ -826,9 +914,11 @@ voteConfirm: "Wirklich für „{choice}“ abstimmen?" hide: "Inhalt verbergen" leaveGroup: "Gruppe verlassen" leaveGroupConfirm: "Möchtest du „{name}“ wirklich verlassen?" -useDrawerReactionPickerForMobile: "Auf mobilen Geräten ausfahrbare Reaktionsauswahl anzeigen" +useDrawerReactionPickerForMobile: "Auf mobilen Geräten ausfahrbare Reaktionsauswahl\ + \ anzeigen" welcomeBackWithName: "Willkommen zurück, {name}" -clickToFinishEmailVerification: "Drücke bitte auf [{ok}], um die Email-Bestätigung abzuschließen." +clickToFinishEmailVerification: "Drücke bitte auf [{ok}], um die Email-Bestätigung\ + \ abzuschließen." overridedDeviceKind: "Gerätetyp" smartphone: "Smartphone" tablet: "Tablet" @@ -847,7 +937,8 @@ oneHour: "Eine Stunde" oneDay: "Einen Tag" oneWeek: "Eine Woche" reflectMayTakeTime: "Es kann etwas dauern, bis sich dies widerspiegelt." -failedToFetchAccountInformation: "Benutzerkontoinformationen konnten nicht abgefragt werden" +failedToFetchAccountInformation: "Benutzerkontoinformationen konnten nicht abgefragt\ + \ werden" rateLimitExceeded: "Versuchsanzahl überschritten" cropImage: "Bild zuschneiden" cropImageAsk: "Möchtest du das Bild zuschneiden?" @@ -859,14 +950,17 @@ thereIsUnresolvedAbuseReportWarning: "Es liegen ungelöste Meldungen vor." recommended: "Empfehlung" check: "Check" driveCapOverrideLabel: "Die Drive-Kapazität dieses Nutzers verändern" -driveCapOverrideCaption: "Gib einen Wert von 0 oder weniger ein, um die Kapazität auf den Standard zurückzusetzen." +driveCapOverrideCaption: "Gib einen Wert von 0 oder weniger ein, um die Kapazität\ + \ auf den Standard zurückzusetzen." requireAdminForView: "Melde dich mit einem Administratorkonto an, um dies einzusehen." -isSystemAccount: "Ein Benutzerkonto, dass durch das System erstellt und automatisch kontrolliert wird." +isSystemAccount: "Ein Benutzerkonto, dass durch das System erstellt und automatisch\ + \ kontrolliert wird." typeToConfirm: "Bitte gib zur Bestätigung {x} ein" deleteAccount: "Benutzerkonto löschen" document: "Dokumentation" numberOfPageCache: "Seitencachegröße" -numberOfPageCacheDescription: "Das Erhöhen dieses Caches führt zu einer angenehmerern Benutzererfahrung, erhöht aber Serverlast und Arbeitsspeicherauslastung." +numberOfPageCacheDescription: "Das Erhöhen dieses Caches führt zu einer angenehmerern\ + \ Benutzererfahrung, erhöht aber Serverlast und Arbeitsspeicherauslastung." logoutConfirm: "Wirklich abmelden?" lastActiveDate: "Zuletzt verwendet am" statusbar: "Statusleiste" @@ -883,24 +977,37 @@ sensitiveMediaDetection: "Erkennung von NSFW-Medien" localOnly: "Nur Lokal" remoteOnly: "Nur für fremde Instanzen" failedToUpload: "Hochladen fehlgeschlagen" -cannotUploadBecauseInappropriate: "Diese Datei kann nicht hochgeladen werden, da Anteile der Datei als möglicherweise NSFW festgestellt wurden." -cannotUploadBecauseNoFreeSpace: "Die Datei konnte nicht hochgeladen werden, da dein Drive-Speicherplatz aufgebraucht ist." +cannotUploadBecauseInappropriate: "Diese Datei kann nicht hochgeladen werden, da Anteile\ + \ der Datei als möglicherweise NSFW festgestellt wurden." +cannotUploadBecauseNoFreeSpace: "Die Datei konnte nicht hochgeladen werden, da dein\ + \ Drive-Speicherplatz aufgebraucht ist." beta: "Beta" enableAutoSensitive: "NSFW-Automarkierung" -enableAutoSensitiveDescription: "Setzt soweit möglich durch Verwendung von Machine Learning automatisch NSFW-Markierungen für Medien, die NSFW-Anteile beinhalten. Auch wenn du diese Option deaktiviert hast, ist sie möglicherweise auf Instanzebene aktiviert." -activeEmailValidationDescription: "Aktivert strengere Überprüfung von E-Mail-Adressen, d.h. Testen auf Wegwerfadressen und darauf, ob mit der Adresse tatsächlich kommuniziert werden kann. Ist dies deaktiviert, so wird nur das Format der E-Mail überprüft." +enableAutoSensitiveDescription: "Setzt soweit möglich durch Verwendung von Machine\ + \ Learning automatisch NSFW-Markierungen für Medien, die NSFW-Anteile beinhalten.\ + \ Auch wenn du diese Option deaktiviert hast, ist sie möglicherweise auf Instanzebene\ + \ aktiviert." +activeEmailValidationDescription: "Aktivert strengere Überprüfung von E-Mail-Adressen,\ + \ d.h. Testen auf Wegwerfadressen und darauf, ob mit der Adresse tatsächlich kommuniziert\ + \ werden kann. Ist dies deaktiviert, so wird nur das Format der E-Mail überprüft." navbar: "Navigationsleiste" shuffle: "Mischen" account: "Benutzerkonto" move: "Verschieben" _sensitiveMediaDetection: - description: "Ermöglicht eine Erleichterung der Servermoderation durch die automatische Erkennungen von NSFW-Medien unter Verwendung von Machine Learning. Hierdurch wird die Serverlast etwas erhöht." + description: "Ermöglicht eine Erleichterung der Servermoderation durch die automatische\ + \ Erkennungen von NSFW-Medien unter Verwendung von Machine Learning. Hierdurch\ + \ wird die Serverlast etwas erhöht." sensitivity: "Erkennungssensitivität" - sensitivityDescription: "Durch das Senken der Sensitivität kann die Anzahl an Fehlerkennungen (sog. false positives) reduziert werden. Durch ein Erhöhen dieser kann die Anzahl an verpassten Erkennungen (sog. false negatives) reduziert werden." + sensitivityDescription: "Durch das Senken der Sensitivität kann die Anzahl an Fehlerkennungen\ + \ (sog. false positives) reduziert werden. Durch ein Erhöhen dieser kann die Anzahl\ + \ an verpassten Erkennungen (sog. false negatives) reduziert werden." setSensitiveFlagAutomatically: "Als NSFW markieren" - setSensitiveFlagAutomaticallyDescription: "Die Resultate der internen Erkennung werden beibehalten, auch wenn diese Option deaktiviert ist." + setSensitiveFlagAutomaticallyDescription: "Die Resultate der internen Erkennung\ + \ werden beibehalten, auch wenn diese Option deaktiviert ist." analyzeVideos: "Videoanalyse aktivieren" - analyzeVideosDescription: "Analysiert zusätzlich zu Bildern auch Videos. Die Last des Servers wird hierdurch etwas erhöht." + analyzeVideosDescription: "Analysiert zusätzlich zu Bildern auch Videos. Die Last\ + \ des Servers wird hierdurch etwas erhöht." _emailUnavailable: used: "Diese Email-Adresse wird bereits verwendet" format: "Das Format dieser Email-Adresse ist ungültig" @@ -913,12 +1020,18 @@ _ffVisibility: private: "Privat" _signup: almostThere: "Fast geschafft" - emailAddressInfo: "Bitte gib deine Email-Adresse ein. Sie wird nicht öffentlich einsehbar sein." - emailSent: "An deine Email-Adresse ({email}) wurde soeben eine Bestätigungsmail geschickt. Bitte klicke auf den enthaltenen Link, um die Erstellung deines Benutzerkontos abzuschließen." + emailAddressInfo: "Bitte gib deine Email-Adresse ein. Sie wird nicht öffentlich\ + \ einsehbar sein." + emailSent: "An deine Email-Adresse ({email}) wurde soeben eine Bestätigungsmail\ + \ geschickt. Bitte klicke auf den enthaltenen Link, um die Erstellung deines Benutzerkontos\ + \ abzuschließen." _accountDelete: accountDelete: "Benutzerkonto löschen" - mayTakeTime: "Da die Löschung eines Benutzerkontos ein aufwendiger Prozess ist, kann dessen Dauer davon abhängen, wie viel Inhalt von diesem erstellt wurde oder wie viele Dateien von diesem hochgeladen wurden." - sendEmail: "Sobald die Löschung abgeschlossen ist, wird an die mit ihm verknüpfte Email-Adresse eine Benachrichtigung versendet." + mayTakeTime: "Da die Löschung eines Benutzerkontos ein aufwendiger Prozess ist,\ + \ kann dessen Dauer davon abhängen, wie viel Inhalt von diesem erstellt wurde\ + \ oder wie viele Dateien von diesem hochgeladen wurden." + sendEmail: "Sobald die Löschung abgeschlossen ist, wird an die mit ihm verknüpfte\ + \ Email-Adresse eine Benachrichtigung versendet." requestAccountDelete: "Löschung deines Benutzerkontos anfordern" started: "Die Löschung wurde eingeleitet." inProgress: "Löschung in Bearbeitung" @@ -926,9 +1039,12 @@ _ad: back: "Zurück" reduceFrequencyOfThisAd: "Diese Werbung weniger anzeigen" _forgotPassword: - enterEmail: "Gib die Email-Adresse ein, mit der du dich registriert hast. An diese wird ein Link gesendet, mit dem du dein Passwort zurücksetzen kannst." - ifNoEmail: "Solltest du bei der Registrierung keine Email-Adresse angegeben haben, wende dich bitte an den Administrator." - contactAdmin: "Diese Instanz unterstützt die Verwendung von Email-Adressen nicht. Wende dich an den Administrator, um dein Passwort zurückzusetzen." + enterEmail: "Gib die Email-Adresse ein, mit der du dich registriert hast. An diese\ + \ wird ein Link gesendet, mit dem du dein Passwort zurücksetzen kannst." + ifNoEmail: "Solltest du bei der Registrierung keine Email-Adresse angegeben haben,\ + \ wende dich bitte an den Administrator." + contactAdmin: "Diese Instanz unterstützt die Verwendung von Email-Adressen nicht.\ + \ Wende dich an den Administrator, um dein Passwort zurückzusetzen." _gallery: my: "Meine Galerie" liked: "Mit \"Gefällt mir\" markierte Beiträge" @@ -951,12 +1067,15 @@ _preferencesBackups: save: "Speichern" inputName: "Gib einen Namen für dieses Backup ein" cannotSave: "Speichern fehlgeschlagen" - nameAlreadyExists: "Es existiert bereits ein Backup unter dem Namen \"{name}\". Bitte gib einen anderen Namen ein." - applyConfirm: "Wirklich das Backup \"{name}\" auf dieses Gerät anwenden? Bestehende Einstellungen darauf werden überschrieben." + nameAlreadyExists: "Es existiert bereits ein Backup unter dem Namen \"{name}\".\ + \ Bitte gib einen anderen Namen ein." + applyConfirm: "Wirklich das Backup \"{name}\" auf dieses Gerät anwenden? Bestehende\ + \ Einstellungen darauf werden überschrieben." saveConfirm: "Als {name} speichern?" deleteConfirm: "Das Backup {name} löschen?" renameConfirm: "Soll dieses Backup von \"{old}\" zu \"{new}\" umbenannt werden?" - noBackups: "Keine Backups existieren. Backups können über \"Neu erstellen\" erstelllt werden." + noBackups: "Keine Backups existieren. Backups können über \"Neu erstellen\" erstelllt\ + \ werden." createdAt: "Erstellt am: {date} {time}" updatedAt: "Aktualisiert am: {date} {time}" cannotLoad: "Laden fehlgeschlagen" @@ -968,13 +1087,15 @@ _registry: domain: "Domain" createKey: "Schlüssel erstellen" _aboutMisskey: - about: "Misskey ist Open-Source-Software, welche von syuilo seit 2014 entwickelt wird." + about: "Misskey ist Open-Source-Software, welche von syuilo seit 2014 entwickelt\ + \ wird." contributors: "Hauptmitwirkende" allContributors: "Alle Mitwirkenden" source: "Quellcode" translation: "Misskey übersetzen" donate: "An Misskey spenden" - morePatrons: "Wir schätzen ebenso die Unterstützung vieler anderer hier nicht gelisteter Personen sehr. Danke! 🥰" + morePatrons: "Wir schätzen ebenso die Unterstützung vieler anderer hier nicht gelisteter\ + \ Personen sehr. Danke! \U0001F970" patrons: "UnterstützerInnen" _nsfw: respect: "Als NSFW markierte Bilder verbergen" @@ -982,10 +1103,13 @@ _nsfw: force: "Alle Medien verbergen" _mfm: cheatSheet: "MFM Spickzettel" - intro: "MFM ist eine Misskey-exklusive Markup-Sprache, die in Misskey an vielen Stellen verwendet werden kann. Hier kannst du eine Liste von verfügbarer MFM-Syntax einsehen." + intro: "MFM ist eine Misskey-exklusive Markup-Sprache, die in Misskey an vielen\ + \ Stellen verwendet werden kann. Hier kannst du eine Liste von verfügbarer MFM-Syntax\ + \ einsehen." dummy: "Misskey erweitert die Welt des Fediverse" mention: "Erwähnung" - mentionDescription: "Mit At-Zeichen und Benutzername kann ein individueller Nutzer angegeben werden." + mentionDescription: "Mit At-Zeichen und Benutzername kann ein individueller Nutzer\ + \ angegeben werden." hashtag: "Hashtag" hashtagDescription: "Mit einer Raute und Text kann ein Hashtag angegeben werden." url: "URL" @@ -1001,7 +1125,8 @@ _mfm: inlineCode: "Code (Eingebettet)" inlineCodeDescription: "Syntax-Hervorhebung für (Programm-)Code eingebettet anzeigen." blockCode: "Code (Block)" - blockCodeDescription: "Syntax-Hervorhebung für mehrzeiligen (Programm-)Code als Block anzeigen." + blockCodeDescription: "Syntax-Hervorhebung für mehrzeiligen (Programm-)Code als\ + \ Block anzeigen." inlineMath: "Mathe (Eingebettet)" inlineMathDescription: "Mathematische Formeln (KaTeX) eingebettet anzeigen." blockMath: "Mathe (Block)" @@ -1009,7 +1134,8 @@ _mfm: quote: "Zitationen" quoteDescription: "Inhalt als Zitat anzeigen." emoji: "Benutzerdefinierte Emojis" - emojiDescription: "Durch das Umschließen von Emoji-Namen durch Doppelpunkte können benutzerdefinierte Emojis angezeigt werden." + emojiDescription: "Durch das Umschließen von Emoji-Namen durch Doppelpunkte können\ + \ benutzerdefinierte Emojis angezeigt werden." search: "Suche" searchDescription: "Eine vorgefertige Suchanfragebox anzeigen." flip: "Spiegelung" @@ -1035,7 +1161,8 @@ _mfm: x4: "Unglaublich groß" x4Description: "Lässt Inhalte noch größer als größer als groß angezeigt werden." blur: "Weichzeichnen" - blurDescription: "Inhalte durch Weihzeichnung verschwimmen lassen. Durch das Bewegen des Mauszeigers über den Inhalt wird er klar angezeigt." + blurDescription: "Inhalte durch Weihzeichnung verschwimmen lassen. Durch das Bewegen\ + \ des Mauszeigers über den Inhalt wird er klar angezeigt." font: "Schriftart" fontDescription: "Setzt die Schriftart des Inhaltes fest." rainbow: "Regenbogen" @@ -1045,7 +1172,8 @@ _mfm: rotate: "Drehen" rotateDescription: "Dreht den Inhalt um einen angegebenen Winkel." plain: "Schlicht" - plainDescription: "Deaktiviert jegliche MFM-Syntax, die sich innerhalb dieses MFM-Effekts befindet." + plainDescription: "Deaktiviert jegliche MFM-Syntax, die sich innerhalb dieses MFM-Effekts\ + \ befindet." _instanceTicker: none: "Nie anzeigen" remote: "Für Benutzer fremder Instanzen anzeigen" @@ -1071,15 +1199,23 @@ _menuDisplay: hide: "Ausblenden" _wordMute: muteWords: "Stummgeschaltete Wörter" - muteWordsDescription: "Zum Nutzen einer \"UND\"-Verknüpfung Einträge mit Leerzeichen trennen, zum Nutzen einer \"ODER\"-Verknüpfung Einträge mit einem Zeilenumbruch trennen." - muteWordsDescription2: "Umgib Schlüsselworter mit Schrägstrichen, um Reguläre Ausdrücke zu verwenden." - softDescription: "Notizen, die die angegebenen Konditionen erfüllen, in der Chronik ausblenden." - hardDescription: "Verhindern, dass Notizen, die die angegebenen Konditionen erfüllen, der Chronik hinzugefügt werden. Zudem werden diese Notizen auch nicht der Chronik hinzugefügt, falls die Konditionen geändert werden." + muteWordsDescription: "Zum Nutzen einer \"UND\"-Verknüpfung Einträge mit Leerzeichen\ + \ trennen, zum Nutzen einer \"ODER\"-Verknüpfung Einträge mit einem Zeilenumbruch\ + \ trennen." + muteWordsDescription2: "Umgib Schlüsselworter mit Schrägstrichen, um Reguläre Ausdrücke\ + \ zu verwenden." + softDescription: "Notizen, die die angegebenen Konditionen erfüllen, in der Chronik\ + \ ausblenden." + hardDescription: "Verhindern, dass Notizen, die die angegebenen Konditionen erfüllen,\ + \ der Chronik hinzugefügt werden. Zudem werden diese Notizen auch nicht der Chronik\ + \ hinzugefügt, falls die Konditionen geändert werden." soft: "Leicht" hard: "Schwer" mutedNotes: "Stummgeschaltete Notizen" _instanceMute: - instanceMuteDescription: "Schaltet alle Notizen/Renotes stumm, die von den gelisteten Instanzen stammen, inklusive Antworten von Benutzern an einen Benutzer einer stummgeschalteten Instanz." + instanceMuteDescription: "Schaltet alle Notizen/Renotes stumm, die von den gelisteten\ + \ Instanzen stammen, inklusive Antworten von Benutzern an einen Benutzer einer\ + \ stummgeschalteten Instanz." instanceMuteDescription2: "Instanzen getrennt durch Zeilenumbrüchen angeben" title: "Blendet Notizen von stummgeschalteten Instanzen aus." heading: "Liste der stummzuschaltenden Instanzen" @@ -1185,32 +1321,49 @@ _tutorial: step1_1: "Willkommen!" step1_2: "Wir werden Sie einrichten. Sie werden im Handumdrehen einsatzbereit sein!" step2_1: "Bitte füllen Sie zuerst Ihr Profil aus." - step2_2: "Wenn du ein paar Angaben zu deiner Person machst, können andere leichter erkennen, ob sie deine Notizen sehen oder dir folgen wollen." + step2_2: "Wenn du ein paar Angaben zu deiner Person machst, können andere leichter\ + \ erkennen, ob sie deine Notizen sehen oder dir folgen wollen." step3_1: "Jetzt ist es Zeit, einigen Leuten zu folgen!" - step3_2: "Deine Home- und Social-Timeline basiert darauf, wem du folgst, also folge für den Anfang ein paar Accounts." + step3_2: "Deine Home- und Social-Timeline basiert darauf, wem du folgst, also folge\ + \ für den Anfang ein paar Accounts." step4_1: "Wir bringen dich nach draußen." - step4_2: "Für deinen ersten Beitrag machen manche Leute gerne einen {introduction} Beitrag oder ein einfaches \"Hallo Welt!\"" + step4_2: "Für deinen ersten Beitrag machen manche Leute gerne einen {introduction}\ + \ Beitrag oder ein einfaches \"Hallo Welt!\"" step5_1: "Timelines, Timelines überall!" step5_2: "Deine Instanz hat {Zeitleisten} verschiedene Zeitleisten aktiviert." - step5_3: "Die Zeitleiste Home {icon} ist die Zeitleiste, in der du die Beiträge deiner Follower sehen kannst." - step5_4: "In der lokalen {Icon} Zeitleiste kannst du die Beiträge aller anderen Mitglieder dieser Instanz sehen." - step5_5: "In der Zeitleiste Empfohlen {icon} kannst du Beiträge von Instanzen sehen, die von den Administratoren empfohlen werden." - step5_6: "In der sozialen {icon} Zeitleiste kannst du Beiträge von Freunden deiner Follower sehen." - step5_7: "In der globalen {icon} Zeitleiste kannst du Beiträge von allen anderen verbundenen Instanzen sehen." + step5_3: "Die Zeitleiste Home {icon} ist die Zeitleiste, in der du die Beiträge\ + \ deiner Follower sehen kannst." + step5_4: "In der lokalen {Icon} Zeitleiste kannst du die Beiträge aller anderen\ + \ Mitglieder dieser Instanz sehen." + step5_5: "In der Zeitleiste Empfohlen {icon} kannst du Beiträge von Instanzen sehen,\ + \ die von den Administratoren empfohlen werden." + step5_6: "In der sozialen {icon} Zeitleiste kannst du Beiträge von Freunden deiner\ + \ Follower sehen." + step5_7: "In der globalen {icon} Zeitleiste kannst du Beiträge von allen anderen\ + \ verbundenen Instanzen sehen." step6_1: "Also, was ist das hier?" - step6_2: "Nun, du bist nicht nur Calckey beigetreten. Du bist einem Portal zum Fediversum beigetreten, einem zusammenhängenden Netzwerk von Tausenden von Servern, genannt \"Instanzen\"." - step6_3: "Jeder Server funktioniert auf unterschiedliche Weise, und nicht auf allen Servern läuft Calckey. Dieser hier aber schon! Es ist ein bisschen kompliziert, aber du wirst den Dreh schnell raus haben." + step6_2: "Nun, du bist nicht nur Calckey beigetreten. Du bist einem Portal zum Fediversum\ + \ beigetreten, einem zusammenhängenden Netzwerk von Tausenden von Servern, genannt\ + \ \"Instanzen\"." + step6_3: "Jeder Server funktioniert auf unterschiedliche Weise, und nicht auf allen\ + \ Servern läuft Calckey. Dieser hier aber schon! Es ist ein bisschen kompliziert,\ + \ aber du wirst den Dreh schnell raus haben." step6_4: "Jetzt geh, erkunde und hab Spaß!" _2fa: - alreadyRegistered: "Du hast bereits ein Gerät für Zwei-Faktor-Authentifizierung registriert." + alreadyRegistered: "Du hast bereits ein Gerät für Zwei-Faktor-Authentifizierung\ + \ registriert." registerDevice: "Neues Gerät registrieren" registerKey: "Neuen Sicherheitsschlüssel registrieren" - step1: "Installiere zuerst eine Authentifizierungsapp (z.B. {a} oder {b}) auf deinem Gerät." + step1: "Installiere zuerst eine Authentifizierungsapp (z.B. {a} oder {b}) auf deinem\ + \ Gerät." step2: "Dann, scanne den angezeigten QR-Code mit deinem Gerät." step2Url: "Nutzt du ein Desktopprogramm kannst du alternativ diese URL eingeben:" step3: "Gib zum Abschluss den Token ein, der von deiner App angezeigt wird." - step4: "Alle folgenden Anmeldungsversuche werden ab sofort die Eingabe eines solchen Tokens benötigen." - securityKeyInfo: "Du kannst neben Fingerabdruck- oder PIN-Authentifizierung auf deinem Gerät auch Anmeldung mit Hilfe eines FIDO2-kompatiblen Hardware-Sicherheitsschlüssels einrichten." + step4: "Alle folgenden Anmeldungsversuche werden ab sofort die Eingabe eines solchen\ + \ Tokens benötigen." + securityKeyInfo: "Du kannst neben Fingerabdruck- oder PIN-Authentifizierung auf\ + \ deinem Gerät auch Anmeldung mit Hilfe eines FIDO2-kompatiblen Hardware-Sicherheitsschlüssels\ + \ einrichten." _permissions: "read:account": "Deine Benutzerkontoinformationen lesen" "write:account": "Deine Benutzerkontoinformationen bearbeiten" @@ -1242,11 +1395,15 @@ _permissions: "write:channels": "Kanäle bedienen" "read:gallery": "Beiträge deiner Galerie lesen" "write:gallery": "Deine Galerie bearbeiten" - "read:gallery-likes": "Liste deiner mit \"Gefällt mir\" markierten Galerie-Beiträge lesen" - "write:gallery-likes": "Liste deiner mit \"Gefällt mir\" markierten Galerie-Beiträge bearbeiten" + "read:gallery-likes": "Liste deiner mit \"Gefällt mir\" markierten Galerie-Beiträge\ + \ lesen" + "write:gallery-likes": "Liste deiner mit \"Gefällt mir\" markierten Galerie-Beiträge\ + \ bearbeiten" _auth: - shareAccess: "Möchtest du „{name}“ authorisieren, auf dieses Benutzerkonto zugreifen zu können?" - shareAccessAsk: "Bist du dir sicher, dass du diese Anwendung authorisieren möchtest, auf dein Benutzerkonto zugreifen zu können?" + shareAccess: "Möchtest du „{name}“ authorisieren, auf dieses Benutzerkonto zugreifen\ + \ zu können?" + shareAccessAsk: "Bist du dir sicher, dass du diese Anwendung authorisieren möchtest,\ + \ auf dein Benutzerkonto zugreifen zu können?" permissionAsk: "Diese Anwendung fordert folgende Berechtigungen" pleaseGoBack: "Bitte kehre zur Anwendung zurück" callback: "Es wird zur Anwendung zurückgekehrt" @@ -1344,7 +1501,8 @@ _profile: youCanIncludeHashtags: "Du kannst auch Hashtags in deiner Profilbeschreibung verwenden." metadata: "Zusätzliche Informationen" metadataEdit: "Zusätzliche Informationen bearbeiten" - metadataDescription: "Hierdurch kannst du auf deinem Profil zusätzliche Informationsblöcke anzeigen lassen." + metadataDescription: "Hierdurch kannst du auf deinem Profil zusätzliche Informationsblöcke\ + \ anzeigen lassen." metadataLabel: "Beschriftung" metadataContent: "Inhalt" changeAvatar: "Profilbild ändern" @@ -1424,7 +1582,8 @@ _pages: chooseBlock: "Block hinzufügen" selectType: "Typ auswählen" enterVariableName: "Gib einen Variablennamen ein" - variableNameIsAlreadyUsed: "Dieser Name wird bereits von einer anderen Variable verwendet" + variableNameIsAlreadyUsed: "Dieser Name wird bereits von einer anderen Variable\ + \ verwendet" contentBlocks: "Inhalt" inputBlocks: "Eingabe" specialBlocks: "Spezial" @@ -1665,7 +1824,8 @@ _pages: _for: arg1: "Anzahl der Schleifendurchläufe" arg2: "Aktion" - typeError: "Slot {slot} akzeptiert Werte vom Typ „{expect}“, aber es wurde ein „{actual}“ Wert angegeben!" + typeError: "Slot {slot} akzeptiert Werte vom Typ „{expect}“, aber es wurde ein\ + \ „{actual}“ Wert angegeben!" thereIsEmptySlot: "Slot {slot} ist leer!" types: string: "Text" @@ -1689,7 +1849,8 @@ _notification: youRenoted: "Renote deiner Notiz von {name}" youGotPoll: "{name} hat in deiner Umfrage abgestimmt" youGotMessagingMessageFromUser: "{name} hat dir eine Chatnachricht gesendet" - youGotMessagingMessageFromGroup: "In die Gruppe {name} wurde eine Chatnachricht gesendet" + youGotMessagingMessageFromGroup: "In die Gruppe {name} wurde eine Chatnachricht\ + \ gesendet" youWereFollowed: "ist dir gefolgt" youReceivedFollowRequest: "Du hast eine Follow-Anfrage erhalten" yourFollowRequestAccepted: "Deine Follow-Anfrage wurde akzeptiert" @@ -1728,9 +1889,11 @@ _deck: profile: "Profil" newProfile: "Neues Profil" deleteProfile: "Profil löschen" - introduction: "Erstelle eine auf dich zugeschneiderte Benutzeroberfläche durch das Aneinanderreihen von Spalten!" + introduction: "Erstelle eine auf dich zugeschneiderte Benutzeroberfläche durch das\ + \ Aneinanderreihen von Spalten!" introduction2: "Klicke auf das + rechts um wann immer du möchtest neue Spalten hinzuzufügen." - widgetsIntroduction: "Drücke bitte \"Widgets bearbeiten\" im Spaltenmenü und füge ein Widget hinzu." + widgetsIntroduction: "Drücke bitte \"Widgets bearbeiten\" im Spaltenmenü und füge\ + \ ein Widget hinzu." _columns: main: "Hauptspalte" widgets: "Widgets" @@ -1740,3 +1903,27 @@ _deck: list: "Listen" mentions: "Erwähnungen" direct: "Direktnachrichten" +enableRecommendedTimeline: Empfohlenen Zeitplan aktivieren +secureMode: Sicherer Modus (Autorisierter Abruf) +instanceSecurity: Instanzsicherheit +manageGroups: Gruppen verwalten +noThankYou: Nein, danke +privateMode: Privater Modus +enableEmojiReactions: Emoji-Reaktionen aktivieren +flagSpeakAsCat: Wie eine Katze sprechen +showEmojisInReactionNotifications: Emojis in Reaktionsbenachrichtigungen anzeigen +userSaysSomethingReason: '{name} sagte {reason}' +hiddenTagsDescription: 'Liste die Hashtags (ohne #) welche du von Trending und Explore + verstecken möchtest. Versteckte Hashtags sind durch andere Wege weiterhin auffindbar.' +addInstance: Instanz hinzufügen +flagSpeakAsCatDescription: Deine Posts werden im Katzenmodus "nya-ifiziert" +hiddenTags: Versteckte Hashtags +antennaInstancesDescription: Nenne einen Instanzen-Host pro Zeile +secureModeInfo: Bei Anfragen an andere Instanzen nicht ohne Nachweis zurücksenden. +renoteMute: Boosts stummschalten +renoteUnmute: Boosts aktivieren +noInstances: Es gibt keine Instanzen +privateModeInfo: Wenn diese Option aktiviert ist, können nur Instanzen auf der Whitelist + mit Deinen Instanzen föderieren. Alle Beiträge werden für die Öffentlichkeit verborgen. +allowedInstances: Instanzen auf der Whitelist +selectInstance: Wähle eine Instanz diff --git a/locales/el-GR.yml b/locales/el-GR.yml index d32dd9c728..9b234f5ebf 100644 --- a/locales/el-GR.yml +++ b/locales/el-GR.yml @@ -1,22 +1,21 @@ ---- _lang_: "Ελληνικά" -monthAndDay: "{μήνας}/{ημέρα}" +monthAndDay: "{day}/{month}" search: "Αναζήτηση" notifications: "Ειδοποιήσεις" username: "Όνομα μέλους" password: "Κωδικός πρόσβασης" forgotPassword: "Ξέχασα τον κωδικό πρόσβασης" -fetchingAsApObject: "Μαζεύοντας από το Fediverse..." +fetchingAsApObject: "Άντληση από το Fediverse" ok: "Εντάξει" gotIt: "Τό'πιασα!" cancel: "Ακύρωση" -enterUsername: "Εισάγετε το όνομα μέλους" -renotedBy: "Κοινοποιήθηκε από {user}" -noNotes: "Δεν υπάρχουν σημειώματα" +enterUsername: "Εισαγωγή ονόματος μέλους" +renotedBy: "Προωθήθηκε από {user}" +noNotes: "Δεν υπάρχουν δημοσιεύσεις" noNotifications: "Δεν υπάρχουν ειδοποιήσεις" settings: "Ρυθμίσεις" -basicSettings: "Βασικές ρυθμίσεις" -otherSettings: "Άλλες ρυθμίσεις" +basicSettings: "Βασικές Ρυθμίσεις" +otherSettings: "Άλλες Ρυθμίσεις" openInWindow: "Άνοιγμα σε παράθυρο" profile: "Προφίλ" timeline: "Χρονολόγιο" @@ -24,24 +23,25 @@ noAccountDescription: "Αυτό το μέλος δεν έχει γράψει β login: "Σύνδεση" loggingIn: "Συνδέεστε" logout: "Αποσύνδεση" -signup: "Δημιουργία λογαριασμού" +signup: "Εγγραφή" uploading: "Ανέβασμα..." save: "Αποθήκευση" users: "Μέλη" addUser: "Προσθήκη μέλους" -favorite: "Προσθήκη στα αγαπημένα" -favorites: "Αγαπημένα" -unfavorite: "Αφαίρεση από αγαπημένα" -favorited: "Προστέθηκε στα αγαπημένα." -alreadyFavorited: "Έχει ήδη προστεθεί στα αγαπημένα." -cantFavorite: "Αδυναμία προσθήκης στα αγαπημένα." +favorite: "Προσθήκη στους σελιδοδείκτες" +favorites: "Σελιδοδείκτες" +unfavorite: "Αφαίρεση από τους σελιδοδείκτες" +favorited: "Προστέθηκε στους σελιδοδείκτες." +alreadyFavorited: "Έχει ήδη προστεθεί στους σελιδοδείκτες." +cantFavorite: "Αδυναμία προσθήκης στους σελιδοδείκτες." pin: "Καρφίτσωμα στο προφίλ" unpin: "Ξεκαρφίτσωμα από το προφίλ" copyContent: "Αντιγραφή περιεχομένων" copyLink: "Αντιγραφή συνδέσμου" delete: "Διαγραφή" deleteAndEdit: "Διαγραφή και επεξεργασία" -deleteAndEditConfirm: "Σίγουρα θέλετε να διαγράψετε αυτό το σημείωμα και να το επεξεργαστείτε; Θα χάσετε όλες τις αντιδράσεις, κοινοποιήσεις και απαντήσεις σε αυτό." +deleteAndEditConfirm: "Σίγουρα θέλετε να διαγράψετε αυτή τη δημοσίευση και να την\ + \ επεξεργαστείτε; Θα χάσετε όλες τις αντιδράσεις, προωθήσεις και απαντήσεις σε αυτήν." addToList: "Προσθήκη στη λίστα" sendMessage: "Αποστολή μηνύματος" copyUsername: "Αντιγραφή ονόματος μέλους" @@ -55,20 +55,22 @@ receiveFollowRequest: "Λάβατε αίτημα ακολούθησης" followRequestAccepted: "Το αίτημα ακολούθησης έγινε δεκτό" mention: "Επισήμανση" mentions: "Επισημάνσεις" -directNotes: "Απευθείας σημειώματα" -importAndExport: "Εισαγωγή / Εξαγωγή" +directNotes: "Απευθείας μηνύματα" +importAndExport: "Εισαγωγή/Εξαγωγή Δεδομένων" import: "Εισαγωγή" export: "Εξαγωγή" files: "Αρχεία" -download: "Λήψη" -driveFileDeleteConfirm: "Θέλετε σίγουρα να διαγράψετε το αρχείο \"{name}\"; Τα σημειώματα με αυτό το συνημμένο αρχείο επίσης θα διαγραφούν." +download: "Κατέβασμα" +driveFileDeleteConfirm: "Θέλετε σίγουρα να διαγράψετε το αρχείο \"{name}\"; Οι δημοσιεύσεις\ + \ με αυτό το συνημμένο αρχείο επίσης θα διαγραφούν." unfollowConfirm: "Θέλετε σίγουρα να σταματήσετε να ακολουθείτε το μέλος {name};" -exportRequested: "Ζητήσατε μία εξαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο. Επίσης θα προστεθεί στον Δίσκο σας μόλις ολοκληρωθεί." -importRequested: "Ζητήσατε μία εισαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο." +exportRequested: "Ζητήσατε μία εξαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο. Θα προστεθεί\ + \ στον Αποθηκευτικό Χώρο σας μόλις ολοκληρωθεί." +importRequested: "Ζητήσατε μια εισαγωγή. Αυτό μπορεί να πάρει κάποιον χρόνο." lists: "Λίστες" noLists: "Δεν έχετε λίστες" -note: "Σημείωμα" -notes: "Σημειώματα" +note: "Δημοσίευση" +notes: "Δημοσιεύσεις" following: "Ακολουθεί" followers: "Ακολουθούν" followsYou: "Σε ακολουθεί" @@ -78,69 +80,74 @@ error: "Σφάλμα" somethingHappened: "Προέκυψε ένα σφάλμα" retry: "Προσπάθεια ξανά" pageLoadError: "Ένα σφάλμα προέκυψε φορτώνοντας τη σελίδα." -pageLoadErrorDescription: "Αυτό κανονικά προκαλείται από σφάλματα δικτύου ή από την προσωρινή μνήμη του προγράμματος περιήγησης. Δοκιμάστε να σβήσετε την προσωρινή μνήμη (cache) και ξαναδοκιμάστε μετά από λίγο." -serverIsDead: "Αυτός ο server δεν αποκρίνεται. Παρακαλώ περιμέντε λίγο και δοκιμάστε ξανά." -youShouldUpgradeClient: "Για να δείτε αυτή τη σελίδα, παρακαλώ επαναφορτώστε για να ενημερωθεί το πρόγραμμα." +pageLoadErrorDescription: "Αυτό κανονικά προκαλείται από σφάλματα δικτύου ή από την\ + \ προσωρινή μνήμη του προγράμματος περιήγησης. Δοκιμάστε να σβήσετε την προσωρινή\ + \ μνήμη (cache) και να δοκιμάσετε ξανά μετά από λίγο." +serverIsDead: "Αυτός ο διακομιστής (server) δεν αποκρίνεται. Παρακαλώ περιμένετε λίγο\ + \ και δοκιμάστε ξανά." +youShouldUpgradeClient: "Για να δείτε αυτή τη σελίδα, παρακαλώ επαναφορτώστε για να\ + \ γίνει ενημέρωση." enterListName: "Πληκτρολογήστε ένα όνομα για τη λίστα" privacy: "Ιδιωτικότητα" makeFollowManuallyApprove: "Τα αιτήματα ακολούθησης χρειάζονται έγκριση" defaultNoteVisibility: "Προεπιλεγμένη ορατότητα" follow: "Ακολουθήστε" -followRequest: "Στείλτε αίτημα ακολούθησης" +followRequest: "Ακολουθήστε" followRequests: "Αιτήματα ακολούθησης" unfollow: "Να μην ακολουθώ" followRequestPending: "Το αίτημα ακολούθησης εκκρεμεί" enterEmoji: "Εισάγετε ένα emoji" -renote: "Κοινοποίηση σημειώματος" -unrenote: "Ακύρωση κοινοποίησης" -renoted: "Κοινοποιήθηκε." -cantRenote: "Αυτή η δημοσίευση δεν μπορεί να κοινοποιηθεί." -cantReRenote: "Μία κοινοποίηση δεν μπορεί να κοινοποιηθεί." +renote: "Προώθηση" +unrenote: "Αναίρεση προώθησης" +renoted: "Προωθήθηκε." +cantRenote: "Αυτή η δημοσίευση δεν μπορεί να προωθηθεί." +cantReRenote: "Μία προώθηση δεν μπορεί να προωθηθεί." quote: "Παράθεση" -pinnedNote: "Καρφιτσωμένο σημείωμα" +pinnedNote: "Καρφιτσωμένη δημοσίευση" pinned: "Καρφίτσωμα στο προφίλ" you: "Εσύ" clickToShow: "Κάντε κλικ για εμφάνιση" -add: "Προσθέστε" +add: "Προσθήκη" reaction: "Αντιδράσεις" -reactionSetting: "Αντιδράσεις για εμφάνιση στην επιλογή αντίδρασης" -reactionSettingDescription2: "Σύρετε για να αλλάξετε τη σειρά, κάντε κλικ για να διαγράψετε, πατήστε \"+\" για να προσθέσετε." -rememberNoteVisibility: "Θυμήσου τις ρυθμίσεις ορατότητας σημειώματος" -attachCancel: "Διαγραφή αρχείου" +reactionSetting: "Αντιδράσεις που θα εμφανίζονται στον επιλογέα" +reactionSettingDescription2: "Σύρετε για να αλλάξετε τη σειρά, κάντε κλικ για να διαγράψετε,\ + \ πατήστε \"+\" για να προσθέσετε." +rememberNoteVisibility: "Θυμήσου τις ρυθμίσεις ορατότητας για τις δημοσιεύσεις" +attachCancel: "Αφαίρεση επισυναπτόμενου" enterFileName: "Πληκτρολογήστε όνομα αρχείου" mute: "Σίγαση" -unmute: "Άρση σίγασης" +unmute: "Διακοπή σίγασης" block: "Μπλοκάρισμα" -unblock: "Άρση μπλοκαρίσματος" +unblock: "Διακοπή μπλοκαρίσματος" suspend: "Αποβολή" -unsuspend: "Άρση αποβολής" +unsuspend: "Διακοπή αποβολής" blockConfirm: "Θέλετε σίγουρα να μπλοκάρετε αυτόν τον λογαριασμό;" unblockConfirm: "Θέλετε σίγουρα να ξεμπλοκάρετε αυτόν τον λογαριασμό;" -suspendConfirm: "Θέλετε σίγουρα να αποβάλλετε αυτόν τον λογαριασμό;" +suspendConfirm: "Θέλετε σίγουρα να αποβάλετε αυτόν τον λογαριασμό;" unsuspendConfirm: "Θέλετε σίγουρα να άρετε την αποβολή αυτού του λογαριασμού;" -selectList: "Επιλέξτε μία λίστα" -selectAntenna: "Επιλέξτε μία αντένα" -selectWidget: "Επιλέξτε ένα μαραφέτι" -editWidgets: "Επεξεργασία μαραφετίων" +selectList: "Επιλέξτε μια λίστα" +selectAntenna: "Επιλέξτε μια αντένα" +selectWidget: "Επιλέξτε ένα πρόσθετο" +editWidgets: "Επεξεργασία πρόσθετων" editWidgetsExit: "Ολοκληρώθηκε" -customEmojis: "Επιπλέον emoji" +customEmojis: "Προσαρμοσμένα Emoji" emojiName: "Όνομα emoji" -addEmoji: "Προσθήκη emoji" -settingGuide: "Συνιστώμενες ρυθμίσεις" -flagAsBot: "Αυτός ο λογαριασμός είναι bot" -flagAsCat: "Αυτός ο λογαριασμός είναι γάτα" +addEmoji: "Προσθήκη" +settingGuide: "Προτεινόμενες ρυθμίσεις" +flagAsBot: "Δήλωση αυτού του λογαριασμού ως bot" +flagAsCat: "Είσαι γατί; \U0001F63A" flagShowTimelineReplies: "Εμφάνιση απαντήσεων στο χρονολόγιο" addAccount: "Προσθήκη λογαριασμού" general: "Γενικές" wallpaper: "Ταπετσαρία" setWallpaper: "Ορισμός ταπετσαρίας" -removeWallpaper: "Διαγραφή ταπετσαρίας" +removeWallpaper: "Αφαίρεση ταπετσαρίας" searchWith: "Αναζήτηση: {q}" youHaveNoLists: "Δεν έχετε λίστες" followConfirm: "Θέλετε σίγουρα να ακολουθήσετε τον λογαριασμό {name};" -host: "Φιλοξενεί" +host: "Φιλοξενεί (Host)" selectUser: "Επιλέξτε ένα μέλος" -recipient: "Αποδέκτης-τρια" +recipient: "Αποδέκτης-τρια(-ες)" annotation: "Σχόλια" federation: "Ομοσπονδία" storageUsage: "Χρήση χώρου" @@ -148,11 +155,11 @@ version: "Έκδοση" metadata: "Μεταδεδομένα" network: "Δίκτυο" disk: "Δίσκος" -instanceInfo: "Πληροφορίες του instance" +instanceInfo: "Πληροφορίες Instance" statistics: "Στατιστικά" clearQueue: "Εκκαθάριση ουράς" clearQueueConfirmTitle: "Θέλετε να διαγράψετε την ουρά;" -clearCachedFiles: "Εκκαθάριση προσωρινής μνήμης" +clearCachedFiles: "Εκκαθάριση προσωρινής μνήμης (cache)" done: "Ολοκληρώθηκε" attachFile: "Επισύναψη αρχείων" more: "Περισσότερα!" @@ -166,12 +173,12 @@ messaging: "Συνομιλία" upload: "Ανεβάστε" fromDrive: "Από τον Αποθηκευτικό Χώρο" fromUrl: "Από URL" -uploadFromUrl: "Ανεβάστε από URL" -explore: "Εξερευνήστε" +uploadFromUrl: "Ανέβασμα από URL" +explore: "Εξερεύνηση" messageRead: "Διαβάστηκε" -startMessaging: "Ξεκινήστε μία συνομιλία" +startMessaging: "Ξεκινήστε μια νέα συνομιλία" nUsersRead: "διαβάστηκε από {n}" -tos: "Όροι χρήσης" +tos: "Όροι Χρήσης" start: "Ας αρχίσουμε" home: "Κεντρικό" activity: "Δραστηριότητα" @@ -180,8 +187,8 @@ birthday: "Γενέθλια" registeredDate: "Έγινε μέλος στις" location: "Τοποθεσία" theme: "Θέματα" -light: "Ανοιχτόχρωμο" -dark: "Σκούρο" +light: "Φωτεινό" +dark: "Σκοτεινό" drive: "Αποθηκευτικός Χώρος" fileName: "Όνομα αρχείου" selectFile: "Επιλέξτε ένα αρχείο" @@ -189,16 +196,16 @@ selectFiles: "Επιλέξτε αρχεία" selectFolder: "Επιλέξτε φάκελο" selectFolders: "Επιλέξτε φακέλους" renameFile: "Μετονομασία αρχείου" -addFile: "Προσθήκη αρχείου" +addFile: "Προσθέστε ένα αρχείο" emptyDrive: "Ο Αποθηκευτικός Χώρος σας είναι άδειος" -copyUrl: "Αντιγραφή URL" -rename: "Αλλαγή ονόματος" -avatar: "Εικονίδιο" -banner: "Πανό" +copyUrl: "Αντιγραφή διεύθυνσης URL" +rename: "Μετονομασία" +avatar: "Άβαταρ" +banner: "Εξώφυλλο" reload: "Ανανέωση" doNothing: "Αγνόηση" watch: "Παρακολούθηση" -unwatch: "Τέλος παρακολούθησης" +unwatch: "Διακοπή παρακολούθησης" accept: "Αποδοχή" reject: "Απόρριψη" normal: "Κανονικό" @@ -212,23 +219,23 @@ connectService: "Σύνδεση" disconnectService: "Αποσύνδεση" registration: "Εγγραφή" pinnedPages: "Καρφιτσωμένες Σελίδες" -pinnedNotes: "Καρφιτσωμένα σημειώματα" +pinnedNotes: "Καρφιτσωμένες δημοσιεύσεις" antennas: "Αντένες" -manageAntennas: "Διαχείριση αντενών" +manageAntennas: "Διαχείριση Αντενών" name: "Όνομα" -antennaSource: "Πηγή αντένας" +antennaSource: "Πηγή Αντένας" antennaKeywords: "Λέξεις-κλειδιά για παρακολούθηση" -antennaExcludeKeywords: "Λέξεις-κλειδιά για αποκλεισμό" -notifyAntenna: "Ειδοποίηση για νέα σημειώματα" -withFileAntenna: "Μόνο σημειώματα με αρχεία" +antennaExcludeKeywords: "Λέξεις-κλειδιά για εξαίρεση" +notifyAntenna: "Ειδοποίηση για νέες δημοσιεύσεις" +withFileAntenna: "Μόνο δημοσιεύσεις με αρχεία" caseSensitive: "Διάκριση Πεζών-Κεφαλαίων" popularTags: "Δημοφιλείς ετικέτες" userList: "Λίστες" -about: "Πληροφορίες" -moderator: "Συντονιστής" +about: "Σχετικά με" +moderator: "Συντονιστής/στρια" moderation: "Συντονισμός" -cacheClear: "Εκκαθάριση προσωρινής μνήμης" -markAsReadAllNotifications: "Όλες οι ειδοποιήσεις διαβάστηκαν" +cacheClear: "Εκκαθάριση προσωρινής μνήμης (cache)" +markAsReadAllNotifications: "Σημειώστε όλες τις ειδοποιήσεις ως διαβασμένες" group: "Ομάδα" groups: "Ομάδες" createGroup: "Δημιουργία ομάδας" @@ -236,13 +243,13 @@ ownedGroups: "Οι ομάδες σας" groupName: "Όνομα ομάδας" members: "Μέλη" transfer: "Μεταφορά" -messagingWithUser: "Ιδιωτική συνομιλία" +messagingWithUser: "Προσωπική συνομιλία" messagingWithGroup: "Ομαδική συνομιλία" title: "Τίτλος" text: "Κείμενο" enable: "Ενεργοποίηση" next: "Επόμενο" -noteOf: "Σημείωμα από {user}" +noteOf: "Δημοσίευση από {user}" inviteToGroup: "Πρόσκληση στην ομάδα" quoteAttached: "Παράθεση" signinRequired: "Παρακαλούμε δημιουργήστε λογαριασμό ή συνδεθείτε πριν συνεχίσετε" @@ -250,26 +257,26 @@ category: "Κατηγορία" tags: "Ετικέτες" createAccount: "Δημιουργία λογαριασμού" local: "Τοπικό" -remote: "Απομακρυσμένo" +remote: "Απομακρυσμένο" total: "Σύνολο" appearance: "Εμφάνιση" -accountSettings: "Ρυθμίσεις λογαριασμού" +accountSettings: "Ρυθμίσεις Λογαριασμού" sounds: "Ήχοι" sound: "Ήχοι" listen: "Ακρόαση" showInPage: "Εμφάνιση στη σελίδα" volume: "Ένταση" -masterVolume: "Κύρια ένταση" +masterVolume: "Κεντρική ένταση" details: "Λεπτομέρειες" -install: "Εγκατάσταση" -uninstall: "Κατάργηση εγκατάστασης" +install: "Εγκαταστήστε" +uninstall: "Απεγκατάσταση" manage: "Διαχείριση" -smtpHost: "Φιλοξενεί" +smtpHost: "Φιλοξενεί (Host)" smtpUser: "Όνομα μέλους" -smtpPass: "Κωδικός πρόσβασης" +smtpPass: "Κωδικός" notificationSetting: "Ρυθμίσεις ειδοποιήσεων" -notificationSettingDesc: "Επιλέξτε τους τύπους ειδοποιήσεων που εμφανίζονται" -switchUi: "Αλλαγή UI" +notificationSettingDesc: "Επιλέξτε τους τύπους ειδοποιήσεων για προβολή." +switchUi: "Διάταξη" clip: "Κλιπ" driveFilesCount: "Αριθμός αρχείων Αποθηκευτικού Χώρου" driveUsage: "Χρήση Αποθηκευτικού Χώρου" @@ -293,7 +300,8 @@ manageAccounts: "Διαχείριση Λογαριασμών" searchByGoogle: "Αναζήτηση" file: "Αρχεία" recommended: "Προτεινόμενα" -cannotUploadBecauseNoFreeSpace: "Το ανέβασμα απέτυχε λόγω ανεπαρκούς Αποθηκευτικού Χώρου" +cannotUploadBecauseNoFreeSpace: "Το ανέβασμα απέτυχε λόγω ανεπαρκούς Αποθηκευτικού\ + \ Χώρου." _email: _follow: title: "Έχετε ένα νέο ακόλουθο" @@ -327,15 +335,20 @@ _ago: monthsAgo: "{n} μήνα(ες) πριν" yearsAgo: "{n} έτος(η) πριν" _permissions: - "write:drive": "Επεξεργαστείτε ή διαγράψτε τα αρχεία και τους φακέλους του Αποθηκευτικού Χώρου σας" - "read:favorites": "Δείτε τη λίστα των αγαπημένων σας" - "write:favorites": "Επεξεργαστείτε τη λίστα των αγαπημένων σας" + "write:drive": "Επεξεργαστείτε ή διαγράψτε τα αρχεία και τους φακέλους του Αποθηκευτικού\ + \ Χώρου σας" + "read:favorites": "Δείτε τη λίστα με τους σελιδοδείκτες σας" + "write:favorites": "Επεξεργαστείτε τη λίστα με τους σελιδοδείκτες σας" "read:messaging": "Δείτε τις συνομιλίες σας" "write:messaging": "Γράψτε ή διαγράψτε μηνύματα συνομιλίας" "read:notifications": "Δείτε τις ειδοποιήσεις σας" "write:notifications": "Διαχειριστείτε τις ειδοποιήσεις σας" "read:pages": "Δείτε τις Σελίδες σας" "write:pages": "Επεξεργαστείτε ή διαγράψτε τις σελίδες σας" + "write:gallery-likes": Επεξεργασία της λίστας των αγαπημένων σας δημοσιεύσεων γκαλερί + "read:gallery": Δείτε την γκαλερί σας + "write:gallery": Επεξεργασία της γκαλερί σας + "read:gallery-likes": Δείτε τη λίστα των αγαπημένων σας δημοσιεύσεων γκαλερί _antennaSources: all: "Όλα τα σημειώματα" homeTimeline: "Σημειώματα από μέλη που ακολουθείτε" @@ -368,6 +381,7 @@ _visibility: _profile: name: "Όνομα" username: "Όνομα μέλους" + changeAvatar: Αλλαγή άβαταρ _exportOrImport: allNotes: "Όλα τα σημειώματα" followingList: "Ακολουθεί" @@ -398,11 +412,409 @@ _notification: reply: "Απάντηση" renote: "Κοινοποίηση σημειώματος" _deck: - widgetsIntroduction: "Παρακαλούμε επιλέξτε \"Επεξεργασία μαραφετίων\" στο μενού και προσθέστε μαραφέτι." + widgetsIntroduction: "Παρακαλούμε επιλέξτε \"Επεξεργασία πρόσθετων\" στο μενού και\ + \ προσθέστε μαραφέτι." _columns: - widgets: "Μαραφέτια" + widgets: "Πρόσθετα" notifications: "Ειδοποιήσεις" tl: "Χρονολόγιο" antenna: "Αντένες" list: "Λίστα" mentions: "Επισημάνσεις" +sensitive: Ευαίσθητο περιεχόμενο (NSFW) +createFolder: Δημιουργία φακέλου +uploadFromUrlDescription: Το URL του αρχείου που θέλετε να ανεβάσετε +emptyFolder: Αυτός ο φάκελος είναι άδειος +unableToDelete: Αδυναμία διαγραφής +recentlyUpdatedUsers: Πρόσφατα ενεργά μέλη +recentlyRegisteredUsers: Νέα μέλη +exploreUsersCount: Υπάρχουν {count} μέλη +help: Βοήθεια +inputNewFileName: Πληκτρολογήστε ένα νέο όνομα αρχείου +nothing: Δεν υπάρχει τίποτα να δείτε εδώ +newNoteRecived: Υπάρχουν νέες δημοσιεύσεις +passwordMatched: Ταιριάζει +unmarkAsSensitive: Αναίρεση επισήμανσης ως Ευαίσθητο Περιεχόμενο (NSFW) +withNFiles: '{n} αρχείο(-α)' +blockedUsers: Μπλοκαρισμένα μέλη +noteDeleteConfirm: Θέλετε σίγουρα να διαγράψετε αυτή τη δημοσίευση; +preview: Προεπισκόπηση +noCustomEmojis: Δεν υπάρχουν emoji +tosUrl: URL Όρων Χρήσης +monthX: '{month}' +markAsReadAllTalkMessages: Σημειώστε όλα τα μηνύματα ως διαβασμένα +inputMessageHere: Γράψτε εδώ το μήνυμά σας +close: Κλείσιμο +newMessageExists: Υπάρχουν νέα μηνύματα +usernameInvalidFormat: Μπορείτε να χρησιμοποιήσετε κεφαλαία και μικρά γράμματα, αριθμούς, + και κάτω παύλες. +tooShort: Πολύ σύντομο +passwordNotMatched: Δεν ταιριάζει +existingAccount: Υπάρχων λογαριασμός +deleteAll: Διαγραφή όλων +chooseEmoji: Επιλέξτε ένα emoji +sort: Ταξινόμηση +descendingOrder: Φθίνουσα +deleteAllFiles: Διαγραφή όλων των αρχείων +userSuspended: Αυτό το μέλος έχει αποβληθεί. +menu: Μενού +divider: Χώρισμα +deletedNote: Διαγραμμένη δημοσίευση +useCw: Απόκρυψη περιεχομένου +description: Περιγραφή +width: Πλάτος +disableAll: Απενεργοποίηση όλων +notificationType: Τύπος ειδοποίησης +wordMute: Σίγαση λέξεων +userSaysSomething: '{name} είπε κάτι' +metrics: Μετρήσεις +overview: Γενική εικόνα +database: Βάση δεδομένων +channel: Κανάλια +other: Άλλα +abuseReports: Αναφορές +reportAbuse: Αναφορά +unclip: Ακύρωση κλιπ +public: Δημόσιο +renotedCount: Αριθμός προωθήσεων που ελήφθησαν +alwaysMarkSensitive: Επισήμανση ως ευαίσθητο περιεχόμενο (NSFW) ως προεπιλογή +markAllAsRead: Σημειώστε τα όλα ως διαβασμένα +_gallery: + like: Μου αρέσει + liked: Αγαπημένες δημοσιεύσεις + my: Η Γκαλερί μου + unlike: Δεν μου αρέσει +showOnRemote: Δείτε στο απομακρυσμένο instance +perDay: Ανά Ημέρα +software: Λογισμικό +cpuAndMemory: CPU και Μνήμη +noUsers: Δεν υπάρχουν μέλη +processing: Επεξεργασία... +changePassword: Αλλαγή κωδικού +security: Ασφάλεια +featured: Προτεινόμενα +keepOriginalUploading: Διατήρηση πρωτότυπης εικόνας +manageGroups: Διαχείριση ομάδων +deleteFolder: Διαγραφή φακέλου +nsfw: Ευαίσθητο περιεχόμενο (NSFW) +nUsersMentioned: Έχει αναφερθεί από {n} μέλη +notFound: Δεν βρέθηκε +markAsReadAllUnreadNotes: Σημειώστε όλες τις δημοσιεύσεις ως διαβασμένες +invites: Προσκλήσεις +quoteQuestion: Να προστεθεί ως Παράθεση; +noMessagesYet: Δεν υπάρχουν μηνύματα ακόμη +onlyOneFileCanBeAttached: Μπορείτε να επισυνάψετε μόνο ένα αρχείο σε ένα μήνυμα +tooLong: Υπερβολικά μακροσκελές +or: Ή +language: Γλώσσα +groupInvited: Προσκληθήκατε σε μία ομάδα +ascendingOrder: Αύξουσα +visibility: Ορατότητα +invisibleNote: Αόρατη δημοσίευση +enableInfiniteScroll: Αυτόματη φόρτωση περισσοτέρων +poll: Ψηφοφορία +enablePlayer: Άνοιγμα προβολής βίντεο +large: Μεγάλο +medium: Μεσαίο +small: Μικρό +postToGallery: Δημιουργία νέας δημοσίευσης γκαλερί +reloadConfirm: Θα θέλατε να ανανεώσετε το χρονολόγιο; +enableAll: Ενεργοποίηση όλων +permission: Εξουσιοδοτήσεις +sample: Δείγμα +copy: Αντιγραφή +display: Προβολή +send: Αποστολή +behavior: Συμπεριφορά +useGlobalSetting: Χρήση παγκόσμιων ρυθμίσεων +abuseMarkAsResolved: Επισήμανση της αναφοράς ως επιλυμένης +openInNewTab: Άνοιγμα σε νέα καρτέλα +_sensitiveMediaDetection: + setSensitiveFlagAutomatically: Επισήμανση ως ευαίσθητο περιεχόμενο (NSFW) +defaultNavigationBehaviour: Προεπιλεγμένη συμπεριφορά περιήγησης +system: Σύστημα +createNew: Δημιουργία νέου +createNewClip: Δημιουργία νέου κλιπ +repliesCount: Αριθμός απεσταλμένων απαντήσεων +optional: Προαιρετικό +renotesCount: Αριθμός προωθήσεων σε δημοσιεύσεις άλλων +addItem: Προσθήκη αντικειμένου +disablePlayer: Κλείσιμο προβολής βίντεο +describeFile: Προσθήκη περιγραφής +enterFileDescription: Πληκτρολογήστε περιγραφή +author: Συντάκτης/τρια +setMultipleBySeparatingWithSpace: Διαχωρίστε πολλαπλές καταχωρήσεις με κενά. +random: Τυχαίο +accountInfo: Πληροφορίες Λογαριασμού +notesCount: Αριθμός δημοσιεύσεων +repliedCount: Αριθμός απαντήσεων που ελήφθησαν +flagAsCatDescription: Θα έχεις γατοαυτιά και θα μιλάς σαν γατί! +muteAndBlock: Σιγάσεις και Μπλοκαρίσματα +mutedUsers: Σιγασμένα μέλη +editProfile: Επεξεργασία προφίλ +pinLimitExceeded: Δεν μπορείτε να καρφιτσώσετε άλλες δημοσιεύσεις +currentPassword: Τρέχων κωδικός +newPassword: Νέος κωδικός +newPasswordRetype: Ξαναπληκτρολογήστε τον νέο κωδικό +notesAndReplies: Δημοσιεύσεις και απαντήσεις +popularUsers: Δημοφιλή μέλη +share: Κοινοποίηση +retype: Πληκτρολογήστε ξανά +invitations: Προσκλήσεις +available: Διαθέσιμο +unavailable: Μη διαθέσιμο +youHaveNoGroups: Δεν έχετε ομάδες +doing: Επεξεργασία... +yourAccountSuspendedTitle: Αυτός ο λογαριασμός έχει αποβληθεί +leaveConfirm: Υπάρχουν αλλαγές που δεν έχουν σωθεί. Θέλετε να τις απορρίψετε; +height: Ύψος +edit: Επεξεργασία +headlineMisskey: Μία ανοιχτού λογισμικού, αποκεντρωμένη πλατφόρμα κοινωνικής δικτύωσης + που θα είναι για πάντα ελεύθερη! 🚀 +introMisskey: Καλώς ήρθατε! Το Calckey είναι μία ανοιχτού λογισμικού, αποκεντρωμένη + πλατφόρμα κοινωνικής δικτύωσης που θα είναι για πάντα ελεύθερη! 🚀 +markAsSensitive: Επισήμανση ως Ευαίσθητο Περιεχόμενο (NSFW) +autoAcceptFollowed: Αυτόματη έγκριση αιτημάτων ακολούθησης από λογαριασμούς που ακολουθείτε +loginFailed: Αποτυχία σύνδεσης +accountMoved: 'Έχει μεταφερθεί σε νέο λογαριασμό:' +perHour: Ανά Ώρα +remoteUserCaution: Οι πληροφορίες από απομακρυσμένους λογαριασμούς μπορεί να είναι + ατελείς. +folderName: Όνομα φακέλου +renameFolder: Μετονομασία φακέλου +recentUsed: Χρησιμοποιήθηκαν πρόσφατα +deleteAllFilesConfirm: Σίγουρα θέλετε να διαγράψετε όλα τα αρχεία; +removeAllFollowing: Διακοπή ακολούθησης όλων των ακολουθούμενων μελών +userSilenced: Αυτό το μέλος είναι υπό σιώπηση. +makeActive: Ενεργοποίηση +create: Δημιουργία +reportAbuseOf: Αναφορά {name} +cacheRemoteFilesDescription: Όταν αυτή η ρύθμιση είναι απενεργοποιημένη, τα απομακρυσμένα + αρχεία φορτώνονται απευθείας από το απομακρυσμένο instance. Η απενεργοποίηση θα + μειώσει τη χρήση του δίσκου σας, αλλά θα αυξήσει την κίνηση δεδομένων, καθώς δεν + θα δημιουργούνται σμικρύνσεις αρχείων (thumbnails). +registeredAt: Εγγράφηκε στις +latestStatus: Τελευταία κατάσταση +charts: Πίνακες +stopActivityDelivery: Σταμάτα να στέλνεις δραστηριότητες +operations: Λειτουργίες +monitor: Παρακολούθηση +jobQueue: Ουρά εργασιών +blockedInstances: Μπλοκαρισμένα Instances +blockedInstancesDescription: Παραθέστε τις διευθύνσεις (hostnames) των instances που + θέλετε να μπλοκάρετε. Τα παρακάτω instances δεν θα μπορούν πλέον να επικοινωνούν + με αυτό το instance. +intro: Η εγκατάσταση του Calckey τελείωσε! Παρακαλώ δημιουργήστε ένα μέλος διαχειριστή/στρια. +noThankYou: Όχι, ευχαριστώ +addInstance: Προσθήκη instance +renoteMute: Σίγαση προωθήσεων +emojiUrl: Διεύθυνση emoji (URL) +cacheRemoteFiles: Προσωρινή αποθήκευση απομακρυσμένων αρχείων +flagSpeakAsCat: Να μιλάς σαν γατί +flagSpeakAsCatDescription: Οι δημοσιεύσεις σου θα nyaοποιούνται όταν είσαι γατί +selectInstance: Επιλέξτε ένα instance +latestRequestSentAt: Τελευταίο αίτημα στάλθηκε +hiddenTags: Κρυμμένες Ετικέτες (Hashtags) +noInstances: Δεν υπάρχουν instances +renoteUnmute: Διακοπή σίγασης προωθήσεων +flagAsBotDescription: Ενεργοποιήστε αυτή την επιλογή αν αυτός ο λογαριασμός ελέγχεται + από ένα πρόγραμμα. Αν ενεργοποιηθεί, θα λειτουργεί σαν σημάδι για τους προγραμματιστές, + ώστε να αποφύγουν ατέρμονη αλληλεπίδραση με άλλα bots και για να ρυθμίσει τα εσωτερικά + συστήματα του Calckey ώστε να αντιμετωπίζουν αυτόν τον λογαριασμό ως bot. +flagShowTimelineRepliesDescription: Εμφάνιση απαντήσεων μελών σε δημοσιεύσεις άλλων + μελών στο χρονολόγιο. +latestRequestReceivedAt: Τελευταίο αίτημα ελήφθη +blockThisInstance: Μπλοκάρισμα αυτού του instance +clearQueueConfirmText: Τυχόν δημοσιεύσεις στην ουρά που δεν έχουν αποσταλεί δεν θα + ομοσπονδοποιηθούν. Συνήθως αυτή η λειτουργία δεν χρειάζεται. +clearCachedFilesConfirm: Σίγουρα θέλετε να διαγράψετε όλα τα προσωρινά αποθηκευμένα + απομακρυσμένα αρχεία; +default: Προεπιλεγμένο +defaultValueIs: 'Προεπιλεγμένο: {value}' +noJobs: Δεν υπάρχουν εργασίες (jobs) +federating: Ομοσπονδοποιείται +blocked: Μπλοκαρισμένο +suspended: Σε αποβολή +instanceFollowing: Ακολουθεί στο instance +instanceFollowers: Ακόλουθοι του instance +instanceUsers: Μέλη αυτού του instance +retypedNotMatch: Οι καταχωρήσεις δεν ταιριάζουν. +usernameOrUserId: Όνομα μέλους ή ταυτότητα μέλους (id) +removeAreYouSure: Θέλετε σίγουρα να αφαιρέσετε το "{x}"; +deleteAreYouSure: Θέλετε σίγουρα να διαγράψετε το "{x}"; +resetAreYouSure: Σίγουρα επανεκκίνηση; +uploadFromUrlMayTakeTime: Ίσως πάρει λίγο χρόνο μέχρι το ανέβασμα να ολοκληρωθεί. +noMoreHistory: Δεν υπάρχει περαιτέρω ιστορικό +agreeTo: Συμφωνώ στο {0} +yearsOld: '{age} ετών' +themeForDarkMode: Θέμα για τη Σκοτεινή Λειτουργία +syncDeviceDarkMode: Συγχρονισμός της Σκοτεινής Λειτουργίας με τις ρυθμίσεις της συσκευής + σας +inputNewDescription: Προσθέστε νέα περιγραφή +whenServerDisconnected: Όταν χάνεται η σύνδεση στον σέρβερ +disconnectedFromServer: Η σύνδεση στον σέρβερ έχει χαθεί +instanceDescription: Περιγραφή instance +maintainerEmail: Διεύθυνση email προγραμματιστή/στριας +yearX: '{year}' +enableGlobalTimeline: Ενεργοποίηση παγκόσμιου χρονολογίου +enableLocalTimeline: Ενεργοποίηση τοπικού χρονολογίου +enableRegistration: Ενεργοποίηση εγγραφής νέων μελών +invite: Πρόσκληση +disablingTimelinesInfo: Οι Διαχειρίστριες-ες και οι Συντονιστές-στριες θα έχουν πάντα + πρόσβαση σε όλα τα χρονολόγια, ακόμα κι αν δεν είναι ενεργοποιημένα. +inMb: Σε megabytes +iconUrl: Διεύθυνση URL εικονιδίου +bannerUrl: Διεύθυνση URL εικόνας Εξώφυλλου +pinnedUsers: Καρφιτσωμένα μέλη +hcaptchaSiteKey: Κλειδί του site +recaptcha: Προστασία reCAPTCHA +enableServiceworker: Ενεργοποίηση Ειδοποιήσεων Push για τον browser σας +recentlyDiscoveredUsers: Μέλη που ανακαλύφθηκαν πρόσφατα +twoStepAuthentication: Επαλήθευση δύο παραγόντων +securityKey: Κλειδί ασφάλειας +registerSecurityKey: Καταχωρήστε ένα κλειδί ασφάλειας +resetPassword: Επαναφορά κωδικού +newPasswordIs: Ο νέος κωδικός είναι "{password}" +uploadFolder: Προεπιλεγμένος φάκελος για ανέβασμα αρχείων +joinedGroups: Οι ομάδες που είστε μέλος +checking: Έλεγχος... +invitationCode: Κωδικός πρόσκλησης +normalPassword: Μέτριος κωδικός +weakPassword: Αδύναμος κωδικός +strongPassword: Δυνατός κωδικός +signinWith: Συνδεθείτε με {x} +tapSecurityKey: Βάλτε το κλειδί ασφάλειας +signinFailed: Αδυναμία σύνδεσης. Το όνομα μέλους ή ο κωδικός είναι λάθος. +aboutX: Σχετικά με {x} +useOsNativeEmojis: Χρήση των Emoji του λειτουργικού συστήματος +uiLanguage: Γλώσσα διεπαφής +disableDrawer: Να μη χρησιμοποιούνται μενού σε στιλ συρταριού +noHistory: Δεν υπάρχει διαθέσιμο ιστορικό +joinOrCreateGroup: Λάβετε πρόσκληση για μία ομάδα ή δημιουργήστε τη δική σας. +docSource: Πηγή αυτού του εγγράφου +regenerate: Επαναδημιουργία +fontSize: Μέγεθος γραμματοσειράς +noFollowRequests: Δεν έχετε αιτήματα ακολούθησης σε αναμονή +dashboard: Ταμπλό +clientSettings: Ρυθμίσεις διεπαφής +numberOfDays: Αριθμός ημερών +hideThisNote: Απόκρυψη αυτής της δημοσίευσης +showFeaturedNotesInTimeline: Εμφάνιση προτεινόμενων δημοσιεύσεων στα χρονολόγια +objectStorage: Αποθήκευση Object Storage +useObjectStorage: Χρήση object storage +objectStorageBucket: '' +showFixedPostForm: Εμφάνιση της φόρμας δημοσίευσης στο πάνω μέρος των χρονολογίων +none: Κανένα +unableToProcess: Η επιχείρηση ήταν αδύνατο να ολοκληρωθεί +installedApps: Εφαρμογές με εξουσιοδότηση +state: Κατάσταση +installedDate: Εξουσιοδοτήθηκε στις +lastUsedDate: Χρησιμοποιήθηκε τελευταία φορά στις +scratchpadDescription: Το σημειωματάριο παρέχει ένα περιβάλλον για πειραματισμό με + AiScript. Σε αυτό μπορείτε να γράψετε, να εκτελέσετε, και να δοκιμάσετε τα αποτελέσματα + της αλληλεπίδρασης του AiScript με το Calckey. +scratchpad: Σημειωματάριο +output: Αποτέλεσμα +updateRemoteUser: Ανανέωση πληροφοριών απομακρυσμένου μέλους +disablePagesScript: Απενεργοποίηση του AiScript στις Σελίδες +removeAllFollowingDescription: Η εκτέλεση θα διακόψη την ακολούθηση όλων των μελών + από {host}. Παρακαλούμε εκτελέστε το αν το instance π.χ. δεν υπάρχει πια. +caption: Αυτόματη Περιγραφή +all: Όλα +subscribing: Εγγραφή σε συνδρομή +publishing: Δημοσιεύεται +notResponding: Δεν αποκρίνεται +keepOriginalUploadingDescription: Αποθηκεύει το πρωτότυπο αρχείο όπως είναι. Αν απενεργοποιηθεί, + μία έκδοση για προβολή στο ίντερνετ θα δημιουργηθεί κατά το ανέβασμα. +lookup: Αναζήτηση +lightThemes: Φωτεινά θέματα +darkThemes: Σκοτεινά θέματα +inputNewFolderName: Πληκτρολογήστε ένα νέο όνομα φακέλου +hasChildFilesOrFolders: Εφόσον αυτός ο φάκελος δεν είναι άδειος, δεν μπορεί να διαγραφεί. +integration: Ενσωματώσεις +enableRecommendedTimeline: Ενεργοποίηση χρονολογίου προτεινόμενων +driveCapacityPerLocalAccount: Μέγεθος Αποθηκευτικού Χώρου ανά τοπικό μέλος +driveCapacityPerRemoteAccount: Μέγεθος Αποθηκευτικού Χώρου ανά απομακρυσμένο μέλος +basicInfo: Βασικές πληροφορίες +pinnedClipId: Ταυτότητα (id) του κλιπ για καρφίτσωμα +hcaptcha: Προστασία hCaptcha +enableHcaptcha: Ενεργοποίηση hCaptcha +hcaptchaSecretKey: Μυστικό κλειδί +enableRecaptcha: Ενεργοποίηση reCAPTCHA +recaptchaSiteKey: Κλειδί του site +recaptchaSecretKey: Μυστικό κλειδί +antennaKeywordsDescription: Διαχωρίστε με κενά για συνθήκη ΚΑΙ ή με αλλαγή γραμμής + για συνθήκη Ή. +antennaUsersDescription: Παραθέστε ένα όνομα μέλους ανά γραμμή +antennaInstancesDescription: Παραθέστε ένα instance host ανά γραμμή +withReplies: Να περιλαμβάνονται οι απαντήσεις +withFiles: Να περιλαμβάνουν αρχεία +silence: Σιώπηση +silenceConfirm: Θέλετε σίγουρα να σιωπήσετε αυτό το μέλος; +unsilenceConfirm: Σίγουρα θέλετε να αναιρέσετε τη σιώπηση αυτού του μέλους; +securityKeyName: Όνομα κλειδιού +lastUsed: Τελευταία χρήση +unregister: Απεγγραφή +notFoundDescription: Δεν ήταν δυνατό να βρεθεί σελίδα που να ανταποκρίνεται σε αυτή + τη διεύθυνση URL. +signinHistory: Ιστορικό συνδέσεων +disableAnimatedMfm: Απενεργοποίηση του MFM με κίνηση +dayOverDayChanges: Αλλαγές την τελευταία ημέρα +promotion: Προμοταρισμένα +promote: Προμοτάρισμα +squareAvatars: Εμφάνιση τετραγωνισμένων άβαταρ +aboutMisskey: Σχετικά με το Calckey +maintainerName: Προγραμματιστής/στρια +uploadFromUrlRequested: Το ανέβασμα ζητήθηκε +themeForLightMode: Θέμα για τη Φωτεινή Λειτουργία +circularReferenceFolder: Ο φάκελος του προορισμού είναι υποφάκελος του φακέλου που + θέλετε να μετακινήσετε. +backgroundImageUrl: Διεύθυνση URL εικόνας φόντου +pinnedUsersDescription: Παραθέστε τα ονόματα μελών που θα είναι καρφιτσωμένα στην + καρτέλα "Εξερεύνηση" χωρίζοντάς τα με αλλαγή γραμμής. +openImageInNewTab: Άνοιγμα εικόνων σε νέα καρτέλα +weekOverWeekChanges: Αλλαγές την τελευταία εβδομάδα +exploreFediverse: Εξερευνήστε το Fediverse +unsilence: Αναίρεση σιώπησης +administrator: Διαχειριστής/στρια +passwordLessLogin: Σύνδεση χωρίς κωδικό +reduceUiAnimation: Ελάττωση των κινούμενων εικόνων +serviceworkerInfo: Πρέπει να είναι ενεργοποιημένο για ειδοποιήσεις push. +expandTweet: Διεύρυνση τουιτ +themeEditor: Επεξεργασία θεμάτων +deck: Ντεκ +undeck: Έξοδος από το Ντεκ +useFullReactionPicker: Χρήση επιλογέα αντιδράσεων πλήρους μεγέθους +tokenRequested: Παροχή πρόσβασης στον λογαριασμό +emailServer: Σέρβερ email +enableEmail: Ενεργοποίηση του email distribution +emailAddress: Διεύθυνση email +emailConfigInfo: Χρησιμοποιείται για επιβεβαίωση του email σας κατά την εγγραφή ή + αν ξεχάσετε τον κωδικό σας +regenerateLoginToken: Επαναδημιουργία token σύνδεσης +fileIdOrUrl: Ταυτότητα αρχείου (ID) ή διεύθυνση URL +typingUsers: '{users} πληκτρολογεί' +yourAccountSuspendedDescription: Αυτός ο λογαριασμός έχει αποβληθεί λόγω μη συμμόρφωσης + με τους κανόνες του σέρβερ ή κάτι παρόμοιο. Επικοινωνήστε με τον διαχειριστή/στρια + αν θα θέλατε έναν πιο λεπτομερή λόγο. Παρακαλούμε μη δημιουργήσετε νέο λογαριασμό. +inboxUrl: Διεύθυνση URL των Εισερχομένων +generateAccessToken: Δημιουργία token πρόσβασης +emptyToDisableSmtpAuth: Αφήστε το όνομα μέλους και τον κωδικό άδεια για να απενεργοποιήσετε + την επαλήθευση SMTP +instanceMute: Σιγάσεις instance +userSaysSomethingReason: '{name} είπε {reason}' +logs: Αρχεία καταγραφής +abuseReported: Η αναφορά σας στάλθηκε. Ευχαριστούμε πολύ. +reporter: Έκανε την αναφορά +reporteeOrigin: Καταγωγή αναφερόμενου λογαριασμού +reporterOrigin: Καταγωγή λογαριασμού που έκανε την αναφορά +forwardReport: Προώθηση της αναφοράς στο απομακρυσμένο instance +openInSideView: Άνοιγμα σε προβολή παράθεσης +delayed: Με καθυστέρηση +useGlobalSettingDesc: Αν ενεργοποιηθεί, οι ρυθμίσεις ειδοποιήσεων του λογαριασμού + σας θα χρησιμοποιηθούν. Αν απενεργοποιηθεί, μπορούν να γίνουν ανεξάρτητες ρυθμίσεις. +fillAbuseReportDescription: Παρακαλούμε συμπληρώστε λεπτομέρειες σχετικά με αυτή την + αναφορά. Αν πρόκειται για συγκεκριμένη δημοσίευση, παρακαλούμε συμπεριλάβετε τη + διεύθυνση URL της δημοσίευσης. +forwardReportIsAnonymous: Αντί για τον λογαριασμό σας, μία ανώνυμη αναφορά από λογαριασμό + του συστήματος θα εμφανιστεί στο απομακρυσμένο instance. diff --git a/locales/en-US.yml b/locales/en-US.yml index 173404e7c4..2feb2cd947 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1,7 +1,8 @@ ---- _lang_: "English" -headlineMisskey: "An open source, decentralized social media platform that's free forever! 🚀" -introMisskey: "Welcome! Calckey is an open source, decentralized social media platform that's free forever! 🚀" +headlineMisskey: "An open source, decentralized social media platform that's free\ + \ forever! \U0001F680" +introMisskey: "Welcome! Calckey is an open source, decentralized social media platform\ + \ that's free forever! \U0001F680" monthAndDay: "{month}/{day}" search: "Search" notifications: "Notifications" @@ -12,6 +13,7 @@ fetchingAsApObject: "Fetching from the Fediverse" ok: "OK" gotIt: "Got it!" cancel: "Cancel" +noThankYou: "No thank you" enterUsername: "Enter username" renotedBy: "Boosted by {user}" noNotes: "No posts" @@ -45,7 +47,8 @@ copyContent: "Copy contents" copyLink: "Copy link" delete: "Delete" deleteAndEdit: "Delete and edit" -deleteAndEditConfirm: "Are you sure you want to delete this post and edit it? You will lose all reactions, boosts and replies to it." +deleteAndEditConfirm: "Are you sure you want to delete this post and edit it? You\ + \ will lose all reactions, boosts and replies to it." addToList: "Add to list" sendMessage: "Send a message" copyUsername: "Copy username" @@ -65,9 +68,11 @@ import: "Import" export: "Export" files: "Files" download: "Download" -driveFileDeleteConfirm: "Are you sure you want to delete the file \"{name}\"? Posts with this file attached will also be deleted." +driveFileDeleteConfirm: "Are you sure you want to delete the file \"{name}\"? Posts\ + \ with this file attached will also be deleted." unfollowConfirm: "Are you sure that you want to unfollow {name}?" -exportRequested: "You've requested an export. This may take a while. It will be added to your Drive once completed." +exportRequested: "You've requested an export. This may take a while. It will be added\ + \ to your Drive once completed." importRequested: "You've requested an import. This may take a while." lists: "Lists" noLists: "You don't have any lists" @@ -82,7 +87,8 @@ error: "Error" somethingHappened: "An error has occurred" retry: "Retry" pageLoadError: "An error occurred loading the page." -pageLoadErrorDescription: "This is normally caused by network errors or the browser's cache. Try clearing the cache and then try again after waiting a little while." +pageLoadErrorDescription: "This is normally caused by network errors or the browser's\ + \ cache. Try clearing the cache and then try again after waiting a little while." serverIsDead: "This server is not responding. Please wait for a while and try again." youShouldUpgradeClient: "To view this page, please refresh to update your client." enterListName: "Enter a name for the list" @@ -108,6 +114,8 @@ clickToShow: "Click to show" sensitive: "NSFW" add: "Add" reaction: "Reactions" +enableEmojiReactions: "Enable emoji reactions" +showEmojisInReactionNotifications: "Show emojis in reaction notifications" reactionSetting: "Reactions to show in the reaction picker" reactionSettingDescription2: "Drag to reorder, click to delete, press \"+\" to add." rememberNoteVisibility: "Remember post visibility settings" @@ -117,6 +125,8 @@ unmarkAsSensitive: "Unmark as NSFW" enterFileName: "Enter filename" mute: "Mute" unmute: "Unmute" +renoteMute: "Mute boosts" +renoteUnmute: "Unmute boosts" block: "Block" unblock: "Unblock" suspend: "Suspend" @@ -138,13 +148,21 @@ emojiUrl: "Emoji URL" addEmoji: "Add" settingGuide: "Recommended settings" cacheRemoteFiles: "Cache remote files" -cacheRemoteFilesDescription: "When this setting is disabled, remote files are loaded directly from the remote instance. Disabling this will decrease storage usage, but increase traffic, as thumbnails will not be generated." +cacheRemoteFilesDescription: "When this setting is disabled, remote files are loaded\ + \ directly from the remote instance. Disabling this will decrease storage usage,\ + \ but increase traffic, as thumbnails will not be generated." flagAsBot: "Mark this account as a bot" -flagAsBotDescription: "Enable this option if this account is controlled by a program. If enabled, it will act as a flag for other developers to prevent endless interaction chains with other bots and adjust Calckey's internal systems to treat this account as a bot." -flagAsCat: "Are you a cat? 😺" +flagAsBotDescription: "Enable this option if this account is controlled by a program.\ + \ If enabled, it will act as a flag for other developers to prevent endless interaction\ + \ chains with other bots and adjust Calckey's internal systems to treat this account\ + \ as a bot." +flagAsCat: "Are you a cat? \U0001F63A" flagAsCatDescription: "You'll get cat ears and speak like a cat!" +flagSpeakAsCat: "Speak as a cat" +flagSpeakAsCatDescription: "Your posts will get nyanified when in cat mode" flagShowTimelineReplies: "Show replies in timeline" -flagShowTimelineRepliesDescription: "Shows replies of users to posts of other users in the timeline if turned on." +flagShowTimelineRepliesDescription: "Shows replies of users to posts of other users\ + \ in the timeline if turned on." autoAcceptFollowed: "Automatically approve follow requests from users you're following" addAccount: "Add account" loginFailed: "Failed to sign in" @@ -157,8 +175,11 @@ removeWallpaper: "Remove wallpaper" searchWith: "Search: {q}" youHaveNoLists: "You don't have any lists" followConfirm: "Are you sure that you want to follow {name}?" -proxyAccount: "Proxy account" -proxyAccountDescription: "A proxy account is an account that acts as a remote follower for users under certain conditions. For example, when a user adds a remote user to the list, the remote user's activity will not be delivered to the instance if no local user is following that user, so the proxy account will follow instead." +proxyAccount: "Proxy Account" +proxyAccountDescription: "A proxy account is an account that acts as a remote follower\ + \ for users under certain conditions. For example, when a user adds a remote user\ + \ to the list, the remote user's activity will not be delivered to the instance\ + \ if no local user is following that user, so the proxy account will follow instead." host: "Host" selectUser: "Select a user" selectInstance: "Select an instance" @@ -190,11 +211,17 @@ instanceInfo: "Instance Information" statistics: "Statistics" clearQueue: "Clear queue" clearQueueConfirmTitle: "Are you sure that you want to clear the queue?" -clearQueueConfirmText: "Any undelivered posts remaining in the queue will not be federated. Usually this operation is not needed." +clearQueueConfirmText: "Any undelivered posts remaining in the queue will not be federated.\ + \ Usually this operation is not needed." clearCachedFiles: "Clear cache" clearCachedFilesConfirm: "Are you sure that you want to delete all cached remote files?" blockedInstances: "Blocked Instances" -blockedInstancesDescription: "List the hostnames of the instances that you want to block. Listed instances will no longer be able to communicate with this instance." +blockedInstancesDescription: "List the hostnames of the instances that you want to\ + \ block. Listed instances will no longer be able to communicate with this instance." +hiddenTags: "Hidden Hashtags" +hiddenTagsDescription: "List the hashtags (without the #) of the hashtags you wish\ + \ to hide from trending and explore. Hidden hashtags are still discoverable via\ + \ other means." muteAndBlock: "Mutes and Blocks" mutedUsers: "Muted users" blockedUsers: "Blocked users" @@ -244,7 +271,8 @@ saved: "Saved" messaging: "Chat" upload: "Upload" keepOriginalUploading: "Keep original image" -keepOriginalUploadingDescription: "Saves the originally uploaded image as-is. If turned off, a version to display on the web will be generated on upload." +keepOriginalUploadingDescription: "Saves the originally uploaded image as-is. If turned\ + \ off, a version to display on the web will be generated on upload." fromDrive: "From Drive" fromUrl: "From URL" uploadFromUrl: "Upload from a URL" @@ -294,7 +322,8 @@ unableToDelete: "Unable to delete" inputNewFileName: "Enter a new filename" inputNewDescription: "Enter new caption" inputNewFolderName: "Enter a new folder name" -circularReferenceFolder: "The destination folder is a subfolder of the folder you wish to move." +circularReferenceFolder: "The destination folder is a subfolder of the folder you\ + \ wish to move." hasChildFilesOrFolders: "Since this folder is not empty, it can not be deleted." copyUrl: "Copy URL" rename: "Rename" @@ -323,13 +352,14 @@ dayX: "{day}" monthX: "{month}" yearX: "{year}" pages: "Pages" -integration: "Integration" +integration: "Integrations" connectService: "Connect" disconnectService: "Disconnect" enableLocalTimeline: "Enable local timeline" enableGlobalTimeline: "Enable global timeline" enableRecommendedTimeline: "Enable recommended timeline" -disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all timelines, even if they are not enabled." +disablingTimelinesInfo: "Adminstrators and Moderators will always have access to all\ + \ timelines, even if they are not enabled." registration: "Register" enableRegistration: "Enable new user registration" invite: "Invite" @@ -341,9 +371,11 @@ bannerUrl: "Banner image URL" backgroundImageUrl: "Background image URL" basicInfo: "Basic info" pinnedUsers: "Pinned users" -pinnedUsersDescription: "List usernames separated by line breaks to be pinned in the \"Explore\" tab." +pinnedUsersDescription: "List usernames separated by line breaks to be pinned in the\ + \ \"Explore\" tab." pinnedPages: "Pinned Pages" -pinnedPagesDescription: "Enter the paths of the Pages you want to pin to the top page of this instance, separated by line breaks." +pinnedPagesDescription: "Enter the paths of the Pages you want to pin to the top page\ + \ of this instance, separated by line breaks." pinnedClipId: "ID of the clip to pin" pinnedNotes: "Pinned posts" hcaptcha: "hCaptcha" @@ -354,14 +386,17 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "Enable reCAPTCHA" recaptchaSiteKey: "Site key" recaptchaSecretKey: "Secret key" -avoidMultiCaptchaConfirm: "Using multiple Captcha systems may cause interference between them. Would you like to disable the other Captcha systems currently active? If you would like them to stay enabled, press cancel." +avoidMultiCaptchaConfirm: "Using multiple Captcha systems may cause interference between\ + \ them. Would you like to disable the other Captcha systems currently active? If\ + \ you would like them to stay enabled, press cancel." antennas: "Antennas" manageAntennas: "Manage Antennas" name: "Name" antennaSource: "Antenna source" antennaKeywords: "Keywords to listen to" antennaExcludeKeywords: "Keywords to exclude" -antennaKeywordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition." +antennaKeywordsDescription: "Separate with spaces for an AND condition or with line\ + \ breaks for an OR condition." notifyAntenna: "Notify about new posts" withFileAntenna: "Only posts with files" enableServiceworker: "Enable Push-Notifications for your Browser" @@ -491,19 +526,27 @@ showFeaturedNotesInTimeline: "Show featured posts in timelines" objectStorage: "Object Storage" useObjectStorage: "Use object storage" objectStorageBaseUrl: "Base URL" -objectStorageBaseUrlDesc: "The URL used as reference. Specify the URL of your CDN or Proxy if you are using either.\nFor S3 use 'https://.s3.amazonaws.com' and for GCS or equivalent services use 'https://storage.googleapis.com/', etc." +objectStorageBaseUrlDesc: "The URL used as reference. Specify the URL of your CDN\ + \ or Proxy if you are using either.\nFor S3 use 'https://.s3.amazonaws.com'\ + \ and for GCS or equivalent services use 'https://storage.googleapis.com/',\ + \ etc." objectStorageBucket: "Bucket" objectStorageBucketDesc: "Please specify the bucket name used at your provider." objectStoragePrefix: "Prefix" objectStoragePrefixDesc: "Files will be stored under directories with this prefix." objectStorageEndpoint: "Endpoint" -objectStorageEndpointDesc: "Leave this empty if you are using AWS S3, otherwise specify the endpoint as '' or ':', depending on the service you are using." +objectStorageEndpointDesc: "Leave this empty if you are using AWS S3, otherwise specify\ + \ the endpoint as '' or ':', depending on the service you are\ + \ using." objectStorageRegion: "Region" -objectStorageRegionDesc: "Specify a region like 'xx-east-1'. If your service does not distinguish between regions, leave this blank or enter 'us-east-1'." +objectStorageRegionDesc: "Specify a region like 'xx-east-1'. If your service does\ + \ not distinguish between regions, leave this blank or enter 'us-east-1'." objectStorageUseSSL: "Use SSL" -objectStorageUseSSLDesc: "Turn this off if you are not going to use HTTPS for API connections" +objectStorageUseSSLDesc: "Turn this off if you are not going to use HTTPS for API\ + \ connections" objectStorageUseProxy: "Connect over Proxy" -objectStorageUseProxyDesc: "Turn this off if you are not going to use a Proxy for API connections" +objectStorageUseProxyDesc: "Turn this off if you are not going to use a Proxy for\ + \ API connections" objectStorageSetPublicRead: "Set \"public-read\" on upload" serverLogs: "Server logs" deleteAll: "Delete all" @@ -531,7 +574,9 @@ sort: "Sort" ascendingOrder: "Ascending" descendingOrder: "Descending" scratchpad: "Scratchpad" -scratchpadDescription: "The scratchpad provides an environment for AiScript experiments. You can write, execute, and check the results of it interacting with Calckey in it." +scratchpadDescription: "The scratchpad provides an environment for AiScript experiments.\ + \ You can write, execute, and check the results of it interacting with Calckey in\ + \ it." output: "Output" script: "Script" disablePagesScript: "Disable AiScript on Pages" @@ -539,11 +584,14 @@ updateRemoteUser: "Update remote user information" deleteAllFiles: "Delete all files" deleteAllFilesConfirm: "Are you sure that you want to delete all files?" removeAllFollowing: "Unfollow all followed users" -removeAllFollowingDescription: "Executing this unfollows all accounts from {host}. Please run this if the instance e.g. no longer exists." +removeAllFollowingDescription: "Executing this unfollows all accounts from {host}.\ + \ Please run this if the instance e.g. no longer exists." userSuspended: "This user has been suspended." userSilenced: "This user is being silenced." yourAccountSuspendedTitle: "This account is suspended" -yourAccountSuspendedDescription: "This account has been suspended due to breaking the server's terms of services or similar. Contact the administrator if you would like to know a more detailed reason. Please do not create a new account." +yourAccountSuspendedDescription: "This account has been suspended due to breaking\ + \ the server's terms of services or similar. Contact the administrator if you would\ + \ like to know a more detailed reason. Please do not create a new account." menu: "Menu" divider: "Divider" addItem: "Add Item" @@ -584,12 +632,14 @@ permission: "Permissions" enableAll: "Enable all" disableAll: "Disable all" tokenRequested: "Grant access to account" -pluginTokenRequestedDescription: "This plugin will be able to use the permissions set here." +pluginTokenRequestedDescription: "This plugin will be able to use the permissions\ + \ set here." notificationType: "Notification type" edit: "Edit" emailServer: "Email server" enableEmail: "Enable email distribution" -emailConfigInfo: "Used to confirm your email during sign-up or if you forget your password" +emailConfigInfo: "Used to confirm your email during sign-up or if you forget your\ + \ password" email: "Email" emailAddress: "Email address" smtpConfig: "SMTP Server Configuration" @@ -603,9 +653,11 @@ smtpSecureInfo: "Turn this off when using STARTTLS" testEmail: "Test email delivery" wordMute: "Word mute" regexpError: "Regular Expression error" -regexpErrorDescription: "An error occurred in the regular expression on line {line} of your {tab} word mutes:" +regexpErrorDescription: "An error occurred in the regular expression on line {line}\ + \ of your {tab} word mutes:" instanceMute: "Instance Mutes" userSaysSomething: "{name} said something" +userSaysSomethingReason: "{name} said {reason}" makeActive: "Activate" display: "Display" copy: "Copy" @@ -619,10 +671,13 @@ create: "Create" notificationSetting: "Notification settings" notificationSettingDesc: "Select the types of notification to display." useGlobalSetting: "Use global settings" -useGlobalSettingDesc: "If turned on, your account's notification settings will be used. If turned off, individual configurations can be made." +useGlobalSettingDesc: "If turned on, your account's notification settings will be\ + \ used. If turned off, individual configurations can be made." other: "Other" regenerateLoginToken: "Regenerate login token" -regenerateLoginTokenDescription: "Regenerates the token used internally during login. Normally this action is not necessary. If regenerated, all devices will be logged out." +regenerateLoginTokenDescription: "Regenerates the token used internally during login.\ + \ Normally this action is not necessary. If regenerated, all devices will be logged\ + \ out." setMultipleBySeparatingWithSpace: "Separate multiple entries with spaces." fileIdOrUrl: "File ID or URL" behavior: "Behavior" @@ -630,13 +685,15 @@ sample: "Sample" abuseReports: "Reports" reportAbuse: "Report" reportAbuseOf: "Report {name}" -fillAbuseReportDescription: "Please fill in details regarding this report. If it is about a specific post, please include its URL." +fillAbuseReportDescription: "Please fill in details regarding this report. If it is\ + \ about a specific post, please include its URL." abuseReported: "Your report has been sent. Thank you very much." reporter: "Reporter" reporteeOrigin: "Reportee Origin" reporterOrigin: "Reporter Origin" forwardReport: "Forward report to remote instance" -forwardReportIsAnonymous: "Instead of your account, an anonymous system account will be displayed as reporter at the remote instance." +forwardReportIsAnonymous: "Instead of your account, an anonymous system account will\ + \ be displayed as reporter at the remote instance." send: "Send" abuseMarkAsResolved: "Mark report as resolved" openInNewTab: "Open in new tab" @@ -654,9 +711,11 @@ createNew: "Create new" optional: "Optional" createNewClip: "Create new clip" unclip: "Unclip" -confirmToUnclipAlreadyClippedNote: "This post is already part of the \"{name}\" clip. Do you want to remove it from this clip instead?" +confirmToUnclipAlreadyClippedNote: "This post is already part of the \"{name}\" clip.\ + \ Do you want to remove it from this clip instead?" public: "Public" -i18nInfo: "Calckey is being translated into various languages by volunteers. You can help at {link}." +i18nInfo: "Calckey is being translated into various languages by volunteers. You can\ + \ help at {link}." manageAccessTokens: "Manage access tokens" accountInfo: "Account Info" notesCount: "Number of posts" @@ -675,12 +734,16 @@ no: "No" driveFilesCount: "Number of Drive files" driveUsage: "Drive space usage" noCrawle: "Reject crawler indexing" -noCrawleDescription: "Ask search engines to not index your profile page, posts, Pages, etc." -lockedAccountInfo: "Unless you set your post visiblity to \"Followers only\", your posts will be visible to anyone, even if you require followers to be manually approved." +noCrawleDescription: "Ask search engines to not index your profile page, posts, Pages,\ + \ etc." +lockedAccountInfo: "Unless you set your post visiblity to \"Followers only\", your\ + \ posts will be visible to anyone, even if you require followers to be manually\ + \ approved." alwaysMarkSensitive: "Mark as NSFW by default" loadRawImages: "Load original images instead of showing thumbnails" disableShowingAnimatedImages: "Don't play animated images" -verificationEmailSent: "A verification email has been sent. Please follow the included link to complete verification." +verificationEmailSent: "A verification email has been sent. Please follow the included\ + \ link to complete verification." notSet: "Not set" emailVerified: "Email has been verified" noteFavoritesCount: "Number of bookmarked posts" @@ -692,7 +755,8 @@ clips: "Clips" experimentalFeatures: "Experimental features" developer: "Developer" makeExplorable: "Make account visible in \"Explore\"" -makeExplorableDescription: "If you turn this off, your account will not show up in the \"Explore\" section." +makeExplorableDescription: "If you turn this off, your account will not show up in\ + \ the \"Explore\" section." showGapBetweenNotesInTimeline: "Show a gap between posts on the timeline" duplicate: "Duplicate" left: "Left" @@ -707,7 +771,10 @@ onlineUsersCount: "{n} users are online" nUsers: "{n} Users" nNotes: "{n} Posts" sendErrorReports: "Send error reports" -sendErrorReportsDescription: "When turned on, detailed error information will be shared with Calckey when a problem occurs, helping to improve the quality of Misskey.\nThis will include information such the version of your OS, what browser you're using, your activity in Calckey, etc." +sendErrorReportsDescription: "When turned on, detailed error information will be shared\ + \ with Calckey when a problem occurs, helping to improve the quality of Calckey.\n\ + This will include information such the version of your OS, what browser you're using,\ + \ your activity in Calckey, etc." myTheme: "My theme" backgroundColor: "Background color" accentColor: "Accent color" @@ -746,14 +813,17 @@ unlikeConfirm: "Really remove your like?" fullView: "Full view" quitFullView: "Exit full view" addDescription: "Add description" -userPagePinTip: "You can display posts here by selecting \"Pin to profile\" from the menu of individual posts." -notSpecifiedMentionWarning: "This post contains mentions of users not included as recipients" +userPagePinTip: "You can display posts here by selecting \"Pin to profile\" from the\ + \ menu of individual posts." +notSpecifiedMentionWarning: "This post contains mentions of users not included as\ + \ recipients" info: "About" userInfo: "User information" unknown: "Unknown" onlineStatus: "Online status" hideOnlineStatus: "Hide online status" -hideOnlineStatusDescription: "Hiding your online status reduces the convenience of some features such as the search." +hideOnlineStatusDescription: "Hiding your online status reduces the convenience of\ + \ some features such as the search." online: "Online" active: "Active" offline: "Offline" @@ -790,16 +860,19 @@ secureMode: "Secure Mode (Authorized Fetch)" instanceSecurity: "Instance Security" secureModeInfo: "When requesting from other instances, do not send back without proof." privateMode: "Private Mode" -privateModeInfo: "When enabled, only whitelisted instances can federate with your instances. All posts will be hidden from the public." +privateModeInfo: "When enabled, only whitelisted instances can federate with your\ + \ instances. All posts will be hidden from the public." allowedInstances: "Whitelisted Instances" -allowedInstancesDescription: "Hosts of instances to be whitelisted for federation, each seperated by a new line (only applies in private mode)." +allowedInstancesDescription: "Hosts of instances to be whitelisted for federation,\ + \ each separated by a new line (only applies in private mode)." previewNoteText: "Show preview" customCss: "Custom CSS" -customCssWarn: "This setting should only be used if you know what it does. Entering improper values may cause the client to stop functioning normally." +customCssWarn: "This setting should only be used if you know what it does. Entering\ + \ improper values may cause the client to stop functioning normally." global: "Global" recommended: "Recommended" squareAvatars: "Display squared avatars" -seperateRenoteQuote: "Seperate boost and quote buttons" +seperateRenoteQuote: "Separate boost and quote buttons" sent: "Sent" received: "Received" searchResult: "Search results" @@ -812,7 +885,9 @@ whatIsNew: "Show changes" translate: "Translate" translatedFrom: "Translated from {x}" accountDeletionInProgress: "Account deletion is currently in progress" -usernameInfo: "A name that identifies your account from others on this server. You can use the alphabet (a~z, A~Z), digits (0~9) or underscores (_). Usernames cannot be changed later." +usernameInfo: "A name that identifies your account from others on this server. You\ + \ can use the alphabet (a~z, A~Z), digits (0~9) or underscores (_). Usernames cannot\ + \ be changed later." aiChanMode: "Ai-chan in Classic UI" keepCw: "Keep content warnings" pubSub: "Pub/Sub Accounts" @@ -829,13 +904,15 @@ filter: "Filter" controlPanel: "Control Panel" manageAccounts: "Manage Accounts" makeReactionsPublic: "Set reaction history to public" -makeReactionsPublicDescription: "This will make the list of all your past reactions publicly visible." +makeReactionsPublicDescription: "This will make the list of all your past reactions\ + \ publicly visible." classic: "Classic" muteThread: "Mute thread" unmuteThread: "Unmute thread" ffVisibility: "Follows/Followers Visibility" -ffVisibilityDescription: "Allows you to configure who can see who you follow and who follows you." -continueThread: "View thread continuation" +ffVisibilityDescription: "Allows you to configure who can see who you follow and who\ + \ follows you." +continueThread: "Continue thread" deleteAccountConfirm: "This will irreversibly delete your account. Proceed?" incorrectPassword: "Incorrect password." voteConfirm: "Confirm your vote for \"{choice}\"?" @@ -849,6 +926,9 @@ overridedDeviceKind: "Device type" smartphone: "Smartphone" tablet: "Tablet" auto: "Auto" +showLocalPosts: "Show local posts in:" +homeTimeline: "Home Timeline" +socialTimeline: "Social Timeline" themeColor: "Instance Ticker Color" size: "Size" numberOfColumn: "Number of columns" @@ -874,14 +954,16 @@ noEmailServerWarning: "Email server not configured." thereIsUnresolvedAbuseReportWarning: "There are unsolved reports." check: "Check" driveCapOverrideLabel: "Change the drive capacity for this user" -driveCapOverrideCaption: "Reset the capacity to default by inputting a value of 0 or lower." +driveCapOverrideCaption: "Reset the capacity to default by inputting a value of 0\ + \ or lower." requireAdminForView: "You must log in with an administrator account to view this." isSystemAccount: "An account created and automatically operated by the system." typeToConfirm: "Please enter {x} to confirm" deleteAccount: "Delete account" document: "Documentation" numberOfPageCache: "Number of cached pages" -numberOfPageCacheDescription: "Increasing this number will improve convenience for users but cause more server load as well as more memory to be used." +numberOfPageCacheDescription: "Increasing this number will improve convenience for\ + \ users but cause more server load as well as more memory to be used." logoutConfirm: "Really log out?" lastActiveDate: "Last used at" statusbar: "Status bar" @@ -898,26 +980,49 @@ sensitiveMediaDetection: "Detection of NSFW media" localOnly: "Local only" remoteOnly: "Remote only" failedToUpload: "Upload failed" -cannotUploadBecauseInappropriate: "This file could not be uploaded because parts of it have been detected as potentially NSFW." +cannotUploadBecauseInappropriate: "This file could not be uploaded because parts of\ + \ it have been detected as potentially NSFW." cannotUploadBecauseNoFreeSpace: "Upload failed due to lack of Drive capacity." +cannotUploadBecauseExceedsFileSizeLimit: "This file could not be uploaded because\ + \ it exceeds the maximum allowed size." beta: "Beta" enableAutoSensitive: "Automatic NSFW-Marking" -enableAutoSensitiveDescription: "Allows automatic detection and marking of NSFW media through Machine Learning where possible. Even if this option is disabled, it may be enabled instance-wide." -activeEmailValidationDescription: "Enables stricter validation of email addresses, which includes checking for disposable addresses and by whether it can actually be communicated with. When unchecked, only the format of the email is validated." +enableAutoSensitiveDescription: "Allows automatic detection and marking of NSFW media\ + \ through Machine Learning where possible. Even if this option is disabled, it may\ + \ be enabled instance-wide." +activeEmailValidationDescription: "Enables stricter validation of email addresses,\ + \ which includes checking for disposable addresses and by whether it can actually\ + \ be communicated with. When unchecked, only the format of the email is validated." navbar: "Navigation bar" shuffle: "Shuffle" account: "Account" move: "Move" +pushNotification: "Push notifications" +subscribePushNotification: "Enable push notifications" +unsubscribePushNotification: "Disable push notifications" +pushNotificationAlreadySubscribed: "Push notifications are already enabled" +pushNotificationNotSupported: "Your browser or instance does not support push notifications" +sendPushNotificationReadMessage: "Delete push notifications once the relevant notifications\ + \ or messages have been read" +sendPushNotificationReadMessageCaption: "A notification containing the text \"{emptyPushNotificationMessage}\"\ + \ will be displayed for a short time. This may increase the battery usage of your\ + \ device, if applicable." showAds: "Show ads" enterSendsMessage: "Press Return in Messaging to send message (off is Ctrl + Return)" -adminCustomCssWarn: "This setting should only be used if you know what it does. Entering improper values may cause EVERYONE'S clients to stop functioning normally. Please ensure your CSS works properly by testing it in your user settings." +adminCustomCssWarn: "This setting should only be used if you know what it does. Entering\ + \ improper values may cause EVERYONE'S clients to stop functioning normally. Please\ + \ ensure your CSS works properly by testing it in your user settings." customMOTD: "Custom MOTD (splash screen messages)" -customMOTDDescription: "Custom messages for the MOTD (splash screen) separated by line breaks to be shown randomly every time a user loads/reloads the page." +customMOTDDescription: "Custom messages for the MOTD (splash screen) separated by\ + \ line breaks to be shown randomly every time a user loads/reloads the page." customSplashIcons: "Custom splash screen icons (urls)" -customSplashIconsDescription: "URLs for custom splash screen icons separated by line breaks to be shown randomly every time a user loads/reloads the page. Please make sure the images are on a static URL, preferably all resized to 192x192." +customSplashIconsDescription: "URLs for custom splash screen icons separated by line\ + \ breaks to be shown randomly every time a user loads/reloads the page. Please make\ + \ sure the images are on a static URL, preferably all resized to 192x192." showUpdates: "Show a popup when Calckey updates" recommendedInstances: "Recommended instances" -recommendedInstancesDescription: "Recommended instances seperated by line breaks to appear in the recommended timeline. Do NOT add `https://`, ONLY the domain." +recommendedInstancesDescription: "Recommended instances separated by line breaks to\ + \ appear in the recommended timeline. Do NOT add `https://`, ONLY the domain." caption: "Auto Caption" splash: "Splash Screen" updateAvailable: "There might be an update available!" @@ -929,21 +1034,51 @@ migration: "Migration" moveTo: "Move current account to new account" moveToLabel: "Account you're moving to:" moveAccount: "Move account!" -moveAccountDescription: "This process is irreversible. Make sure you've set up an alias for this account on your new account before moving. Please enter the tag of the account formatted like @person@instance.com" +moveAccountDescription: "This process is irreversible. Make sure you've set up an\ + \ alias for this account on your new account before moving. Please enter the tag\ + \ of the account formatted like @person@instance.com" moveFrom: "Move to this account from an older account" moveFromLabel: "Account you're moving from:" -moveFromDescription: "This will set an alias of your old account so that you can move from that account to this current one. Do this BEFORE moving from your older account. Please enter the tag of the account formatted like @person@instance.com" -migrationConfirm: "Are you absolutely sure you want to migrate your acccount to {account}? Once you do this, you won't be able to reverse it, and you won't be able to use your account normally again.\nAlso, please ensure that you've set this current account as the account you're moving from." +moveFromDescription: "This will set an alias of your old account so that you can move\ + \ from that account to this current one. Do this BEFORE moving from your older account.\ + \ Please enter the tag of the account formatted like @person@instance.com" +migrationConfirm: "Are you absolutely sure you want to migrate your acccount to {account}?\ + \ Once you do this, you won't be able to reverse it, and you won't be able to use\ + \ your account normally again.\nAlso, please ensure that you've set this current\ + \ account as the account you're moving from." defaultReaction: "Default emoji reaction for outgoing and incoming posts" +license: "License" +indexPosts: "Index Posts" +indexFrom: "Index from Post ID onwards (leave blank to index every post)" +indexNotice: "Now indexing. This will probably take a while, please don't restart\ + \ your server for at least an hour." +customKaTeXMacro: "Custom KaTeX macros" +customKaTeXMacroDescription: "Set up macros to write mathematical expressions easily!\ + \ The notation conforms to the LaTeX command definitions and is written as \\newcommand{\\\ + name}{content} or \\newcommand{\\name}[number of arguments]{content}. For example,\ + \ \\newcommand{\\add}[2]{#1 + #2} will expand \\add{3}{foo} to 3 + foo. The curly\ + \ brackets surrounding the macro name can be changed to round or square brackets.\ + \ This affects the brackets used for arguments. One (and only one) macro can be\ + \ defined per line, and you can't break the line in the middle of the definition.\ + \ Invalid lines are simply ignored. Only simple string substitution functions are\ + \ supported; advanced syntax, such as conditional branching, cannot be used here." +enableCustomKaTeXMacro: "Enable custom KaTeX macros" +noteId: "Post ID" _sensitiveMediaDetection: - description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server." + description: "Reduces the effort of server moderation through automatically recognizing\ + \ NSFW media via Machine Learning. This will slightly increase the load on the\ + \ server." sensitivity: "Detection sensitivity" - sensitivityDescription: "Reducing the sensitivity will lead to fewer misdetections (false positives) whereas increasing it will lead to fewer missed detections (false negatives)." + sensitivityDescription: "Reducing the sensitivity will lead to fewer misdetections\ + \ (false positives) whereas increasing it will lead to fewer missed detections\ + \ (false negatives)." setSensitiveFlagAutomatically: "Mark as NSFW" - setSensitiveFlagAutomaticallyDescription: "The results of the internal detection will be retained even if this option is turned off." + setSensitiveFlagAutomaticallyDescription: "The results of the internal detection\ + \ will be retained even if this option is turned off." analyzeVideos: "Enable analysis of videos" - analyzeVideosDescription: "Analyzes videos in addition to images. This will slightly increase the load on the server." + analyzeVideosDescription: "Analyzes videos in addition to images. This will slightly\ + \ increase the load on the server." _emailUnavailable: used: "This email address is already being used" format: "The format of this email address is invalid" @@ -957,11 +1092,15 @@ _ffVisibility: _signup: almostThere: "Almost there" emailAddressInfo: "Please enter your email address. It will not be made public." - emailSent: "A confirmation email has been sent to your email address ({email}). Please click the included link to complete account creation." + emailSent: "A confirmation email has been sent to your email address ({email}).\ + \ Please click the included link to complete account creation." _accountDelete: accountDelete: "Delete account" - mayTakeTime: "As account deletion is a resource-heavy process, it may take some time to complete depending on how much content you have created and how many files you have uploaded." - sendEmail: "Once account deletion has been completed, an email will be sent to the email address registered to this account." + mayTakeTime: "As account deletion is a resource-heavy process, it may take some\ + \ time to complete depending on how much content you have created and how many\ + \ files you have uploaded." + sendEmail: "Once account deletion has been completed, an email will be sent to the\ + \ email address registered to this account." requestAccountDelete: "Request account deletion" started: "Deletion has been started." inProgress: "Deletion is currently in progress" @@ -969,9 +1108,12 @@ _ad: back: "Back" reduceFrequencyOfThisAd: "Show this ad less" _forgotPassword: - enterEmail: "Enter the email address you used to register. A link with which you can reset your password will then be sent to it." - ifNoEmail: "If you did not use an email during registration, please contact the instance administrator instead." - contactAdmin: "This instance does not support using email addresses, please contact the instance administrator to reset your password instead." + enterEmail: "Enter the email address you used to register. A link with which you\ + \ can reset your password will then be sent to it." + ifNoEmail: "If you did not use an email during registration, please contact the\ + \ instance administrator instead." + contactAdmin: "This instance does not support using email addresses, please contact\ + \ the instance administrator to reset your password instead." _gallery: my: "My Gallery" liked: "Liked Posts" @@ -994,12 +1136,15 @@ _preferencesBackups: save: "Save changes" inputName: "Please enter a name for this backup" cannotSave: "Saving failed" - nameAlreadyExists: "A backup called \"{name}\" already exists. Please enter a different name." - applyConfirm: "Do you really want to apply the \"{name}\" backup to this device? Existing settings of this device will be overwritten." + nameAlreadyExists: "A backup called \"{name}\" already exists. Please enter a different\ + \ name." + applyConfirm: "Do you really want to apply the \"{name}\" backup to this device?\ + \ Existing settings of this device will be overwritten." saveConfirm: "Save backup as {name}?" deleteConfirm: "Delete the {name} backup?" renameConfirm: "Rename this backup from \"{old}\" to \"{new}\"?" - noBackups: "No backups exist. You may backup your client settings on this server by using \"Create new backup\"." + noBackups: "No backups exist. You may backup your client settings on this server\ + \ by using \"Create new backup\"." createdAt: "Created at: {date} {time}" updatedAt: "Updated at: {date} {time}" cannotLoad: "Loading failed" @@ -1011,13 +1156,15 @@ _registry: domain: "Domain" createKey: "Create key" _aboutMisskey: - about: "Calckey is a fork of Misskey made by ThatOneCalculator, which has been in development since 2022." + about: "Calckey is a fork of Misskey made by ThatOneCalculator, which has been in\ + \ development since 2022." contributors: "Main contributors" allContributors: "All contributors" source: "Source code" translation: "Translate Calckey" donate: "Donate to Calckey" - morePatrons: "We also appreciate the support of many other helpers not listed here. Thank you! 🥰" + morePatrons: "We also appreciate the support of many other helpers not listed here.\ + \ Thank you! \U0001F970" patrons: "Calckey patrons" _nsfw: respect: "Hide NSFW media" @@ -1025,7 +1172,8 @@ _nsfw: force: "Hide all media" _mfm: cheatSheet: "MFM Cheatsheet" - intro: "MFM is a markup language used on Misskey, Calckey, Akkoma, and more that can be used in many places. Here you can view a list of all available MFM syntax." + intro: "MFM is a markup language used on Misskey, Calckey, Akkoma, and more that\ + \ can be used in many places. Here you can view a list of all available MFM syntax." dummy: "Calckey expands the world of the Fediverse" mention: "Mention" mentionDescription: "You can specify a user by using an At-Symbol and a username." @@ -1044,7 +1192,8 @@ _mfm: inlineCode: "Code (Inline)" inlineCodeDescription: "Displays inline syntax highlighting for (program) code." blockCode: "Code (Block)" - blockCodeDescription: "Displays syntax highlighting for multi-line (program) code in a block." + blockCodeDescription: "Displays syntax highlighting for multi-line (program) code\ + \ in a block." inlineMath: "Math (Inline)" inlineMathDescription: "Display math formulas (KaTeX) in-line" blockMath: "Math (Block)" @@ -1052,7 +1201,8 @@ _mfm: quote: "Quote" quoteDescription: "Displays content as a quote." emoji: "Custom Emoji" - emojiDescription: "By surrounding a custom emoji name with colons, custom emoji can be displayed." + emojiDescription: "By surrounding a custom emoji name with colons, custom emoji\ + \ can be displayed." search: "Search" searchDescription: "Displays a search box with pre-entered text." flip: "Flip" @@ -1087,8 +1237,17 @@ _mfm: sparkleDescription: "Gives content a sparkling particle effect." rotate: "Rotate" rotateDescription: "Turns content by a specified angle." + position: "Position" + positionDescription: "Move content by a specified amount." + scale: "Scale" + scaleDescription: "Scale content by a specified amount." + foreground: "Foreground color" + foregroundDescription: "Change the foreground color of text." + background: "Background color" + backgroundDescription: "Change the background color of text." plain: "Plain" - plainDescription: "Deactivates the effects of all MFM contained within this MFM effect." + plainDescription: "Deactivates the effects of all MFM contained within this MFM\ + \ effect." _instanceTicker: none: "Never show" remote: "Show for remote users" @@ -1118,15 +1277,19 @@ _menuDisplay: hide: "Hide" _wordMute: muteWords: "Muted words" - muteWordsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition." + muteWordsDescription: "Separate with spaces for an AND condition or with line breaks\ + \ for an OR condition." muteWordsDescription2: "Surround keywords with slashes to use regular expressions." softDescription: "Hide posts that fulfil the set conditions from the timeline." - hardDescription: "Prevents posts fulfilling the set conditions from being added to the timeline. In addition, these posts will not be added to the timeline even if the conditions are changed." + hardDescription: "Prevents posts fulfilling the set conditions from being added\ + \ to the timeline. In addition, these posts will not be added to the timeline\ + \ even if the conditions are changed." soft: "Soft" hard: "Hard" mutedNotes: "Muted posts" _instanceMute: - instanceMuteDescription: "This will mute any posts/boosts from the listed instances, including those of users replying to a user from a muted instance." + instanceMuteDescription: "This will mute any posts/boosts from the listed instances,\ + \ including those of users replying to a user from a muted instance." instanceMuteDescription2: "Separate with newlines" title: "Hides posts from listed instances." heading: "List of instances to be muted" @@ -1215,13 +1378,13 @@ _sfx: _ago: future: "Future" justNow: "Just now" - secondsAgo: "{n} second(s) ago" - minutesAgo: "{n} minute(s) ago" - hoursAgo: "{n} hour(s) ago" - daysAgo: "{n} day(s) ago" - weeksAgo: "{n} week(s) ago" - monthsAgo: "{n} month(s) ago" - yearsAgo: "{n} year(s) ago" + secondsAgo: "{n}s ago" + minutesAgo: "{n}m ago" + hoursAgo: "{n}h ago" + daysAgo: "{n}d ago" + weeksAgo: "{n}w ago" + monthsAgo: "{n}mo ago" + yearsAgo: "{n}y ago" _time: second: "Second(s)" minute: "Minute(s)" @@ -1232,21 +1395,35 @@ _tutorial: step1_1: "Welcome!" step1_2: "Let's get you set up. You'll be up and running in no time!" step2_1: "First, please fill out your profile." - step2_2: "Providing some information about who you are will make it easier for others to tell if they want to see your posts or follow you." + step2_2: "Providing some information about who you are will make it easier for others\ + \ to tell if they want to see your posts or follow you." step3_1: "Now time to follow some people!" - step3_2: "Your home and social timelines are based off of who you follow, so try following a couple accounts to get started.\nClick the plus circle on the top right of a profile to follow them." + step3_2: "Your home and social timelines are based off of who you follow, so try\ + \ following a couple accounts to get started.\nClick the plus circle on the top\ + \ right of a profile to follow them." step4_1: "Let's get you out there." - step4_2: "For your first post, some people like to made a {introduction} post or a simple \"Hello world!\"" + step4_2: "For your first post, some people like to made a {introduction} post or\ + \ a simple \"Hello world!\"" step5_1: "Timelines, timelines everywhere!" step5_2: "Your instance has {timelines} different timelines enabled." - step5_3: "The Home {icon} timeline is where you can see posts from your followers." - step5_4: "The Local {icon} timeline is where you can see posts from everyone else on this instance." - step5_5: "The Recommended {icon} timeline is where you can see posts from instances the admins recommend." - step5_6: "The Social {icon} timeline is your home + local." - step5_7: "The Global {icon} timeline is where you can see posts from every other connected instance." + step5_3: "The Home {icon} timeline is where you can see posts from the accounts\ + \ you follow and from everyone else on this instance. If you prefer your Home\ + \ timeline to only display posts from accounts you follow, you can easily change\ + \ this in Settings!" + step5_4: "The Local {icon} timeline is where you can see posts from everyone else\ + \ on this instance." + step5_5: "The Social {icon} timeline is where you can see posts only from the accounts\ + \ you follow." + step5_6: "The Recommended {icon} timeline is where you can see posts from instances\ + \ the admins recommend." + step5_7: "The Global {icon} timeline is where you can see posts from every other\ + \ connected instance." step6_1: "So, what is this place?" - step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse, an interconnected network of thousands of servers, called \"instances\"." - step6_3: "Each server works in different ways, and not all servers run Calckey. This one does though! It's a bit complicated, but you'll get the hang of it in no time." + step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse,\ + \ an interconnected network of thousands of servers, called \"instances\"." + step6_3: "Each server works in different ways, and not all servers run Calckey.\ + \ This one does though! It's a bit complicated, but you'll get the hang of it\ + \ in no time." step6_4: "Now go, explore, and have fun!" _2fa: alreadyRegistered: "You have already registered a 2-factor authentication device." @@ -1257,7 +1434,9 @@ _2fa: step2Url: "You can also enter this URL if you're using a desktop program:" step3: "Enter the token provided by your app to finish setup." step4: "From now on, any future login attempts will ask for such a login token." - securityKeyInfo: "Besides fingerprint or PIN authentication, you can also setup authentication via hardware security keys that support FIDO2 to further secure your account." + securityKeyInfo: "Besides fingerprint or PIN authentication, you can also setup\ + \ authentication via hardware security keys that support FIDO2 to further secure\ + \ your account." _permissions: "read:account": "View your account information" "write:account": "Edit your account information" @@ -1293,7 +1472,8 @@ _permissions: "write:gallery-likes": "Edit your list of liked gallery posts" _auth: shareAccess: "Would you like to authorize \"{name}\" to access this account?" - shareAccessAsk: "Are you sure you want to authorize this application to access your account?" + shareAccessAsk: "Are you sure you want to authorize this application to access your\ + \ account?" permissionAsk: "This application requests the following permissions" pleaseGoBack: "Please go back to the application" callback: "Returning to the application" @@ -1369,7 +1549,7 @@ _poll: _visibility: public: "Public" publicDescription: "Your post will be visible for all users" - home: "Home" + home: "Unlisted" homeDescription: "Post to home timeline only" followers: "Followers" followersDescription: "Make visible to your followers only" @@ -1395,11 +1575,14 @@ _profile: youCanIncludeHashtags: "You can also include hashtags in your bio." metadata: "Additional Information" metadataEdit: "Edit additional Information" - metadataDescription: "Using these, you can display additional information fields in your profile." + metadataDescription: "Using these, you can display additional information fields\ + \ in your profile." metadataLabel: "Label" metadataContent: "Content" changeAvatar: "Change avatar" changeBanner: "Change banner" + locationDescription: "If you enter your city first, it will display your local time\ + \ to other users." _exportOrImport: allNotes: "All posts" followingList: "Followed users" @@ -1717,7 +1900,8 @@ _pages: _for: arg1: "Number of times to repeat" arg2: "Action" - typeError: "Slot {slot} accepts values of type \"{expect}\", but the provided value is of type \"{actual}\"!" + typeError: "Slot {slot} accepts values of type \"{expect}\", but the provided\ + \ value is of type \"{actual}\"!" thereIsEmptySlot: "Slot {slot} is empty!" types: string: "Text" @@ -1777,12 +1961,16 @@ _deck: swapDown: "Swap with the below column" stackLeft: "Stack with the left column" popRight: "Pop column to the right" - profile: "Profile" - newProfile: "New profile" - deleteProfile: "Delete profile" + profile: "Workspace" + newProfile: "New workspace" + renameProfile: "Rename workspace" + deleteProfile: "Delete workspace" + nameAlreadyExists: "This workspace name already exists." introduction: "Create the perfect interface for you by arranging columns freely!" - introduction2: "Click on the + on the right of the screen to add new colums whenever you want." - widgetsIntroduction: "Please select \"Edit widgets\" in the column menu and add a widget." + introduction2: "Click on the + on the right of the screen to add new colums whenever\ + \ you want." + widgetsIntroduction: "Please select \"Edit widgets\" in the column menu and add\ + \ a widget." _columns: main: "Main" widgets: "Widgets" @@ -1805,7 +1993,7 @@ _apps: pwa: "Install PWA" kaiteki: "Kaiteki" milktea: "Milktea" - subwayTooter: "Subway Tooter" - kimis: "Kimis" + missLi: "MissLi" + mona: "Mona" theDesk: "TheDesk" lesskey: "Lesskey" diff --git a/locales/es-ES.yml b/locales/es-ES.yml index 1d35c878c4..c9811e3c0e 100644 --- a/locales/es-ES.yml +++ b/locales/es-ES.yml @@ -1,7 +1,8 @@ ---- _lang_: "Español" -headlineMisskey: "Red conectada por notas" -introMisskey: "¡Bienvenido/a! Misskey es un servicio de microblogging descentralizado de código abierto.\nEscribe \"notas\" para compartir lo que te ocurre ahora o para contar sobre ti a todos 📡\nCon la función de \"reacciones\", puedes también añadir una reacción rápida a las notas de todos 👍\n¡Exploremos juntos un nuevo mundo! 🚀" +headlineMisskey: "¡Un proyecto de código abierto y una plataforma de medios de comunicación\ + \ descentralizada que es gratis para siempre! \U0001F680" +introMisskey: "¡Bienvenido! ¡Calckey es un proyecto de código abierto, plataforma\ + \ descentralizado medios de comunicación social que es gratis para siempre! \U0001F680" monthAndDay: "{day}/{month}" search: "Buscar" notifications: "Notificaciones" @@ -13,8 +14,8 @@ ok: "OK" gotIt: "¡Lo tengo!" cancel: "Cancelar" enterUsername: "Introduce el nombre de usuario" -renotedBy: "Renotado por {user}" -noNotes: "No hay notas" +renotedBy: "Reposteado por {user}" +noNotes: "No hay publicaciones" noNotifications: "No hay notificaciones" instance: "Instancia" settings: "Configuración" @@ -23,7 +24,7 @@ otherSettings: "Configuración avanzada" openInWindow: "Abrir en una ventana" profile: "Perfil" timeline: "Línea de tiempo" -noAccountDescription: "Este usuario no ha escrito su biografía aún" +noAccountDescription: "Este usuario no ha escrito su biografía aún." login: "Iniciar sesión" loggingIn: "Iniciando sesión" logout: "Cerrar sesión" @@ -36,7 +37,7 @@ favorite: "Añadir a favoritos" favorites: "Favoritos" unfavorite: "Quitar de favoritos" favorited: "Añadido a favoritos." -alreadyFavorited: "Ya había sido añadido a favoritos" +alreadyFavorited: "Ya había sido añadido a favoritos." cantFavorite: "No se puede añadir a favoritos." pin: "Fijar al perfil" unpin: "Desfijar" @@ -44,7 +45,8 @@ copyContent: "Copiar contenido" copyLink: "Copiar enlace" delete: "Borrar" deleteAndEdit: "Borrar y editar" -deleteAndEditConfirm: "¿Estás seguro de que quieres borrar esta nota y editarla? Perderás todas las reacciones, renotas y respuestas." +deleteAndEditConfirm: "¿Estás seguro de que quieres borrar esta publicación y editarla?\ + \ Perderás todas las reacciones, impulsados y respuestas." addToList: "Agregar a lista" sendMessage: "Enviar un mensaje" copyUsername: "Copiar nombre de usuario" @@ -58,20 +60,22 @@ receiveFollowRequest: "Recibiste una solicitud de seguimiento" followRequestAccepted: "La solicitud de seguimiento fue aceptada" mention: "Menciones" mentions: "Menciones" -directNotes: "Notas directas" +directNotes: "Mensajes Directos" importAndExport: "Importar y Exportar" import: "Importar" export: "Exportar" files: "Archivos" download: "Descargar" -driveFileDeleteConfirm: "¿Desea borrar el archivo \"{name}\"? Las notas que tengan este archivo como adjunto serán eliminadas" +driveFileDeleteConfirm: "¿Desea borrar el archivo \"{name}\"? Las publicaciones que\ + \ tengan este archivo como adjunto serán eliminadas." unfollowConfirm: "¿Desea dejar de seguir a {name}?" -exportRequested: "Se ha solicitado la exportación. Puede tomar un tiempo. Cuando termine la exportación, se añadirá en el drive" +exportRequested: "Se ha solicitado la exportación. Puede tomar un tiempo. Cuando termine\ + \ la exportación, se añadirá en el drive." importRequested: "Se ha solicitado la importación. Puede tomar un tiempo." lists: "Listas" noLists: "No tiene listas" -note: "Notas" -notes: "Notas" +note: "Publicación" +notes: "Publicaciones" following: "Siguiendo" followers: "Seguidores" followsYou: "Te sigue" @@ -80,10 +84,12 @@ manageLists: "Administrar listas" error: "Error" somethingHappened: "Ocurrió un error" retry: "Reintentar" -pageLoadError: "Error al leer la página" -pageLoadErrorDescription: "Normalmente es debido a la red o al caché del navegador. Por favor limpie el caché o intente más tarde." +pageLoadError: "Error al cargar la página." +pageLoadErrorDescription: "Normalmente es debido a la red o al caché del navegador.\ + \ Por favor limpie el caché o intente más tarde." serverIsDead: "No hay respuesta del servidor. Espere un momento y vuelva a intentarlo." -youShouldUpgradeClient: "Para ver esta página, por favor refrezca el navegador y utiliza una versión más reciente del cliente." +youShouldUpgradeClient: "Para ver esta página, por favor refrezca el navegador y utiliza\ + \ una versión más reciente del cliente." enterListName: "Ingrese nombre de lista" privacy: "Privacidad" makeFollowManuallyApprove: "Aprobar manualmente las solicitudes de seguimiento" @@ -94,13 +100,13 @@ followRequests: "Solicitudes de seguimiento" unfollow: "Dejar de seguir" followRequestPending: "Solicitudes de seguimiento pendiente" enterEmoji: "Ingresar emojis" -renote: "Renotar" -unrenote: "Quitar renota" -renoted: "Renotado" -cantRenote: "No se puede renotar este post" -cantReRenote: "No se puede renotar una renota" +renote: "Impulsar" +unrenote: "Quitar impulso" +renoted: "Impulsado." +cantRenote: "No se puede impulsar esta publicación." +cantReRenote: "No se puede impulsar un impulso." quote: "Citar" -pinnedNote: "Nota fijada" +pinnedNote: "Publicación fijada" pinned: "Fijar al perfil" you: "Tú" clickToShow: "Click para ver" @@ -108,8 +114,9 @@ sensitive: "Marcado como sensible" add: "Agregar" reaction: "Reacción" reactionSetting: "Reacciones para mostrar en el menú de reacciones" -reactionSettingDescription2: "Arrastre para reordenar, click para borrar, apriete la tecla + para añadir." -rememberNoteVisibility: "Recordar visibilidad" +reactionSettingDescription2: "Arrastre para reordenar, click para borrar, apriete\ + \ la tecla + para añadir." +rememberNoteVisibility: "Recordar la configuración de visibilidad de la publicación" attachCancel: "Quitar adjunto" markAsSensitive: "Marcar como sensible" unmarkAsSensitive: "Desmarcar como sensible" @@ -137,16 +144,23 @@ emojiUrl: "URL de la imágen del emoji" addEmoji: "Agregar emoji" settingGuide: "Configuración sugerida" cacheRemoteFiles: "Mantener en cache los archivos remotos" -cacheRemoteFilesDescription: "Si desactiva esta configuración, Los archivos remotos se cargarán desde el link directo sin usar la caché. Con eso se puede ahorrar almacenamiento del servidor, pero eso aumentará el tráfico al no crear miniaturas." +cacheRemoteFilesDescription: "Si desactiva esta configuración, Los archivos remotos\ + \ se cargarán desde el link directo sin usar la caché. Con eso se puede ahorrar\ + \ almacenamiento del servidor, pero eso aumentará el tráfico al no crear miniaturas." flagAsBot: "Esta cuenta es un bot" -flagAsBotDescription: "En caso de que esta cuenta fuera usada por un programa, active esta opción. Al hacerlo, esta opción servirá para otros desarrolladores para evitar cadenas infinitas de reacciones, y ajustará los sistemas internos de Misskey para que trate a esta cuenta como un bot." +flagAsBotDescription: "En caso de que esta cuenta fuera usada por un programa, active\ + \ esta opción. Al hacerlo, esta opción servirá para otros desarrolladores para evitar\ + \ cadenas infinitas de reacciones, y ajustará los sistemas internos de Calckey para\ + \ que trate a esta cuenta como un bot." flagAsCat: "Esta cuenta es un gato" -flagAsCatDescription: "En caso de que declare que esta cuenta es de un gato, active esta opción." +flagAsCatDescription: "Vas a tener orejas de gato y hablar como un gato!" flagShowTimelineReplies: "Mostrar respuestas a las notas en la biografía" -flagShowTimelineRepliesDescription: "Cuando se marca, la línea de tiempo muestra respuestas a otras notas además de las notas del usuario" -autoAcceptFollowed: "Aceptar automáticamente las solicitudes de seguimiento de los usuarios que sigues" +flagShowTimelineRepliesDescription: "Cuando se marca, la línea de tiempo muestra respuestas\ + \ a otras publicaciones además de las publicaciones del usuario." +autoAcceptFollowed: "Aceptar automáticamente las solicitudes de seguimiento de los\ + \ usuarios que sigues" addAccount: "Agregar Cuenta" -loginFailed: "Error al iniciar sesión." +loginFailed: "Error al iniciar sesión" showOnRemote: "Ver en una instancia remota" general: "General" wallpaper: "Fondo de pantalla" @@ -156,7 +170,11 @@ searchWith: "Buscar: {q}" youHaveNoLists: "No tienes listas" followConfirm: "¿Desea seguir a {name}?" proxyAccount: "Cuenta proxy" -proxyAccountDescription: "Una cuenta proxy es una cuenta que actúa como un seguidor remoto de un usuario bajo ciertas condiciones. Por ejemplo, cuando un usuario añade un usuario remoto a una lista, si ningún usuario local sigue al usuario agregado a la lista, la instancia no puede obtener su actividad. Así que la cuenta proxy sigue al usuario añadido a la lista" +proxyAccountDescription: "Una cuenta proxy es una cuenta que actúa como un seguidor\ + \ remoto de un usuario bajo ciertas condiciones. Por ejemplo, cuando un usuario\ + \ añade un usuario remoto a una lista, si ningún usuario local sigue al usuario\ + \ agregado a la lista, la instancia no puede obtener su actividad. Así que la cuenta\ + \ proxy sigue al usuario añadido a la lista." host: "Host" selectUser: "Elegir usuario" recipient: "Recipiente" @@ -187,21 +205,24 @@ instanceInfo: "información de la instancia" statistics: "Estadísticas" clearQueue: "Limpiar cola" clearQueueConfirmTitle: "¿Desea limpiar la cola?" -clearQueueConfirmText: "Las notas aún no entregadas no se federarán. Normalmente no se necesita ejecutar esta operación" +clearQueueConfirmText: "Las publicaciones aún no entregadas no se federarán. Normalmente\ + \ no se necesita ejecutar esta operación." clearCachedFiles: "Limpiar caché" clearCachedFilesConfirm: "¿Desea borrar todos los archivos remotos cacheados?" blockedInstances: "Instancias bloqueadas" -blockedInstancesDescription: "Seleccione los hosts de las instancias que desea bloquear, separadas por una linea nueva. Las instancias bloqueadas no podrán comunicarse con esta instancia." +blockedInstancesDescription: "Seleccione los hosts de las instancias que desea bloquear,\ + \ separadas por una linea nueva. Las instancias bloqueadas no podrán comunicarse\ + \ con esta instancia." muteAndBlock: "Silenciar y bloquear" mutedUsers: "Usuarios silenciados" blockedUsers: "Usuarios bloqueados" noUsers: "No hay usuarios" editProfile: "Editar perfil" -noteDeleteConfirm: "¿Desea borrar esta nota?" -pinLimitExceeded: "Ya no se pueden fijar más posts" -intro: "¡La instalación de Misskey ha terminado! Crea el usuario administrador." +noteDeleteConfirm: "¿Desea borrar esta publicación?" +pinLimitExceeded: "Ya no se pueden fijar más publicaciones" +intro: "¡La instalación de Calckey ha terminado! Crea el usuario administrador." done: "Terminado" -processing: "Procesando" +processing: "Procesando..." preview: "Vista previa" default: "Predeterminado" defaultValueIs: "Predeterminado" @@ -219,7 +240,7 @@ instanceFollowers: "Seguidores de la instancia" instanceUsers: "Usuarios de la instancia" changePassword: "Cambiar contraseña" security: "Seguridad" -retypedNotMatch: "No hay coincidencia" +retypedNotMatch: "No hay coincidencia." currentPassword: "Contraseña actual" newPassword: "Contraseña nueva" newPasswordRetype: "Contraseña nueva (repetir)" @@ -240,7 +261,9 @@ saved: "Guardado" messaging: "Chat" upload: "Subir" keepOriginalUploading: "Mantener la imagen original" -keepOriginalUploadingDescription: "Mantener la versión original al cargar imágenes. Si está desactivado, el navegador generará imágenes para la publicación web en el momento de recargar la página" +keepOriginalUploadingDescription: "Mantener la versión original al cargar imágenes.\ + \ Si está desactivado, el navegador generará imágenes para la publicación web en\ + \ el momento de recargar la página." fromDrive: "Desde el drive" fromUrl: "Desde la URL" uploadFromUrl: "Subir desde una URL" @@ -256,7 +279,7 @@ agreeTo: "De acuerdo con {0}" tos: "Términos de uso" start: "Comenzar" home: "Inicio" -remoteUserCaution: "Para el usuario remoto, la información está incompleta" +remoteUserCaution: "La información del usuario remoto tal vez esta incompleta." activity: "Actividad" images: "Imágenes" birthday: "Fecha de nacimiento" @@ -289,7 +312,8 @@ unableToDelete: "No se puede borrar" inputNewFileName: "Ingrese un nuevo nombre de archivo" inputNewDescription: "Ingrese nueva descripción" inputNewFolderName: "Ingrese un nuevo nombre de la carpeta" -circularReferenceFolder: "La carpeta de destino es una sub-carpeta de la carpeta que quieres mover." +circularReferenceFolder: "La carpeta de destino es una sub-carpeta de la carpeta que\ + \ quieres mover." hasChildFilesOrFolders: "No se puede borrar esta carpeta. No está vacía." copyUrl: "Copiar URL" rename: "Renombrar" @@ -323,7 +347,8 @@ connectService: "Conectar" disconnectService: "Desconectar" enableLocalTimeline: "Habilitar linea de tiempo local" enableGlobalTimeline: "Habilitar linea de tiempo global" -disablingTimelinesInfo: "Aunque se desactiven estas lineas de tiempo, por conveniencia el administrador y los moderadores pueden seguir usándolos" +disablingTimelinesInfo: "Aunque se desactiven estas lineas de tiempo, por conveniencia\ + \ el administrador y los moderadores pueden seguir usándolos" registration: "Registro" enableRegistration: "Permitir nuevos registros" invite: "Invitar" @@ -335,9 +360,11 @@ bannerUrl: "URL de la imagen del banner" backgroundImageUrl: "URL de la imagen de fondo" basicInfo: "Información básica" pinnedUsers: "Usuarios fijados" -pinnedUsersDescription: "Describir los usuarios que quiere fijar en la página \"Descubrir\" separados por una linea nueva" +pinnedUsersDescription: "Describir los usuarios que quiere fijar en la página \"Descubrir\"\ + \ separados por una linea nueva" pinnedPages: "Páginas fijadas" -pinnedPagesDescription: "Describa las rutas de las páginas que desea fijar a la página principal de la instancia, separadas por lineas nuevas" +pinnedPagesDescription: "Describa las rutas de las páginas que desea fijar a la página\ + \ principal de la instancia, separadas por lineas nuevas" pinnedClipId: "Id del clip fijado" pinnedNotes: "Nota fijada" hcaptcha: "hCaptcha" @@ -348,14 +375,17 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "activar reCAPTCHA" recaptchaSiteKey: "Clave del sitio" recaptchaSecretKey: "Clave secreta" -avoidMultiCaptchaConfirm: "El uso de múltiples Captchas puede causar interferencia. ¿Desea desactivar el otro Captcha? Puede dejar múltiples Captchas habilitadas presionando cancelar." +avoidMultiCaptchaConfirm: "El uso de múltiples Captchas puede causar interferencia.\ + \ ¿Desea desactivar el otro Captcha? Puede dejar múltiples Captchas habilitadas\ + \ presionando cancelar." antennas: "Antenas" manageAntennas: "Administrar antenas" name: "Nombre" antennaSource: "Origen de la antena" antennaKeywords: "Palabras clave para recibir" antennaExcludeKeywords: "Palabras clave para excluir" -antennaKeywordsDescription: "Separar con espacios es una declaración AND, separar con una linea nueva es una declaración OR" +antennaKeywordsDescription: "Separar con espacios es una declaración AND, separar\ + \ con una linea nueva es una declaración OR" notifyAntenna: "Notificar nueva nota" withFileAntenna: "Sólo notas con archivos adjuntados" enableServiceworker: "Activar ServiceWorker" @@ -378,7 +408,7 @@ exploreFediverse: "Explorar fediverso" popularTags: "Etiquetas populares" userList: "Lista" about: "Información" -aboutMisskey: "Sobre Misskey" +aboutMisskey: "Sobre Calckey" administrator: "Administrador" token: "Token" twoStepAuthentication: "Autenticación de dos factores" @@ -443,7 +473,8 @@ strongPassword: "Muy buena contraseña" passwordMatched: "Correcto" passwordNotMatched: "Las contraseñas no son las mismas" signinWith: "Inicie sesión con {x}" -signinFailed: "Autenticación fallida. Asegúrate de haber usado el nombre de usuario y contraseña correctos." +signinFailed: "Autenticación fallida. Asegúrate de haber usado el nombre de usuario\ + \ y contraseña correctos." tapSecurityKey: "Toque la clave de seguridad" or: "O" language: "Idioma" @@ -453,7 +484,8 @@ aboutX: "Acerca de {x}" useOsNativeEmojis: "Usa los emojis nativos de la plataforma" disableDrawer: "No mostrar los menús en cajones" youHaveNoGroups: "Sin grupos" -joinOrCreateGroup: "Obtenga una invitación para unirse al grupos o puede crear su propio grupo." +joinOrCreateGroup: "Obtenga una invitación para unirse al grupos o puede crear su\ + \ propio grupo." noHistory: "No hay datos en el historial" signinHistory: "Historial de ingresos" disableAnimatedMfm: "Deshabilitar MFM que tiene animaciones" @@ -484,19 +516,28 @@ showFeaturedNotesInTimeline: "Mostrar notas destacadas en la línea de tiempo" objectStorage: "Almacenamiento de objetos" useObjectStorage: "Usar almacenamiento de objetos" objectStorageBaseUrl: "Base URL" -objectStorageBaseUrlDesc: "Prefijo de URL utilizado para construir URL para hacer referencia a objetos (medios). Especifique su URL si está utilizando un CDN o Proxy; de lo contrario, especifique la dirección a la que se puede acceder públicamente de acuerdo con la guía de servicio que va a utilizar. i.g 'https://.s3.amazonaws.com' para AWS S3 y 'https://storage.googleapis.com/' para GCS." +objectStorageBaseUrlDesc: "Prefijo de URL utilizado para construir URL para hacer\ + \ referencia a objetos (medios). Especifique su URL si está utilizando un CDN o\ + \ Proxy; de lo contrario, especifique la dirección a la que se puede acceder públicamente\ + \ de acuerdo con la guía de servicio que va a utilizar. i.g 'https://.s3.amazonaws.com'\ + \ para AWS S3 y 'https://storage.googleapis.com/' para GCS." objectStorageBucket: "Bucket" -objectStorageBucketDesc: "Especifique el nombre del depósito utilizado en el servicio configurado." +objectStorageBucketDesc: "Especifique el nombre del depósito utilizado en el servicio\ + \ configurado." objectStoragePrefix: "Prefix" objectStoragePrefixDesc: "Los archivos se almacenarán en el directorio de este prefijo." objectStorageEndpoint: "Endpoint" -objectStorageEndpointDesc: "Deje esto en blanco si está utilizando AWS S3; de lo contrario, especifique el punto final como '' o ': ' de acuerdo con la guía de servicio que va a utilizar." +objectStorageEndpointDesc: "Deje esto en blanco si está utilizando AWS S3; de lo contrario,\ + \ especifique el punto final como '' o ': ' de acuerdo con la\ + \ guía de servicio que va a utilizar." objectStorageRegion: "Region" -objectStorageRegionDesc: "Especifique una región como 'xx-east-1'. Si su servicio no tiene distinción sobre regiones, déjelo en blanco o complete con 'us-east-1'." +objectStorageRegionDesc: "Especifique una región como 'xx-east-1'. Si su servicio\ + \ no tiene distinción sobre regiones, déjelo en blanco o complete con 'us-east-1'." objectStorageUseSSL: "Usar SSL" objectStorageUseSSLDesc: "Desactive esto si no va a usar HTTPS para la conexión API" objectStorageUseProxy: "Conectarse a través de Proxy" -objectStorageUseProxyDesc: "Desactive esto si no va a usar Proxy para la conexión de Almacenamiento de objetos" +objectStorageUseProxyDesc: "Desactive esto si no va a usar Proxy para la conexión\ + \ de Almacenamiento de objetos" objectStorageSetPublicRead: "Seleccionar \"public-read\" al subir " serverLogs: "Registros del servidor" deleteAll: "Eliminar todos" @@ -524,7 +565,8 @@ sort: "Ordenar" ascendingOrder: "Ascendente" descendingOrder: "Descendente" scratchpad: "Scratch pad" -scratchpadDescription: "Scratchpad proporciona un entorno experimental para AiScript. Puede escribir, ejecutar y verificar los resultados que interactúan con Misskey." +scratchpadDescription: "Scratchpad proporciona un entorno experimental para AiScript.\ + \ Puede escribir, ejecutar y verificar los resultados que interactúan con Calckey." output: "Salida" script: "Script" disablePagesScript: "Deshabilitar AiScript en Páginas" @@ -532,11 +574,14 @@ updateRemoteUser: "Actualizar información de usuario remoto" deleteAllFiles: "Borrar todos los archivos" deleteAllFilesConfirm: "¿Desea borrar todos los archivos?" removeAllFollowing: "Retener todos los siguientes" -removeAllFollowingDescription: "Cancelar todos los siguientes del servidor {host}. Ejecutar en caso de que esta instancia haya dejado de existir" +removeAllFollowingDescription: "Cancelar todos los siguientes del servidor {host}.\ + \ Ejecutar en caso de que esta instancia haya dejado de existir" userSuspended: "Este usuario ha sido suspendido." userSilenced: "Este usuario ha sido silenciado." yourAccountSuspendedTitle: "Esta cuenta ha sido suspendida" -yourAccountSuspendedDescription: "Esta cuenta ha sido suspendida debido a violaciones de los términos de servicio del servidor y otras razones. Para más información, póngase en contacto con el administrador. Por favor, no cree una nueva cuenta." +yourAccountSuspendedDescription: "Esta cuenta ha sido suspendida debido a violaciones\ + \ de los términos de servicio del servidor y otras razones. Para más información,\ + \ póngase en contacto con el administrador. Por favor, no cree una nueva cuenta." menu: "Menú" divider: "Divisor" addItem: "Agregar elemento" @@ -590,13 +635,15 @@ smtpHost: "Host" smtpPort: "Puerto" smtpUser: "Nombre de usuario" smtpPass: "Contraseña" -emptyToDisableSmtpAuth: "Deje el nombre del usuario y la contraseña en blanco para deshabilitar la autenticación SMTP" +emptyToDisableSmtpAuth: "Deje el nombre del usuario y la contraseña en blanco para\ + \ deshabilitar la autenticación SMTP" smtpSecure: "Usar SSL/TLS implícito en la conexión SMTP" smtpSecureInfo: "Apagar cuando se use STARTTLS" testEmail: "Prueba de envío" wordMute: "Silenciar palabras" regexpError: "Error de la expresión regular" -regexpErrorDescription: "Ocurrió un error en la expresión regular en la linea {line} de las palabras muteadas {tab}" +regexpErrorDescription: "Ocurrió un error en la expresión regular en la linea {line}\ + \ de las palabras muteadas {tab}" instanceMute: "Instancias silenciadas" userSaysSomething: "{name} dijo algo" makeActive: "Activar" @@ -612,10 +659,13 @@ create: "Crear" notificationSetting: "Ajustes de Notificaciones" notificationSettingDesc: "Por favor elija el tipo de notificación a mostrar" useGlobalSetting: "Usar ajustes globales" -useGlobalSettingDesc: "Al activarse, se usará la configuración de notificaciones de la cuenta, al desactivarse se pueden hacer configuraciones particulares." +useGlobalSettingDesc: "Al activarse, se usará la configuración de notificaciones de\ + \ la cuenta, al desactivarse se pueden hacer configuraciones particulares." other: "Otro" regenerateLoginToken: "Regenerar token de login" -regenerateLoginTokenDescription: "Regenerar el token usado internamente durante el login. No siempre es necesario hacerlo. Al hacerlo de nuevo, se deslogueará en todos los dispositivos." +regenerateLoginTokenDescription: "Regenerar el token usado internamente durante el\ + \ login. No siempre es necesario hacerlo. Al hacerlo de nuevo, se deslogueará en\ + \ todos los dispositivos." setMultipleBySeparatingWithSpace: "Puedes añadir mas de uno, separado por espacios." fileIdOrUrl: "Id del archivo o URL" behavior: "Comportamiento" @@ -623,13 +673,15 @@ sample: "Muestra" abuseReports: "Reportes" reportAbuse: "Reportar" reportAbuseOf: "Reportar a {name}" -fillAbuseReportDescription: "Ingrese los detalles del reporte. Si hay una nota en particular, ingrese la URL de esta." +fillAbuseReportDescription: "Ingrese los detalles del reporte. Si hay una nota en\ + \ particular, ingrese la URL de esta." abuseReported: "Se ha enviado el reporte. Muchas gracias." reporter: "Reportador" reporteeOrigin: "Reportar a" reporterOrigin: "Origen del reporte" forwardReport: "Transferir un informe a una instancia remota" -forwardReportIsAnonymous: "No puede ver su información de la instancia remota y aparecerá como una cuenta anónima del sistema" +forwardReportIsAnonymous: "No puede ver su información de la instancia remota y aparecerá\ + \ como una cuenta anónima del sistema" send: "Enviar" abuseMarkAsResolved: "Marcar reporte como resuelto" openInNewTab: "Abrir en una Nueva Pestaña" @@ -647,9 +699,11 @@ createNew: "Crear" optional: "Opcional" createNewClip: "Crear clip nuevo" unclip: "Quitar clip" -confirmToUnclipAlreadyClippedNote: "Esta nota ya está incluida en el clip \"{name}\". ¿Quiere quitar la nota del clip?" +confirmToUnclipAlreadyClippedNote: "Esta nota ya está incluida en el clip \"{name}\"\ + . ¿Quiere quitar la nota del clip?" public: "Público" -i18nInfo: "Calckey está siendo traducido a varios idiomas gracias a voluntarios. Se puede colaborar traduciendo en {link}" +i18nInfo: "Calckey está siendo traducido a varios idiomas gracias a voluntarios. Se\ + \ puede colaborar traduciendo en {link}" manageAccessTokens: "Administrar tokens de acceso" accountInfo: "Información de la Cuenta" notesCount: "Cantidad de notas" @@ -668,12 +722,18 @@ no: "No" driveFilesCount: "Cantidad de archivos en el drive" driveUsage: "Uso del drive" noCrawle: "Rechazar indexación del crawler" -noCrawleDescription: "Pedir a los motores de búsqueda que no indexen tu perfil, notas, páginas, etc." -lockedAccountInfo: "A menos que configures la visibilidad de tus notas como \"Sólo seguidores\", tus notas serán visibles para cualquiera, incluso si requieres que los seguidores sean aprobados manualmente." -alwaysMarkSensitive: "Marcar los medios de comunicación como contenido sensible por defecto" +noCrawleDescription: "Pedir a los motores de búsqueda que no indexen tu perfil, notas,\ + \ páginas, etc." +lockedAccountInfo: "A menos que configures la visibilidad de tus notas como \"Sólo\ + \ seguidores\", tus notas serán visibles para cualquiera, incluso si requieres que\ + \ los seguidores sean aprobados manualmente." +alwaysMarkSensitive: "Marcar los medios de comunicación como contenido sensible por\ + \ defecto" loadRawImages: "Cargar las imágenes originales en lugar de mostrar las miniaturas" disableShowingAnimatedImages: "No reproducir imágenes animadas" -verificationEmailSent: "Se le ha enviado un correo electrónico de confirmación. Por favor, acceda al enlace proporcionado en el correo electrónico para completar la configuración." +verificationEmailSent: "Se le ha enviado un correo electrónico de confirmación. Por\ + \ favor, acceda al enlace proporcionado en el correo electrónico para completar\ + \ la configuración." notSet: "Sin especificar" emailVerified: "Su dirección de correo electrónico ha sido verificada." noteFavoritesCount: "Número de notas favoritas" @@ -685,14 +745,16 @@ clips: "Clip" experimentalFeatures: "Características experimentales" developer: "Desarrolladores" makeExplorable: "Hacer visible la cuenta en \"Explorar\"" -makeExplorableDescription: "Si desactiva esta opción, su cuenta no aparecerá en la sección \"Explorar\"." +makeExplorableDescription: "Si desactiva esta opción, su cuenta no aparecerá en la\ + \ sección \"Explorar\"." showGapBetweenNotesInTimeline: "Mostrar un intervalo entre notas en la línea de tiempo" duplicate: "Duplicar" left: "Izquierda" center: "Centrar" wide: "Ancho" narrow: "Estrecho" -reloadToApplySetting: "Esta configuración sólo se aplicará después de recargar la página. ¿Recargar ahora?" +reloadToApplySetting: "Esta configuración sólo se aplicará después de recargar la\ + \ página. ¿Recargar ahora?" needReloadToApply: "Se requiere un reinicio para la aplicar los cambios" showTitlebar: "Mostrar la barra de título" clearCache: "Limpiar caché" @@ -700,7 +762,11 @@ onlineUsersCount: "{n} usuarios en línea" nUsers: "{n} Usuarios" nNotes: "{n} Notas" sendErrorReports: "Envíar informe de errores" -sendErrorReportsDescription: "Si habilita esta opción, ayudará a mejorar la calidad de Misskey compartiendo información detallada sobre los errores cuando se produzca un problema.\nEsto incluye información como la versión de su sistema operativo, el tipo de navegador que utiliza, su historial de actividad, etc." +sendErrorReportsDescription: "Si habilita esta opción, los detalles de los errores\ + \ serán compartidos con Calckey cuando ocurra un problema, lo que ayudará a mejorar\ + \ la calidad de Calckey. \nEsto incluye información como la versión del sistema\ + \ operativo, el tipo de navegador que está utilizando y su historial en Calckey,\ + \ entre otros datos." myTheme: "Mi Tema" backgroundColor: "Fondo" accentColor: "Acento" @@ -728,7 +794,8 @@ receiveAnnouncementFromInstance: "Recibir notificaciones de la instancia" emailNotification: "Notificaciones por correo electrónico" publish: "Publicar" inChannelSearch: "Buscar en el canal" -useReactionPickerForContextMenu: "Haga clic con el botón derecho para abrir el menu de reacciones" +useReactionPickerForContextMenu: "Haga clic con el botón derecho para abrir el menu\ + \ de reacciones" typingUsers: "{users} está escribiendo" jumpToSpecifiedDate: "Saltar a una fecha específica" showingPastTimeline: "Mostrar líneas de tiempo antiguas" @@ -739,14 +806,16 @@ unlikeConfirm: "¿Quitar como favorito?" fullView: "Vista completa" quitFullView: "quitar vista completa" addDescription: "Agregar descripción" -userPagePinTip: "Puede mantener sus notas visibles aquí seleccionando Pin en el menú de notas individuales" +userPagePinTip: "Puede mantener sus notas visibles aquí seleccionando Pin en el menú\ + \ de notas individuales" notSpecifiedMentionWarning: "Algunas menciones no están incluidas en el destino" info: "Información" userInfo: "Información del usuario" unknown: "Desconocido" onlineStatus: "En línea" hideOnlineStatus: "mostrarse como desconectado" -hideOnlineStatusDescription: "Ocultar su estado en línea puede reducir la eficacia de algunas funciones, como la búsqueda" +hideOnlineStatusDescription: "Ocultar su estado en línea puede reducir la eficacia\ + \ de algunas funciones, como la búsqueda" online: "En línea" active: "Activo" offline: "Sin conexión" @@ -781,7 +850,8 @@ emailNotConfiguredWarning: "No se ha configurado una dirección de correo electr ratio: "Proporción" previewNoteText: "Mostrar vista preliminar" customCss: "CSS personalizado" -customCssWarn: "Este ajuste sólo debe utilizarse si se sabe lo que hace. Introducir valores inadecuados puede hacer que el cliente deje de funcionar con normalidad." +customCssWarn: "Este ajuste sólo debe utilizarse si se sabe lo que hace. Introducir\ + \ valores inadecuados puede hacer que el cliente deje de funcionar con normalidad." global: "Global" squareAvatars: "Mostrar iconos cuadrados" sent: "Enviar" @@ -791,12 +861,14 @@ hashtags: "Hashtag" troubleshooting: "Solución de problemas" useBlurEffect: "Utilizar efecto de desenfoque en la interfaz de usuario" learnMore: "Ver más" -misskeyUpdated: "¡Misskey ha sido actualizado!" +misskeyUpdated: "¡Calckey ha sido actualizado!" whatIsNew: "Mostrar cambios" translate: "Traducir" translatedFrom: "Traducido de {x}" accountDeletionInProgress: "La eliminación de la cuenta está en curso" -usernameInfo: "Un nombre que identifique su cuenta de otras en este servidor. Puede utilizar el alfabeto (a~z, A~Z), dígitos (0~9) o guiones bajos (_). Los nombres de usuario no se pueden cambiar posteriormente." +usernameInfo: "Un nombre que identifique su cuenta de otras en este servidor. Puede\ + \ utilizar el alfabeto (a~z, A~Z), dígitos (0~9) o guiones bajos (_). Los nombres\ + \ de usuario no se pueden cambiar posteriormente." aiChanMode: "Modo Ai" keepCw: "Mantener la advertencia de contenido" pubSub: "Cuentas Pub/Sub" @@ -806,18 +878,21 @@ unresolved: "Sin resolver" breakFollow: "Dejar de seguir" itsOn: "¡Está encendido!" itsOff: "¡Está apagado!" -emailRequiredForSignup: "Se requere una dirección de correo electrónico para el registro de la cuenta" +emailRequiredForSignup: "Se requere una dirección de correo electrónico para el registro\ + \ de la cuenta" unread: "No leído" filter: "Filtro" controlPanel: "Panel de control" manageAccounts: "Administrar cuenta" makeReactionsPublic: "Hacer el historial de reacciones público" -makeReactionsPublicDescription: "Todas las reacciones que hayas hecho serán públicamente visibles." +makeReactionsPublicDescription: "Todas las reacciones que hayas hecho serán públicamente\ + \ visibles." classic: "Clásico" muteThread: "Ocultar hilo" unmuteThread: "Mostrar hilo" ffVisibility: "Visibilidad de seguidores y seguidos" -ffVisibilityDescription: "Puedes configurar quien puede ver a quienes sigues y quienes te siguen" +ffVisibilityDescription: "Puedes configurar quien puede ver a quienes sigues y quienes\ + \ te siguen" continueThread: "Ver la continuación del hilo" deleteAccountConfirm: "La cuenta será borrada. ¿Está seguro?" incorrectPassword: "La contraseña es incorrecta" @@ -858,14 +933,16 @@ thereIsUnresolvedAbuseReportWarning: "Hay reportes sin resolver" recommended: "Recomendado" check: "Verificar" driveCapOverrideLabel: "Cambiar la capacidad de la unidad para este usuario" -driveCapOverrideCaption: "Restablecer la capacidad a su predeterminado ingresando un valor de 0 o menos" +driveCapOverrideCaption: "Restablecer la capacidad a su predeterminado ingresando\ + \ un valor de 0 o menos" requireAdminForView: "Necesitas iniciar sesión como administrador para ver esto." isSystemAccount: "Cuenta creada y operada automáticamente por el sistema" typeToConfirm: "Ingrese {x} para confirmar" deleteAccount: "Borrar cuenta" document: "Documento" numberOfPageCache: "Cantidad de páginas cacheadas" -numberOfPageCacheDescription: "Al aumentar el número mejora la conveniencia pero tambien puede aumentar la carga y la memoria a usarse" +numberOfPageCacheDescription: "Al aumentar el número mejora la conveniencia pero tambien\ + \ puede aumentar la carga y la memoria a usarse" logoutConfirm: "¿Cerrar sesión?" lastActiveDate: "Utilizado por última vez el" statusbar: "Barra de estado" @@ -882,42 +959,59 @@ sensitiveMediaDetection: "Detección de contenido NSFW" localOnly: "Solo local" remoteOnly: "Sólo remoto" failedToUpload: "La subida falló" -cannotUploadBecauseInappropriate: "Este archivo no se puede subir debido a que algunas partes han sido detectadas comoNSFW." -cannotUploadBecauseNoFreeSpace: "La subida falló debido a falta de espacio libre en la unidad del usuario." +cannotUploadBecauseInappropriate: "Este archivo no se puede subir debido a que algunas\ + \ partes han sido detectadas comoNSFW." +cannotUploadBecauseNoFreeSpace: "La subida falló debido a falta de espacio libre en\ + \ la unidad del usuario." beta: "Beta" enableAutoSensitive: "Marcar automáticamente contenido NSFW" -enableAutoSensitiveDescription: "Permite la detección y marcado automático de contenido NSFW usando 'Machine Learning' cuando sea posible. Incluso si esta opción está desactivada, puede ser activado para toda la instancia." -activeEmailValidationDescription: "Habilita la validación estricta de direcciones de correo electrónico, lo cual incluye la revisión de direcciones desechables y si se puede comunicar con éstas. Cuando está deshabilitado, sólo el formato de la dirección es validado." +enableAutoSensitiveDescription: "Permite la detección y marcado automático de contenido\ + \ NSFW usando 'Machine Learning' cuando sea posible. Incluso si esta opción está\ + \ desactivada, puede ser activado para toda la instancia." +activeEmailValidationDescription: "Habilita la validación estricta de direcciones\ + \ de correo electrónico, lo cual incluye la revisión de direcciones desechables\ + \ y si se puede comunicar con éstas. Cuando está deshabilitado, sólo el formato\ + \ de la dirección es validado." navbar: "Barra de navegación" shuffle: "Aleatorio" account: "Cuentas" move: "Mover" _sensitiveMediaDetection: - description: "Reduce el esfuerzo de la moderación el el servidor a través del reconocimiento automático de contenido NSFW usando 'Machine Learning'. Esto puede incrementar ligeramente la carga en el servidor." + description: "Reduce el esfuerzo de la moderación el el servidor a través del reconocimiento\ + \ automático de contenido NSFW usando 'Machine Learning'. Esto puede incrementar\ + \ ligeramente la carga en el servidor." sensitivity: "Sensibilidad de detección" - sensitivityDescription: "Reducir la sensibilidad puede acarrear a varios falsos positivos, mientras que incrementarla puede reducir las detecciones (falsos negativos)." + sensitivityDescription: "Reducir la sensibilidad puede acarrear a varios falsos\ + \ positivos, mientras que incrementarla puede reducir las detecciones (falsos\ + \ negativos)." setSensitiveFlagAutomatically: "Marcar como NSFW" - setSensitiveFlagAutomaticallyDescription: "Los resultados de la detección interna pueden ser retenidos incluso si la opción está desactivada." + setSensitiveFlagAutomaticallyDescription: "Los resultados de la detección interna\ + \ pueden ser retenidos incluso si la opción está desactivada." analyzeVideos: "Habilitar el análisis de videos" - analyzeVideosDescription: "Analizar videos en adición a las imágenes. Esto puede incrementar ligeramente la carga del servidor." + analyzeVideosDescription: "Analizar videos en adición a las imágenes. Esto puede\ + \ incrementar ligeramente la carga del servidor." _emailUnavailable: used: "Ya fue usado" - format: "Formato no válido." - disposable: "No es un correo reutilizable" + format: "El formato de este correo electrónico no es válido" + disposable: "No se pueden utilizar direcciones de correo electrónico desechables" mx: "Servidor de correo inválido" smtp: "Servidor de correo no disponible" _ffVisibility: - public: "Publicar" + public: "Público" followers: "Visible solo para seguidores" private: "Privado" _signup: almostThere: "Ya falta poco" emailAddressInfo: "Ingrese el correo electrónico que usa. Este no se hará público." - emailSent: "Se envió un correo de verificación a la dirección {email}. Acceda al link enviado en el correo para completar el ingreso." + emailSent: "Se envió un correo de verificación a la dirección {email}. Acceda al\ + \ link enviado en el correo para completar el ingreso." _accountDelete: accountDelete: "Eliminar Cuenta" - mayTakeTime: "La eliminación de la cuenta es un proceso que precisa de carga. Puede pasar un tiempo hasta que se complete si es mucho el contenido creado y los archivos subidos." - sendEmail: "Cuando se termine de borrar la cuenta, se enviará un correo a la dirección usada para el registro." + mayTakeTime: "La eliminación de la cuenta es un proceso que precisa de carga. Puede\ + \ pasar un tiempo hasta que se complete si es mucho el contenido creado y los\ + \ archivos subidos." + sendEmail: "Cuando se termine de borrar la cuenta, se enviará un correo a la dirección\ + \ usada para el registro." requestAccountDelete: "Pedir la eliminación de la cuenta." started: "El proceso de eliminación ha comenzado." inProgress: "La eliminación está en proceso." @@ -925,9 +1019,12 @@ _ad: back: "Deseleccionar" reduceFrequencyOfThisAd: "Mostrar menos este anuncio." _forgotPassword: - enterEmail: "Ingrese el correo usado para registrar la cuenta. Se enviará un link para resetear la contraseña." + enterEmail: "Ingrese el correo usado para registrar la cuenta. Se enviará un link\ + \ para resetear la contraseña." ifNoEmail: "Si no utilizó un correo para crear la cuenta, contáctese con el administrador." - contactAdmin: "Esta instancia no admite el uso de direcciones de correo electrónico, póngase en contacto con el administrador de la instancia para restablecer su contraseña" + contactAdmin: "Esta instancia no admite el uso de direcciones de correo electrónico,\ + \ póngase en contacto con el administrador de la instancia para restablecer su\ + \ contraseña" _gallery: my: "Mi galería" liked: "Publicaciones que me gustan" @@ -950,12 +1047,15 @@ _preferencesBackups: save: "Guardar cambios" inputName: "Por favor, ingresa un nombre para este respaldo" cannotSave: "Fallo al guardar" - nameAlreadyExists: "Un respaldo llamado \"{name}\" ya existe. Por favor ingresa un nombre diferente" - applyConfirm: "¿Realmente quieres aplicar los cambios desde el archivo \"{name}\" a este dispositivo? Las configuraciones existentes serán sobreescritas. " + nameAlreadyExists: "Un respaldo llamado \"{name}\" ya existe. Por favor ingresa\ + \ un nombre diferente" + applyConfirm: "¿Realmente quieres aplicar los cambios desde el archivo \"{name}\"\ + \ a este dispositivo? Las configuraciones existentes serán sobreescritas. " saveConfirm: "¿Guardar respaldo como \"{name}\"?" deleteConfirm: "¿Borrar el respaldo \"{name}\"?" renameConfirm: "¿Renombrar este respaldo de \"{old}\" a \"{new}\"?" - noBackups: "No existen respaldos. Deberás respaldar las configuraciones del cliente en este servidor usando \"Crear nuevo respaldo\"" + noBackups: "No existen respaldos. Deberás respaldar las configuraciones del cliente\ + \ en este servidor usando \"Crear nuevo respaldo\"" createdAt: "Creado: {date} {time}" updatedAt: "Actualizado: {date} {time}" cannotLoad: "La carga falló" @@ -967,24 +1067,29 @@ _registry: domain: "Dominio" createKey: "Crear una llave" _aboutMisskey: - about: "Misskey es un software de código abierto, desarrollado por syuilo desde el 2014" + about: "Calckey es una bifurcación de Misskey creada por ThatOneCalculator, que\ + \ ha estado en desarrollo desde el 2022." contributors: "Principales colaboradores" allContributors: "Todos los colaboradores" source: "Código fuente" - translation: "Traducir Misskey" - donate: "Donar a Misskey" - morePatrons: "Muchas más personas nos apoyan. Muchas gracias🥰" - patrons: "Patrocinadores" + translation: "Traducir Calckey" + donate: "Donar a Calckey" + morePatrons: "También apreciamos el apoyo de muchos más que no están enlistados\ + \ aquí. ¡Gracias! \U0001F970" + patrons: "Mecenas de Calckey" _nsfw: respect: "Ocultar medios NSFW" ignore: "No esconder medios NSFW " force: "Ocultar todos los medios" _mfm: cheatSheet: "Hoja de referencia de MFM" - intro: "MFM es un lenguaje de marcado dedicado que se puede usar en varios lugares dentro de Misskey. Aquí puede ver una lista de sintaxis disponibles en MFM." - dummy: "Misskey expande el mundo de la Fediverso" + intro: "MFM es un lenguaje de marcado dedicado que se puede usar en varios lugares\ + \ dentro de Misskey, Calckey, Akkoma, y mucho más. Aquí puede ver una lista de\ + \ sintaxis disponibles en MFM." + dummy: "Calckey expande el mundo de la Fediverso" mention: "Menciones" - mentionDescription: "El signo @ seguido de un nombre de usuario se puede utilizar para notificar a un usuario en particular." + mentionDescription: "El signo @ seguido de un nombre de usuario se puede utilizar\ + \ para notificar a un usuario en particular." hashtag: "Hashtag" hashtagDescription: "Puede especificar un hashtag con un numeral y el texto." url: "URL" @@ -1000,7 +1105,8 @@ _mfm: inlineCode: "Código (insertado)" inlineCodeDescription: "Muestra el código de un programa resaltando su sintaxis" blockCode: "Código (bloque)" - blockCodeDescription: "Código de resaltado de sintaxis, como programas de varias líneas con bloques." + blockCodeDescription: "Código de resaltado de sintaxis, como programas de varias\ + \ líneas con bloques." inlineMath: "Fórmula (insertado)" inlineMathDescription: "Muestra fórmulas (KaTeX) insertadas" blockMath: "Fórmula (bloque)" @@ -1012,7 +1118,8 @@ _mfm: search: "Buscar" searchDescription: "Muestra una caja de búsqueda con texto pre-escrito" flip: "Echar de un capirotazo" - flipDescription: "Voltea el contenido hacia arriba / abajo o hacia la izquierda / derecha." + flipDescription: "Voltea el contenido hacia arriba / abajo o hacia la izquierda\ + \ / derecha." jelly: "Animación (gelatina)" jellyDescription: "Aplica un efecto de animación tipo gelatina" tada: "Animación (tadá)" @@ -1034,7 +1141,8 @@ _mfm: x4: "Totalmente grande" x4Description: "Muestra el contenido totalmente grande" blur: "Desenfoque" - blurDescription: "Para desenfocar el contenido. Se muestra claramente al colocar el puntero encima." + blurDescription: "Para desenfocar el contenido. Se muestra claramente al colocar\ + \ el puntero encima." font: "Fuente" fontDescription: "Elegir la fuente del contenido" rainbow: "Arcoíris" @@ -1044,7 +1152,8 @@ _mfm: rotate: "Rotar" rotateDescription: "Rota el contenido a un ángulo especificado." plain: "Plano" - plainDescription: "Desactiva los efectos de todo el contenido MFM con este efecto MFM." + plainDescription: "Desactiva los efectos de todo el contenido MFM con este efecto\ + \ MFM." _instanceTicker: none: "No mostrar" remote: "Mostrar a usuarios remotos" @@ -1053,6 +1162,7 @@ _serverDisconnectedBehavior: reload: "Recargar automáticamente" dialog: "Mostrar diálogo de advertencia" quiet: "Advertencia discreta" + nothing: Hacer nada _channel: create: "Crear canal" edit: "Editar canal" @@ -1070,15 +1180,20 @@ _menuDisplay: hide: "Ocultar" _wordMute: muteWords: "Palabras que silenciar" - muteWordsDescription: "Separar con espacios indica una declaracion And, separar con lineas nuevas indica una declaracion Or。" - muteWordsDescription2: "Encerrar las palabras clave entre numerales para usar expresiones regulares" + muteWordsDescription: "Separar con espacios indica una declaracion And, separar\ + \ con lineas nuevas indica una declaracion Or。" + muteWordsDescription2: "Encerrar las palabras clave entre numerales para usar expresiones\ + \ regulares" softDescription: "Ocultar en la linea de tiempo las notas que cumplen las condiciones" - hardDescription: "Evitar que se agreguen a la linea de tiempo las notas que cumplen las condiciones. Las notas no agregadas seguirán quitadas aunque cambien las condiciones." + hardDescription: "Evitar que se agreguen a la linea de tiempo las notas que cumplen\ + \ las condiciones. Las notas no agregadas seguirán quitadas aunque cambien las\ + \ condiciones." soft: "Suave" hard: "Duro" mutedNotes: "Notas silenciadas" _instanceMute: - instanceMuteDescription: "Silencia todas las notas y reposts de la instancias seleccionadas, incluyendo respuestas a los usuarios de las mismas" + instanceMuteDescription: "Silencia todas las notas y reposts de la instancias seleccionadas,\ + \ incluyendo respuestas a los usuarios de las mismas" instanceMuteDescription2: "Separar por líneas" title: "Oculta las notas de las instancias listadas." heading: "Instancias a silenciar" @@ -1184,32 +1299,47 @@ _tutorial: step1_1: "¡Bienvenido!" step1_2: "Vamos a configurarte. Estarás listo y funcionando en poco tiempo" step2_1: "En primer lugar, rellena tu perfil" - step2_2: "Proporcionar algo de información sobre quién eres hará que sea más fácil para los demás saber si quieren ver tus notas o seguirte." + step2_2: "Proporcionar algo de información sobre quién eres hará que sea más fácil\ + \ para los demás saber si quieren ver tus notas o seguirte." step3_1: "¡Ahora es el momento de seguir a algunas personas!" - step3_2: "Tu página de inicio y tus líneas de tiempo sociales se basan en quién sigues, así que intenta seguir un par de cuentas para empezar.\nHaz clic en el círculo más en la parte superior derecha de un perfil para seguirlos." + step3_2: "Tu página de inicio y tus líneas de tiempo sociales se basan en quién\ + \ sigues, así que intenta seguir un par de cuentas para empezar.\nHaz clic en\ + \ el círculo más en la parte superior derecha de un perfil para seguirlos." step4_1: "Vamos a salir a la calle" - step4_2: "Para tu primer post, a algunas personas les gusta hacer un post de {introduction} o un simple \"¡Hola mundo!\"" + step4_2: "Para tu primer post, a algunas personas les gusta hacer un post de {introduction}\ + \ o un simple \"¡Hola mundo!\"" step5_1: "¡Líneas de tiempo, líneas de tiempo por todas partes!" step5_2: "Su instancia tiene {timelines} diferentes líneas de tiempo habilitadas" - step5_3: "La línea de tiempo Inicio {icon} es donde puedes ver las publicaciones de tus seguidores." - step5_4: "La línea de tiempo Local {icon} es donde puedes ver las publicaciones de todos los demás en esta instancia." - step5_5: "La línea de tiempo {icon} recomendada es donde puedes ver las publicaciones de las instancias que los administradores recomiendan." - step5_6: "La línea de tiempo Social {icon} es donde puedes ver las publicaciones de los amigos de tus seguidores." - step5_7: "La línea de tiempo Global {icon} es donde puedes ver las publicaciones de todas las demás instancias conectadas." + step5_3: "La línea de tiempo Inicio {icon} es donde puedes ver las publicaciones\ + \ de tus seguidores." + step5_4: "La línea de tiempo Local {icon} es donde puedes ver las publicaciones\ + \ de todos los demás en esta instancia." + step5_5: "La línea de tiempo {icon} recomendada es donde puedes ver las publicaciones\ + \ de las instancias que los administradores recomiendan." + step5_6: "La línea de tiempo Social {icon} es donde puedes ver las publicaciones\ + \ de los amigos de tus seguidores." + step5_7: "La línea de tiempo Global {icon} es donde puedes ver las publicaciones\ + \ de todas las demás instancias conectadas." step6_1: "Entonces, ¿qué es este lugar?" - step6_2: "Bueno, no sólo te has unido a Calckey. Te has unido a un portal del Fediverso, una red interconectada de miles de servidores, llamada \"instancias\"" - step6_3: "Cada servidor funciona de forma diferente, y no todos los servidores ejecutan Calckey. Sin embargo, ¡éste lo hace! Es un poco complicado, pero le cogerás el tranquillo enseguida" + step6_2: "Bueno, no sólo te has unido a Calckey. Te has unido a un portal del Fediverso,\ + \ una red interconectada de miles de servidores, llamada \"instancias\"" + step6_3: "Cada servidor funciona de forma diferente, y no todos los servidores ejecutan\ + \ Calckey. Sin embargo, ¡éste lo hace! Es un poco complicado, pero le cogerás\ + \ el tranquillo enseguida" step6_4: "¡Ahora ve, explora y diviértete!" _2fa: alreadyRegistered: "Ya has completado la configuración." registerDevice: "Registrar dispositivo" registerKey: "Registrar clave" - step1: "Primero, instale en su dispositivo la aplicación de autenticación {a} o {b} u otra." + step1: "Primero, instale en su dispositivo la aplicación de autenticación {a} o\ + \ {b} u otra." step2: "Luego, escanee con la aplicación el código QR mostrado en pantalla." step2Url: "En una aplicación de escritorio se puede ingresar la siguiente URL:" step3: "Para terminar, ingrese el token mostrado en la aplicación." step4: "Ahora cuando inicie sesión, ingrese el mismo token" - securityKeyInfo: "Se puede configurar el inicio de sesión usando una clave de seguridad de hardware que soporte FIDO2 o con un certificado de huella digital o con un PIN" + securityKeyInfo: "Se puede configurar el inicio de sesión usando una clave de seguridad\ + \ de hardware que soporte FIDO2 o con un certificado de huella digital o con un\ + \ PIN" _permissions: "read:account": "Ver información de la cuenta" "write:account": "Editar información de la cuenta" @@ -1245,7 +1375,8 @@ _permissions: "write:gallery-likes": "Editar favoritos de la galería" _auth: shareAccess: "¿Desea permitir el acceso a la cuenta \"{name}\"?" - shareAccessAsk: "¿Está seguro de que desea autorizar esta aplicación para acceder a su cuenta?" + shareAccessAsk: "¿Está seguro de que desea autorizar esta aplicación para acceder\ + \ a su cuenta?" permissionAsk: "Esta aplicación requiere los siguientes permisos" pleaseGoBack: "Por favor, vuelve a la aplicación" callback: "Volviendo a la aplicación" @@ -1287,6 +1418,9 @@ _widgets: serverMetric: "Estadísticas del servidor" aiscript: "Consola de AiScript" aichan: "indigo" + userList: Lista Usuarios + _userList: + chooseList: Seleccione una lista _cw: hide: "Ocultar" show: "Ver más" @@ -1348,6 +1482,8 @@ _profile: metadataContent: "Contenido" changeAvatar: "Cambiar avatar" changeBanner: "Cambiar banner" + locationDescription: Si ingresas tu ciudad primero, el tiempo local tuyo será visible + para otros usuarios. _exportOrImport: allNotes: "Todas las notas" followingList: "Siguiendo" @@ -1387,6 +1523,7 @@ _timelines: local: "Local" social: "Social" global: "Global" + recommended: Recomendado _pages: newPage: "Crear página" editPage: "Editar página" @@ -1633,7 +1770,8 @@ _pages: _seedRandomPick: arg1: "Semilla" arg2: "Listas" - DRPWPM: "Elegir aleatoriamente de la lista ponderada (Diariamente para cada usuario)" + DRPWPM: "Elegir aleatoriamente de la lista ponderada (Diariamente para cada\ + \ usuario)" _DRPWPM: arg1: "Lista de texto" pick: "Elegir de la lista" @@ -1664,7 +1802,8 @@ _pages: _for: arg1: "Cantidad de repeticiones" arg2: "Acción" - typeError: "El slot {slot} acepta el tipo {expect} pero fue ingresado el tipo {actual}" + typeError: "El slot {slot} acepta el tipo {expect} pero fue ingresado el tipo\ + \ {actual}" thereIsEmptySlot: "El slot {slot} está vacío" types: string: "Texto" @@ -1728,8 +1867,10 @@ _deck: newProfile: "Nuevo perfil" deleteProfile: "Eliminar perfil" introduction: "¡Crea la interfaz perfecta para tí organizando las columnas libremente!" - introduction2: "Presiona en la + de la derecha de la pantalla para añadir nuevas columnas donde quieras." - widgetsIntroduction: "Por favor selecciona \"Editar Widgets\" en el menú columna y agrega un widget." + introduction2: "Presiona en la + de la derecha de la pantalla para añadir nuevas\ + \ columnas donde quieras." + widgetsIntroduction: "Por favor selecciona \"Editar Widgets\" en el menú columna\ + \ y agrega un widget." _columns: main: "Principal" widgets: "Widgets" @@ -1739,3 +1880,51 @@ _deck: list: "Listas" mentions: "Menciones" direct: "Mensaje directo" +manageGroups: Administrar grupos +replayTutorial: Repetir Tutorial +privateMode: Modo privado +addInstance: Añadir una instancia +renoteMute: Silenciar impulsos +renoteUnmute: Dejar de silenciar impulsos +flagSpeakAsCat: Habla como un gato +selectInstance: Selectiona una instancia +flagSpeakAsCatDescription: Tu publicación se "nyanified" cuando esté en modo gato +allowedInstances: Instancias en la lista blanca +breakFollowConfirm: ¿Estás seguro de que quieres eliminar el seguidor? +subscribePushNotification: Habilitar notificaciones +unsubscribePushNotification: Desactivar notificaciones +pushNotificationAlreadySubscribed: Las notificaciones ya están activados +pushNotificationNotSupported: Su navegador o instancia no admite notificaciones +moveAccount: ¡Mover cuenta! +moveFrom: Mueve a esta cuenta de una cuenta antigua +moveFromLabel: 'La cuenta que estás moviendo de:' +moveAccountDescription: '' +license: Licencia +_apps: + apps: Aplicaciones + crossPlatform: Plataforma Cruzada + mobile: Teléfono móvil + secondClass: Segunda clase + lesskey: '' + firstClass: Primera clase + thirdClass: Tercera clase + theDesk: '' + pwa: Instalar PWA + free: Gratis + paid: Pagado +noThankYou: No gracias +userSaysSomethingReason: '{name} dijo {reason}' +hiddenTags: Etiquetas Ocultas +noInstances: No hay instancias +accountMoved: 'Usuario ha movido a una cuenta nueva:' +caption: Auto Subtítulos +showAds: Mostrar Anuncios +enterSendsMessage: Presione "RETORNO" en los mensajes para enviar el mensaje (para + apagarlo es Ctrl + RETORNO) +recommendedInstances: Instancias Recomendadas +instanceSecurity: Seguridad de la instancia +seperateRenoteQuote: Separar impulsados y Citar botones +_messaging: + groups: Grupos + dms: Privado +pushNotification: Notificaciones diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 9f7028d3b1..8c7bf8025b 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -1,7 +1,10 @@ ---- _lang_: "Français" headlineMisskey: "Réseau relié par des notes" -introMisskey: "Bienvenue ! Misskey est un service de microblogage décentralisé, libre et ouvert.\nÉcrivez des « notes » et partagez ce qui se passe à l’instant présent, autour de vous avec les autres 📡\nLa fonction « réactions », vous permet également d’ajouter une réaction rapide aux notes des autres utilisateur·rice·s 👍\nExplorons un nouveau monde 🚀" +introMisskey: "Bienvenue ! Misskey est un service de microblogage décentralisé, libre\ + \ et ouvert.\nÉcrivez des « notes » et partagez ce qui se passe à l’instant présent,\ + \ autour de vous avec les autres \U0001F4E1\nLa fonction « réactions », vous permet\ + \ également d’ajouter une réaction rapide aux notes des autres utilisateur·rice·s\ + \ \U0001F44D\nExplorons un nouveau monde \U0001F680" monthAndDay: "{day}/{month}" search: "Rechercher" notifications: "Notifications" @@ -23,7 +26,8 @@ otherSettings: "Paramètres avancés" openInWindow: "Ouvrir dans une nouvelle fenêtre" profile: "Profil" timeline: "Fil" -noAccountDescription: "L’utilisateur·rice n’a pas encore renseigné de biographie de présentation sur son profil." +noAccountDescription: "L’utilisateur·rice n’a pas encore renseigné de biographie de\ + \ présentation sur son profil." login: "Se connecter" loggingIn: "Connexion en cours" logout: "Se déconnecter" @@ -44,7 +48,8 @@ copyContent: "Copier le contenu" copyLink: "Copier le lien" delete: "Supprimer" deleteAndEdit: "Supprimer et réécrire" -deleteAndEditConfirm: "Êtes-vous sûr·e de vouloir supprimer cette note et la reformuler ? Vous perdrez toutes les réactions, renotes et réponses y afférentes." +deleteAndEditConfirm: "Êtes-vous sûr·e de vouloir supprimer cette note et la reformuler\ + \ ? Vous perdrez toutes les réactions, renotes et réponses y afférentes." addToList: "Ajouter à une liste" sendMessage: "Envoyer un message" copyUsername: "Copier le nom d’utilisateur·rice" @@ -64,14 +69,16 @@ import: "Importer" export: "Exporter" files: "Fichiers" download: "Télécharger" -driveFileDeleteConfirm: "Êtes-vous sûr·e de vouloir supprimer le fichier \"{name}\" ? Les notes liées à ce fichier seront aussi supprimées." +driveFileDeleteConfirm: "Êtes-vous sûr·e de vouloir supprimer le fichier \"{name}\"\ + \ ? Les notes liées à ce fichier seront aussi supprimées." unfollowConfirm: "Désirez-vous vous désabonner de {name} ?" -exportRequested: "Vous avez demandé une exportation. L’opération pourrait prendre un peu de temps. Une terminée, le fichier résultant sera ajouté au Drive." +exportRequested: "Vous avez demandé une exportation. L’opération pourrait prendre\ + \ un peu de temps. Une terminée, le fichier résultant sera ajouté au Drive." importRequested: "Vous avez initié un import. Cela pourrait prendre un peu de temps." lists: "Listes" noLists: "Vous n’avez aucune liste" -note: "Notes" -notes: "Notes" +note: "Post" +notes: "Posts" following: "Abonnements" followers: "Abonné·e·s" followsYou: "Vous suit" @@ -81,9 +88,12 @@ error: "Erreur" somethingHappened: "Une erreur est survenue" retry: "Réessayer" pageLoadError: "Le chargement de la page a échoué" -pageLoadErrorDescription: "Cela est généralement causé par le cache du navigateur ou par un problème réseau. Veuillez vider votre cache ou attendre un peu et réessayer." -serverIsDead: "Le serveur ne répond pas. Patientez quelques instants puis essayez à nouveau." -youShouldUpgradeClient: "Si la page ne s'affiche pas correctement, rechargez-la pour mettre votre client à jour." +pageLoadErrorDescription: "Cela est généralement causé par le cache du navigateur\ + \ ou par un problème réseau. Veuillez vider votre cache ou attendre un peu et réessayer." +serverIsDead: "Le serveur ne répond pas. Patientez quelques instants puis essayez\ + \ à nouveau." +youShouldUpgradeClient: "Si la page ne s'affiche pas correctement, rechargez-la pour\ + \ mettre votre client à jour." enterListName: "Nom de la liste" privacy: "Confidentialité" makeFollowManuallyApprove: "Accepter manuellement les demandes d’abonnement" @@ -108,8 +118,11 @@ sensitive: "Contenu sensible" add: "Ajouter" reaction: "Réactions" reactionSetting: "Réactions à afficher dans le sélecteur de réactions" -reactionSettingDescription2: "Déplacer pour réorganiser, cliquer pour effacer, utiliser « + » pour ajouter." -rememberNoteVisibility: "Activer l'option \" se souvenir de la visibilité des notes \" vous permet de réutiliser automatiquement la visibilité utilisée lors de la publication de votre note précédente." +reactionSettingDescription2: "Déplacer pour réorganiser, cliquer pour effacer, utiliser\ + \ « + » pour ajouter." +rememberNoteVisibility: "Activer l'option \" se souvenir de la visibilité des notes\ + \ \" vous permet de réutiliser automatiquement la visibilité utilisée lors de la\ + \ publication de votre note précédente." attachCancel: "Supprimer le fichier attaché" markAsSensitive: "Marquer comme sensible" unmarkAsSensitive: "Supprimer le marquage comme sensible" @@ -137,13 +150,20 @@ emojiUrl: "URL de l’émoji" addEmoji: "Ajouter un émoji" settingGuide: "Configuration proposée" cacheRemoteFiles: "Mise en cache des fichiers distants" -cacheRemoteFilesDescription: "Lorsque cette option est désactivée, les fichiers distants sont chargés directement depuis l’instance distante. La désactiver diminuera certes l’utilisation de l’espace de stockage local mais augmentera le trafic réseau puisque les miniatures ne seront plus générées." +cacheRemoteFilesDescription: "Lorsque cette option est désactivée, les fichiers distants\ + \ sont chargés directement depuis l’instance distante. La désactiver diminuera certes\ + \ l’utilisation de l’espace de stockage local mais augmentera le trafic réseau puisque\ + \ les miniatures ne seront plus générées." flagAsBot: "Ce compte est un robot" -flagAsBotDescription: "Si ce compte est géré de manière automatisée, choisissez cette option. Si elle est activée, elle agira comme un marqueur pour les autres développeurs afin d'éviter des chaînes d'interaction sans fin avec d'autres robots et d'ajuster les systèmes internes de Misskey pour traiter ce compte comme un robot." +flagAsBotDescription: "Si ce compte est géré de manière automatisée, choisissez cette\ + \ option. Si elle est activée, elle agira comme un marqueur pour les autres développeurs\ + \ afin d'éviter des chaînes d'interaction sans fin avec d'autres robots et d'ajuster\ + \ les systèmes internes de Misskey pour traiter ce compte comme un robot." flagAsCat: "Ce compte est un chat" flagAsCatDescription: "Activer l'option \" Je suis un chat \" pour ce compte." flagShowTimelineReplies: "Afficher les réponses dans le fil" -autoAcceptFollowed: "Accepter automatiquement les demandes d’abonnement venant d’utilisateur·rice·s que vous suivez" +autoAcceptFollowed: "Accepter automatiquement les demandes d’abonnement venant d’utilisateur·rice·s\ + \ que vous suivez" addAccount: "Ajouter un compte" loginFailed: "Échec de la connexion" showOnRemote: "Voir sur l’instance distante" @@ -155,7 +175,12 @@ searchWith: "Recherche : {q}" youHaveNoLists: "Vous n’avez aucune liste" followConfirm: "Êtes-vous sûr·e de vouloir suivre {name} ?" proxyAccount: "Compte proxy" -proxyAccountDescription: "Un compte proxy se comporte, dans certaines conditions, comme un·e abonné·e distant·e pour les utilisateurs d'autres instances. Par exemple, quand un·e utilisateur·rice ajoute un·e utilisateur·rice distant·e à une liste, ses notes ne seront pas visibles sur l'instance si personne ne suit cet·te utilisateur·rice. Le compte proxy va donc suivre cet·te utilisateur·rice pour que ses notes soient acheminées." +proxyAccountDescription: "Un compte proxy se comporte, dans certaines conditions,\ + \ comme un·e abonné·e distant·e pour les utilisateurs d'autres instances. Par exemple,\ + \ quand un·e utilisateur·rice ajoute un·e utilisateur·rice distant·e à une liste,\ + \ ses notes ne seront pas visibles sur l'instance si personne ne suit cet·te utilisateur·rice.\ + \ Le compte proxy va donc suivre cet·te utilisateur·rice pour que ses notes soient\ + \ acheminées." host: "Serveur distant" selectUser: "Sélectionner un·e utilisateur·rice" recipient: "Destinataire" @@ -186,11 +211,14 @@ instanceInfo: "Informations sur l’instance" statistics: "Statistiques" clearQueue: "Vider la file d’attente" clearQueueConfirmTitle: "Êtes-vous sûr·e de vouloir vider la file d’attente ?" -clearQueueConfirmText: "Les notes non distribuées ne seront pas délivrées. Normalement, vous n'avez pas besoin d'effectuer cette opération." +clearQueueConfirmText: "Les notes non distribuées ne seront pas délivrées. Normalement,\ + \ vous n'avez pas besoin d'effectuer cette opération." clearCachedFiles: "Vider le cache" -clearCachedFilesConfirm: "Êtes-vous sûr·e de vouloir vider tout le cache de fichiers distants ?" +clearCachedFilesConfirm: "Êtes-vous sûr·e de vouloir vider tout le cache de fichiers\ + \ distants ?" blockedInstances: "Instances bloquées" -blockedInstancesDescription: "Listez les instances que vous désirez bloquer, une par ligne. Ces instances ne seront plus en capacité d'interagir avec votre instance." +blockedInstancesDescription: "Listez les instances que vous désirez bloquer, une par\ + \ ligne. Ces instances ne seront plus en capacité d'interagir avec votre instance." muteAndBlock: "Masqué·e·s / Bloqué·e·s" mutedUsers: "Utilisateur·rice·s en sourdine" blockedUsers: "Utilisateur·rice·s bloqué·e·s" @@ -243,7 +271,8 @@ fromUrl: "Depuis une URL" uploadFromUrl: "Téléverser via une URL" uploadFromUrlDescription: "URL du fichier que vous souhaitez téléverser" uploadFromUrlRequested: "Téléversement demandé" -uploadFromUrlMayTakeTime: "Le téléversement de votre fichier peut prendre un certain temps." +uploadFromUrlMayTakeTime: "Le téléversement de votre fichier peut prendre un certain\ + \ temps." explore: "Découvrir" messageRead: "Lu" noMoreHistory: "Il n’y a plus d’historique" @@ -253,7 +282,8 @@ agreeTo: "J’accepte {0}" tos: "les conditions d’utilisation" start: "Commencer" home: "Principal" -remoteUserCaution: "Les informations de ce compte risqueraient d’être incomplètes du fait que l’utilisateur·rice provient d’une instance distante." +remoteUserCaution: "Les informations de ce compte risqueraient d’être incomplètes\ + \ du fait que l’utilisateur·rice provient d’une instance distante." activity: "Activité" images: "Images" birthday: "Date de naissance" @@ -286,7 +316,8 @@ unableToDelete: "Suppression impossible" inputNewFileName: "Entrez un nouveau nom de fichier" inputNewDescription: "Veuillez entrer une nouvelle description" inputNewFolderName: "Entrez un nouveau nom de dossier" -circularReferenceFolder: "Le dossier de destination est un sous-dossier du dossier que vous souhaitez déplacer." +circularReferenceFolder: "Le dossier de destination est un sous-dossier du dossier\ + \ que vous souhaitez déplacer." hasChildFilesOrFolders: "Impossible de supprimer ce dossier car il n'est pas vide." copyUrl: "Copier l’URL" rename: "Renommer" @@ -320,7 +351,8 @@ connectService: "Connexion" disconnectService: "Déconnexion" enableLocalTimeline: "Activer le fil local" enableGlobalTimeline: "Activer le fil global" -disablingTimelinesInfo: "Même si vous désactivez ces fils, les administrateur·rice·s et les modérateur·rice·s pourront toujours y accéder." +disablingTimelinesInfo: "Même si vous désactivez ces fils, les administrateur·rice·s\ + \ et les modérateur·rice·s pourront toujours y accéder." registration: "S’inscrire" enableRegistration: "Autoriser les nouvelles inscriptions" invite: "Inviter" @@ -332,9 +364,11 @@ bannerUrl: "URL de l’image de la bannière" backgroundImageUrl: "URL de l'image d'arrière-plan" basicInfo: "Informations basiques" pinnedUsers: "Utilisateur·rice épinglé·e" -pinnedUsersDescription: "Listez les utilisateur·rice·s que vous souhaitez voir épinglé·e·s sur la page \"Découvrir\", un·e par ligne." +pinnedUsersDescription: "Listez les utilisateur·rice·s que vous souhaitez voir épinglé·e·s\ + \ sur la page \"Découvrir\", un·e par ligne." pinnedPages: "Pages épinglées" -pinnedPagesDescription: "Inscrivez le chemin des pages que vous souhaitez épingler en haut de la page de l'instance. Séparez les pages d'un retour à la ligne." +pinnedPagesDescription: "Inscrivez le chemin des pages que vous souhaitez épingler\ + \ en haut de la page de l'instance. Séparez les pages d'un retour à la ligne." pinnedClipId: "Identifiant du clip épinglé" pinnedNotes: "Note épinglée" hcaptcha: "hCaptcha" @@ -345,14 +379,17 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "Activer reCAPTCHA" recaptchaSiteKey: "Clé du site" recaptchaSecretKey: "Clé secrète" -avoidMultiCaptchaConfirm: "L’utilisation de plusieurs Captchas peut provoquer des interférences. Souhaitez-vous désactiver l’autre Captcha ? Vous pouvez laisser plusieurs Captcha activés en appuyant sur Annuler." +avoidMultiCaptchaConfirm: "L’utilisation de plusieurs Captchas peut provoquer des\ + \ interférences. Souhaitez-vous désactiver l’autre Captcha ? Vous pouvez laisser\ + \ plusieurs Captcha activés en appuyant sur Annuler." antennas: "Antennes" manageAntennas: "Gestion des antennes" name: "Nom" antennaSource: "Source de l’antenne" antennaKeywords: "Mots clés à recevoir" antennaExcludeKeywords: "Mots clés à exclure" -antennaKeywordsDescription: "Séparer avec des espaces pour la condition AND. Séparer avec un saut de ligne pour une condition OR." +antennaKeywordsDescription: "Séparer avec des espaces pour la condition AND. Séparer\ + \ avec un saut de ligne pour une condition OR." notifyAntenna: "Je souhaite recevoir les notifications des nouvelles notes" withFileAntenna: "Notes ayant des attachements uniquement" enableServiceworker: "Activer ServiceWorker" @@ -363,9 +400,11 @@ connectedTo: "Vous êtes connectés aux services suivants" notesAndReplies: "Notes et Réponses" withFiles: "Avec fichiers joints" silence: "Mettre en sourdine" -silenceConfirm: "Êtes-vous sûr·e de vouloir mettre l’utilisateur·rice en sourdine ?" +silenceConfirm: "Êtes-vous sûr·e de vouloir mettre l’utilisateur·rice en sourdine\ + \ ?" unsilence: "Annuler la sourdine" -unsilenceConfirm: "Êtes-vous sûr·e de vouloir annuler la mise en sourdine de cet·te utilisateur·rice ?" +unsilenceConfirm: "Êtes-vous sûr·e de vouloir annuler la mise en sourdine de cet·te\ + \ utilisateur·rice ?" popularUsers: "Utilisateur·rice·s populaires" recentlyUpdatedUsers: "Utilisateur·rice·s actif·ve·s récemment" recentlyRegisteredUsers: "Utilisateur·rice·s récemment inscrit·e·s" @@ -430,7 +469,8 @@ invitationCode: "Code d’invitation" checking: "Vérification en cours..." available: "Disponible" unavailable: "Non disponible" -usernameInvalidFormat: "Le nom d'utilisateur peut contenir uniquement des lettres (minuscules et/ou majuscules), des chiffres et des _" +usernameInvalidFormat: "Le nom d'utilisateur peut contenir uniquement des lettres\ + \ (minuscules et/ou majuscules), des chiffres et des _" tooShort: "Trop court" tooLong: "Trop long" weakPassword: "Mot de passe faible" @@ -439,7 +479,8 @@ strongPassword: "Mot de passe fort" passwordMatched: "Les mots de passe correspondent" passwordNotMatched: "Les mots de passe ne correspondent pas" signinWith: "Se connecter avec {x}" -signinFailed: "Échec d’authentification. Veuillez vérifier que votre nom d’utilisateur et mot de passe sont corrects." +signinFailed: "Échec d’authentification. Veuillez vérifier que votre nom d’utilisateur\ + \ et mot de passe sont corrects." tapSecurityKey: "Appuyez sur votre clé de sécurité" or: "OU" language: "Langue" @@ -448,7 +489,8 @@ groupInvited: "Invité au groupe" aboutX: "À propos de {x}" useOsNativeEmojis: "Utiliser les émojis natifs du système" youHaveNoGroups: "Vous n’avez aucun groupe" -joinOrCreateGroup: "Vous pouvez être invité·e à rejoindre des groupes existants ou créer votre propre nouveau groupe." +joinOrCreateGroup: "Vous pouvez être invité·e à rejoindre des groupes existants ou\ + \ créer votre propre nouveau groupe." noHistory: "Pas d'historique" signinHistory: "Historique de connexion" disableAnimatedMfm: "Désactiver MFM ayant des animations" @@ -479,19 +521,29 @@ showFeaturedNotesInTimeline: "Afficher les notes des Tendances dans le fil d'act objectStorage: "Stockage d'objets" useObjectStorage: "Utiliser le stockage d'objets" objectStorageBaseUrl: "Base URL" -objectStorageBaseUrlDesc: "Préfixe d’URL utilisé pour construire l’URL vers le référencement d’objet (média). Spécifiez son URL si vous utilisez un CDN ou un proxy, sinon spécifiez l’adresse accessible au public selon le guide de service que vous allez utiliser. P.ex. 'https://.s3.amazonaws.com' pour AWS S3 et 'https://storage.googleapis.com/' pour GCS." +objectStorageBaseUrlDesc: "Préfixe d’URL utilisé pour construire l’URL vers le référencement\ + \ d’objet (média). Spécifiez son URL si vous utilisez un CDN ou un proxy, sinon\ + \ spécifiez l’adresse accessible au public selon le guide de service que vous allez\ + \ utiliser. P.ex. 'https://.s3.amazonaws.com' pour AWS S3 et 'https://storage.googleapis.com/'\ + \ pour GCS." objectStorageBucket: "Bucket" -objectStorageBucketDesc: "Veuillez spécifier le nom du compartiment utilisé sur le service configuré." +objectStorageBucketDesc: "Veuillez spécifier le nom du compartiment utilisé sur le\ + \ service configuré." objectStoragePrefix: "Prefix" objectStoragePrefixDesc: "Les fichiers seront stockés sous le répertoire de ce préfixe." objectStorageEndpoint: "Endpoint" -objectStorageEndpointDesc: "Laissez ce champ vide si vous utilisez AWS S3, sinon spécifiez le point de terminaison comme '' ou ': ' selon le guide de service que vous allez utiliser." +objectStorageEndpointDesc: "Laissez ce champ vide si vous utilisez AWS S3, sinon spécifiez\ + \ le point de terminaison comme '' ou ': ' selon le guide de service\ + \ que vous allez utiliser." objectStorageRegion: "Région" -objectStorageRegionDesc: "Spécifiez une région comme 'xx-east-1'. Si votre service ne fait pas de distinction entre les régions, laissez-le vide ou remplissez 'us-east-1'." +objectStorageRegionDesc: "Spécifiez une région comme 'xx-east-1'. Si votre service\ + \ ne fait pas de distinction entre les régions, laissez-le vide ou remplissez 'us-east-1'." objectStorageUseSSL: "Utiliser SSL" -objectStorageUseSSLDesc: "Désactivez cette option si vous n'utilisez pas HTTPS pour la connexion API" +objectStorageUseSSLDesc: "Désactivez cette option si vous n'utilisez pas HTTPS pour\ + \ la connexion API" objectStorageUseProxy: "Se connecter via proxy" -objectStorageUseProxyDesc: "Désactivez cette option si vous n'utilisez pas de proxy pour la connexion API" +objectStorageUseProxyDesc: "Désactivez cette option si vous n'utilisez pas de proxy\ + \ pour la connexion API" objectStorageSetPublicRead: "Régler sur « public » lors de l'envoi" serverLogs: "Journal du serveur" deleteAll: "Supprimer tout" @@ -519,7 +571,9 @@ sort: "Trier" ascendingOrder: "Ascendant" descendingOrder: "Descendant" scratchpad: "ScratchPad" -scratchpadDescription: "ScratchPad fournit un environnement expérimental pour AiScript. Vous pouvez vérifier la rédaction de votre code, sa bonne exécution et le résultat de son interaction avec Misskey." +scratchpadDescription: "ScratchPad fournit un environnement expérimental pour AiScript.\ + \ Vous pouvez vérifier la rédaction de votre code, sa bonne exécution et le résultat\ + \ de son interaction avec Misskey." output: "Sortie" script: "Script" disablePagesScript: "Désactiver AiScript sur les Pages" @@ -527,11 +581,15 @@ updateRemoteUser: "Mettre à jour les informations de l’utilisateur·rice dist deleteAllFiles: "Supprimer tous les fichiers" deleteAllFilesConfirm: "Êtes-vous sûr·e de vouloir supprimer tous les fichiers ?" removeAllFollowing: "Retenir tous les abonnements" -removeAllFollowingDescription: "Se désabonner de tous les comptes de {host}. Veuillez lancer cette action uniquement si l’instance n’existe plus." +removeAllFollowingDescription: "Se désabonner de tous les comptes de {host}. Veuillez\ + \ lancer cette action uniquement si l’instance n’existe plus." userSuspended: "Cet·te utilisateur·rice a été suspendu·e." userSilenced: "Cette utilisateur·trice a été mis·e en sourdine." yourAccountSuspendedTitle: "Ce compte est suspendu" -yourAccountSuspendedDescription: "Ce compte est suspendu car vous avez enfreint les conditions d'utilisation de l'instance, ou pour un motif similaire. Si vous souhaitez connaître en détail les raisons de cette suspension, renseignez-vous auprès de l'administrateur·rice de votre instance. Merci de ne pas créer de nouveau compte." +yourAccountSuspendedDescription: "Ce compte est suspendu car vous avez enfreint les\ + \ conditions d'utilisation de l'instance, ou pour un motif similaire. Si vous souhaitez\ + \ connaître en détail les raisons de cette suspension, renseignez-vous auprès de\ + \ l'administrateur·rice de votre instance. Merci de ne pas créer de nouveau compte." menu: "Menu" divider: "Séparateur" addItem: "Ajouter un élément" @@ -554,7 +612,8 @@ description: "Description" describeFile: "Ajouter une description d'image" enterFileDescription: "Saisissez une description" author: "Auteur·rice" -leaveConfirm: "Vous avez des modifications non-sauvegardées. Voulez-vous les ignorer ?" +leaveConfirm: "Vous avez des modifications non-sauvegardées. Voulez-vous les ignorer\ + \ ?" manage: "Gestion" plugins: "Extensions" deck: "Deck" @@ -571,12 +630,14 @@ permission: "Autorisations" enableAll: "Tout activer" disableAll: "Tout désactiver" tokenRequested: "Autoriser l'accès au compte" -pluginTokenRequestedDescription: "Ce plugin pourra utiliser les autorisations définies ici." +pluginTokenRequestedDescription: "Ce plugin pourra utiliser les autorisations définies\ + \ ici." notificationType: "Type de notifications" edit: "Editer" emailServer: "Serveur mail" enableEmail: "Activer la distribution de courriel" -emailConfigInfo: "Utilisé pour confirmer votre adresse de courriel et la réinitialisation de votre mot de passe en cas d’oubli." +emailConfigInfo: "Utilisé pour confirmer votre adresse de courriel et la réinitialisation\ + \ de votre mot de passe en cas d’oubli." email: "E-mail " emailAddress: "Adresses e-mail" smtpConfig: "Paramètres du serveur SMTP" @@ -584,7 +645,8 @@ smtpHost: "Serveur distant" smtpPort: "Port" smtpUser: "Nom d’utilisateur·rice" smtpPass: "Mot de passe" -emptyToDisableSmtpAuth: "Laisser le nom d’utilisateur et le mot de passe vides pour désactiver la vérification SMTP" +emptyToDisableSmtpAuth: "Laisser le nom d’utilisateur et le mot de passe vides pour\ + \ désactiver la vérification SMTP" smtpSecure: "Utiliser SSL/TLS implicitement dans les connexions SMTP" smtpSecureInfo: "Désactiver cette option lorsque STARTTLS est utilisé" testEmail: "Tester la distribution de courriel" @@ -605,18 +667,24 @@ create: "Créer" notificationSetting: "Paramètres des notifications " notificationSettingDesc: "Sélectionnez le type de notification à afficher" useGlobalSetting: "Utiliser paramètre général" -useGlobalSettingDesc: "S'il est activé, les paramètres de notification de votre compte seront utilisés. S'il est désactivé, des configurations individuelles peuvent être effectuées." +useGlobalSettingDesc: "S'il est activé, les paramètres de notification de votre compte\ + \ seront utilisés. S'il est désactivé, des configurations individuelles peuvent\ + \ être effectuées." other: "Autre" regenerateLoginToken: "Régénérer le jeton de connexion" -regenerateLoginTokenDescription: "Générer un nouveau jeton d'authentification. Cette opération ne devrait pas être nécessaire ; lors de la génération d'un nouveau jeton, tous les appareils seront déconnectés. " -setMultipleBySeparatingWithSpace: "Vous pouvez en définir plusieurs, en les séparant par des espaces." +regenerateLoginTokenDescription: "Générer un nouveau jeton d'authentification. Cette\ + \ opération ne devrait pas être nécessaire ; lors de la génération d'un nouveau\ + \ jeton, tous les appareils seront déconnectés. " +setMultipleBySeparatingWithSpace: "Vous pouvez en définir plusieurs, en les séparant\ + \ par des espaces." fileIdOrUrl: "ID du fichier ou URL" behavior: "Comportement" sample: "Exemple" abuseReports: "Signalements" reportAbuse: "Signaler" reportAbuseOf: "Signaler {name}" -fillAbuseReportDescription: "Veuillez expliquer les raisons du signalement. S'il s'agit d'une note précise, veuillez en donner le lien." +fillAbuseReportDescription: "Veuillez expliquer les raisons du signalement. S'il s'agit\ + \ d'une note précise, veuillez en donner le lien." abuseReported: "Le rapport est envoyé. Merci." reporter: "Signalé par" reporteeOrigin: "Origine du signalement" @@ -627,7 +695,8 @@ abuseMarkAsResolved: "Marquer le signalement comme résolu" openInNewTab: "Ouvrir dans un nouvel onglet" openInSideView: "Ouvrir en vue latérale" defaultNavigationBehaviour: "Navigation par défaut" -editTheseSettingsMayBreakAccount: "La modification de ces paramètres peut endommager votre compte." +editTheseSettingsMayBreakAccount: "La modification de ces paramètres peut endommager\ + \ votre compte." instanceTicker: "Nom de l'instance d'origine des notes" waitingFor: "En attente de {x}" random: "Aléatoire" @@ -639,7 +708,8 @@ createNew: "Créer nouveau" optional: "Facultatif" createNewClip: "Créer un nouveau clip" public: "Public" -i18nInfo: "Calckey est traduit dans différentes langues par des bénévoles. Vous pouvez contribuer à {link}." +i18nInfo: "Calckey est traduit dans différentes langues par des bénévoles. Vous pouvez\ + \ contribuer à {link}." manageAccessTokens: "Gérer les jetons d'accès" accountInfo: " Informations du compte " notesCount: "Nombre de notes" @@ -658,12 +728,16 @@ no: "Non" driveFilesCount: "Nombre de fichiers dans le Drive" driveUsage: "Utilisation du Drive" noCrawle: "Refuser l'indexation par les robots" -noCrawleDescription: "Demandez aux moteurs de recherche de ne pas indexer votre page de profil, vos notes, vos pages, etc." -lockedAccountInfo: "À moins que vous ne définissiez la visibilité de votre note sur \"Abonné-e-s\", vos notes sont visibles par tous, même si vous exigez que les demandes d'abonnement soient approuvées manuellement." +noCrawleDescription: "Demandez aux moteurs de recherche de ne pas indexer votre page\ + \ de profil, vos notes, vos pages, etc." +lockedAccountInfo: "À moins que vous ne définissiez la visibilité de votre note sur\ + \ \"Abonné-e-s\", vos notes sont visibles par tous, même si vous exigez que les\ + \ demandes d'abonnement soient approuvées manuellement." alwaysMarkSensitive: "Marquer les médias comme contenu sensible par défaut" loadRawImages: "Affichage complet des images jointes au lieu des vignettes" disableShowingAnimatedImages: "Désactiver l'animation des images" -verificationEmailSent: "Un e-mail de vérification a été envoyé. Veuillez accéder au lien pour compléter la vérification." +verificationEmailSent: "Un e-mail de vérification a été envoyé. Veuillez accéder au\ + \ lien pour compléter la vérification." notSet: "Non défini" emailVerified: "Votre adresse e-mail a été vérifiée." noteFavoritesCount: "Nombre de notes dans les favoris" @@ -675,14 +749,16 @@ clips: "Clips" experimentalFeatures: "Fonctionnalités expérimentales" developer: "Développeur" makeExplorable: "Rendre le compte visible sur la page \"Découvrir\"." -makeExplorableDescription: "Si vous désactivez cette option, votre compte n'apparaîtra pas sur la page \"Découvrir\"." +makeExplorableDescription: "Si vous désactivez cette option, votre compte n'apparaîtra\ + \ pas sur la page \"Découvrir\"." showGapBetweenNotesInTimeline: "Afficher un écart entre les notes sur la Timeline" duplicate: "Duliquer" left: "Gauche" center: "Centrer" wide: "Large" narrow: "Condensé" -reloadToApplySetting: "Vos paramètres seront appliqués lorsque vous rechargerez la page. Souhaitez-vous recharger ?" +reloadToApplySetting: "Vos paramètres seront appliqués lorsque vous rechargerez la\ + \ page. Souhaitez-vous recharger ?" needReloadToApply: "Ce paramètre s'appliquera après un rechargement." showTitlebar: "Afficher la barre de titre" clearCache: "Vider le cache" @@ -690,7 +766,11 @@ onlineUsersCount: "{n} utilisateur(s) en ligne" nUsers: "{n} utilisateur·rice·s" nNotes: "{n} Notes" sendErrorReports: "Envoyer les rapports d’erreur" -sendErrorReportsDescription: "Si vous activez l'envoi des rapports d'erreur, vous contribuerez à améliorer la qualité de Misskey grâce au partage d'informations détaillées sur les erreurs lorsqu'un problème survient.\nCela inclut des informations telles que la version de votre système d'exploitation, le type de navigateur que vous utilisez, votre historique d'activité, etc." +sendErrorReportsDescription: "Si vous activez l'envoi des rapports d'erreur, vous\ + \ contribuerez à améliorer la qualité de Misskey grâce au partage d'informations\ + \ détaillées sur les erreurs lorsqu'un problème survient.\nCela inclut des informations\ + \ telles que la version de votre système d'exploitation, le type de navigateur que\ + \ vous utilisez, votre historique d'activité, etc." myTheme: "Mes thèmes" backgroundColor: "Arrière-plan" accentColor: "Accentuation" @@ -729,14 +809,17 @@ unlikeConfirm: "Êtes-vous sûr·e de ne plus vouloir aimer cette publication ?" fullView: "Plein écran" quitFullView: "Quitter le plein écran" addDescription: "Ajouter une description" -userPagePinTip: "Vous pouvez afficher des notes ici en sélectionnant l'option « Épingler au profil » dans le menu de chaque note." -notSpecifiedMentionWarning: "Vous avez mentionné des utilisateur·rice·s qui ne font pas partie de la liste des destinataires" +userPagePinTip: "Vous pouvez afficher des notes ici en sélectionnant l'option « Épingler\ + \ au profil » dans le menu de chaque note." +notSpecifiedMentionWarning: "Vous avez mentionné des utilisateur·rice·s qui ne font\ + \ pas partie de la liste des destinataires" info: "Informations" userInfo: "Informations sur l'utilisateur" unknown: "Inconnu" onlineStatus: "Statut" hideOnlineStatus: "Se rendre invisible" -hideOnlineStatusDescription: "Rendre votre statut invisible peut diminuer les performances de certaines fonctionnalités, telles que la Recherche." +hideOnlineStatusDescription: "Rendre votre statut invisible peut diminuer les performances\ + \ de certaines fonctionnalités, telles que la Recherche." online: "En ligne" active: "Actif·ve" offline: "Hors ligne" @@ -771,7 +854,9 @@ emailNotConfiguredWarning: "Vous n'avez pas configuré d'adresse e-mail." ratio: "Ratio" previewNoteText: "Voir l'aperçu" customCss: "CSS personnalisé" -customCssWarn: "Utilisez cette fonctionnalité uniquement si vous savez exactement ce que vous faites. Une configuration inadaptée peut empêcher le client de s'exécuter normalement." +customCssWarn: "Utilisez cette fonctionnalité uniquement si vous savez exactement\ + \ ce que vous faites. Une configuration inadaptée peut empêcher le client de s'exécuter\ + \ normalement." global: "Global" squareAvatars: "Avatars carrés" sent: "Envoyer" @@ -786,7 +871,10 @@ whatIsNew: "Voir les derniers changements" translate: "Traduire" translatedFrom: "Traduit depuis {x}" accountDeletionInProgress: "La suppression de votre compte est en cours" -usernameInfo: "C'est un nom qui identifie votre compte sur l'instance de manière unique. Vous pouvez utiliser des lettres de l'alphabet (minuscules et majuscules), des chiffres (de 0 à 9), ou bien le tiret « _ ». Vous ne pourrez pas modifier votre nom d'utilisateur·rice par la suite." +usernameInfo: "C'est un nom qui identifie votre compte sur l'instance de manière unique.\ + \ Vous pouvez utiliser des lettres de l'alphabet (minuscules et majuscules), des\ + \ chiffres (de 0 à 9), ou bien le tiret « _ ». Vous ne pourrez pas modifier votre\ + \ nom d'utilisateur·rice par la suite." aiChanMode: "Mode Ai" keepCw: "Garder le CW" pubSub: "Comptes Pub/Sub" @@ -802,12 +890,14 @@ filter: "Filtre" controlPanel: "Panneau de contrôle" manageAccounts: "Gérer les comptes" makeReactionsPublic: "Rendre les réactions publiques" -makeReactionsPublicDescription: "Ceci rendra la liste de toutes vos réactions données publique." +makeReactionsPublicDescription: "Ceci rendra la liste de toutes vos réactions données\ + \ publique." classic: "Classique" muteThread: "Masquer cette discussion" unmuteThread: "Ne plus masquer le fil" ffVisibility: "Visibilité des abonnés/abonnements" -ffVisibilityDescription: "Permet de configurer qui peut voir les personnes que tu suis et les personnes qui te suivent." +ffVisibilityDescription: "Permet de configurer qui peut voir les personnes que tu\ + \ suis et les personnes qui te suivent." continueThread: "Afficher la suite du fil" deleteAccountConfirm: "Votre compte sera supprimé. Êtes vous certain ?" incorrectPassword: "Le mot de passe est incorrect." @@ -815,9 +905,11 @@ voteConfirm: "Confirmez-vous votre vote pour « {choice} » ?" hide: "Masquer" leaveGroup: "Quitter le groupe" leaveGroupConfirm: "Êtes vous sûr de vouloir quitter \"{name}\" ?" -useDrawerReactionPickerForMobile: "Afficher le sélecteur de réactions en tant que panneau sur mobile" +useDrawerReactionPickerForMobile: "Afficher le sélecteur de réactions en tant que\ + \ panneau sur mobile" welcomeBackWithName: "Heureux de vous revoir, {name}" -clickToFinishEmailVerification: "Veuillez cliquer sur [{ok}] afin de compléter la vérification par courriel." +clickToFinishEmailVerification: "Veuillez cliquer sur [{ok}] afin de compléter la\ + \ vérification par courriel." overridedDeviceKind: "Type d’appareil" smartphone: "Smartphone" tablet: "Tablette" @@ -857,11 +949,16 @@ _ffVisibility: _signup: almostThere: "Bientôt fini" emailAddressInfo: "Insérez votre adresse e-mail." - emailSent: "Un courriel de confirmation vient d'être envoyé à l'adresse que vous avez renseignée ({email}). Cliquez sur le lien contenu dans le message pour terminer la création de votre compte." + emailSent: "Un courriel de confirmation vient d'être envoyé à l'adresse que vous\ + \ avez renseignée ({email}). Cliquez sur le lien contenu dans le message pour\ + \ terminer la création de votre compte." _accountDelete: accountDelete: "Supprimer le compte" - mayTakeTime: "La suppression de compte nécessitant beaucoup de ressources, l'exécution du processus peut prendre du temps, en fonction de la quantité de contenus que vous avez créés et du nombre de fichiers que vous avez téléversés." - sendEmail: "Une fois la suppression de votre compte effectuée, un courriel sera envoyé à l'adresse que vous aviez enregistrée." + mayTakeTime: "La suppression de compte nécessitant beaucoup de ressources, l'exécution\ + \ du processus peut prendre du temps, en fonction de la quantité de contenus que\ + \ vous avez créés et du nombre de fichiers que vous avez téléversés." + sendEmail: "Une fois la suppression de votre compte effectuée, un courriel sera\ + \ envoyé à l'adresse que vous aviez enregistrée." requestAccountDelete: "Demander la suppression de votre compte" started: "La procédure de suppression a commencé." inProgress: "Suppression en cours" @@ -869,9 +966,14 @@ _ad: back: "Retour" reduceFrequencyOfThisAd: "Voir cette publicité moins souvent" _forgotPassword: - enterEmail: "Entrez ici l'adresse e-mail que vous avez enregistrée pour votre compte. Un lien vous permettant de réinitialiser votre mot de passe sera envoyé à cette adresse." - ifNoEmail: "Si vous n'avez pas enregistré d'adresse e-mail, merci de contacter l'administrateur·rice de votre instance." - contactAdmin: "Cette instance ne permettant pas l'utilisation d'adresses e-mail, prenez contact avec l'administrateur·rice pour procéder à la réinitialisation de votre mot de passe." + enterEmail: "Entrez ici l'adresse e-mail que vous avez enregistrée pour votre compte.\ + \ Un lien vous permettant de réinitialiser votre mot de passe sera envoyé à cette\ + \ adresse." + ifNoEmail: "Si vous n'avez pas enregistré d'adresse e-mail, merci de contacter l'administrateur·rice\ + \ de votre instance." + contactAdmin: "Cette instance ne permettant pas l'utilisation d'adresses e-mail,\ + \ prenez contact avec l'administrateur·rice pour procéder à la réinitialisation\ + \ de votre mot de passe." _gallery: my: "Mes publications" liked: " Publications que j'ai aimées" @@ -899,7 +1001,8 @@ _aboutMisskey: source: "Code source" translation: "Traduire Misskey" donate: "Soutenir Misskey" - morePatrons: "Nous apprécions vraiment le soutien de nombreuses autres personnes non mentionnées ici. Merci à toutes et à tous ! 🥰" + morePatrons: "Nous apprécions vraiment le soutien de nombreuses autres personnes\ + \ non mentionnées ici. Merci à toutes et à tous ! \U0001F970" patrons: "Contributeurs" _nsfw: respect: "Cacher les médias marqués comme contenu sensible" @@ -907,18 +1010,22 @@ _nsfw: force: "Cacher tous les médias" _mfm: cheatSheet: "Antisèche MFM" - intro: "MFM est un langage Markdown spécifique utilisable ici et là dans Misskey. Vous pouvez vérifier ici les structures utilisables avec MFM." + intro: "MFM est un langage Markdown spécifique utilisable ici et là dans Misskey.\ + \ Vous pouvez vérifier ici les structures utilisables avec MFM." dummy: "La Fédiverse s'agrandit avec Misskey" mention: "Mentionner" - mentionDescription: "Vous pouvez afficher un utilisateur spécifique en indiquant une arobase suivie d'un nom d'utilisateur" + mentionDescription: "Vous pouvez afficher un utilisateur spécifique en indiquant\ + \ une arobase suivie d'un nom d'utilisateur" hashtag: "Hashtags" - hashtagDescription: "Vous pouvez afficher un mot-dièse en utilisant un croisillon et du texte" + hashtagDescription: "Vous pouvez afficher un mot-dièse en utilisant un croisillon\ + \ et du texte" url: "URL" urlDescription: "L'adresse web peut être affichée." link: "Lien" linkDescription: "Une partie précise d'une phrase peut être liée à l'adresse web." bold: "Gras" - boldDescription: "Il est possible de mettre le texte en exergue en le mettant en gras." + boldDescription: "Il est possible de mettre le texte en exergue en le mettant en\ + \ gras." small: "Diminuer l'emphase" smallDescription: "Le contenu peut être affiché en petit et fin." center: "Centrer" @@ -930,7 +1037,8 @@ _mfm: inlineMath: "Formule mathématique (inline)" inlineMathDescription: "Afficher les formules mathématiques (KaTeX)." blockMath: "Formule mathématique (bloc)" - blockMathDescription: "Afficher les formules mathématiques (KaTeX) multi-lignes dans un bloc." + blockMathDescription: "Afficher les formules mathématiques (KaTeX) multi-lignes\ + \ dans un bloc." quote: "Citer" quoteDescription: "Affiche le contenu sous forme de citation." emoji: "Émojis personnalisés" @@ -960,7 +1068,8 @@ _mfm: x4: "Plus grand" x4Description: "Afficher le contenu en plus grand." blur: "Flou" - blurDescription: "Le contenu peut être flouté ; il sera visible en le survolant avec le curseur." + blurDescription: "Le contenu peut être flouté ; il sera visible en le survolant\ + \ avec le curseur." font: "Police de caractères" fontDescription: "Il est possible de choisir la police." rainbow: "Arc-en-ciel" @@ -968,6 +1077,9 @@ _mfm: sparkle: "Paillettes" sparkleDescription: "Ajoute un effet scintillant au contenu." rotate: "Pivoter" + plainDescription: Désactiver les effets de tous les MFM contenus dans cet effet + MFM. + rotateDescription: Pivoter le contenu d'un angle spécifique. _instanceTicker: none: "Cacher " remote: "Montrer pour les utilisateur·ice·s distant·e·s" @@ -976,6 +1088,7 @@ _serverDisconnectedBehavior: reload: "Rechargement automatique" dialog: "Ouvrir une boîte de dialogue pour l'avertissement" quiet: "Afficher un avertissement discret" + nothing: Ne rien faire _channel: create: "Créer un canal" edit: "Éditer le canal" @@ -993,10 +1106,14 @@ _menuDisplay: hide: "Masquer" _wordMute: muteWords: "Mots à filtrer" - muteWordsDescription: "Séparer avec des espaces pour la condition AND. Séparer avec un saut de ligne pour une condition OR." - muteWordsDescription2: "Pour utiliser des expressions régulières (regex), mettez les mots-clés entre barres obliques." + muteWordsDescription: "Séparer avec des espaces pour la condition AND. Séparer avec\ + \ un saut de ligne pour une condition OR." + muteWordsDescription2: "Pour utiliser des expressions régulières (regex), mettez\ + \ les mots-clés entre barres obliques." softDescription: "Masquez les notes de votre fil selon les paramètres que vous définissez." - hardDescription: "Empêchez votre fil de charger les notes selon les paramètres que vous définissez. Cette action est irréversible : si vous modifiez ces paramètres plus tard, les notes précédemment filtrées ne seront pas récupérées." + hardDescription: "Empêchez votre fil de charger les notes selon les paramètres que\ + \ vous définissez. Cette action est irréversible : si vous modifiez ces paramètres\ + \ plus tard, les notes précédemment filtrées ne seront pas récupérées." soft: "Doux" hard: "Strict" mutedNotes: "Notes filtrées" @@ -1004,6 +1121,9 @@ _instanceMute: instanceMuteDescription2: "Séparer avec de nouvelles lignes" title: "Masque les notes venant des instances listées." heading: "Instances à mettre en sourdine" + instanceMuteDescription: Ceci va masquer toute publication ou partage des instances + listées, incluant celles des personnes répondant à des personnes des instances + masquées. _theme: explore: "Explorer les thèmes" install: "Installer un thème" @@ -1032,8 +1152,10 @@ _theme: darken: "Sombre" lighten: "Clair" inputConstantName: "Insérez un nom de constante" - importInfo: "Vous pouvez importer un thème vers l’éditeur de thèmes en saisissant son code ici." - deleteConstantConfirm: "Êtes-vous sûr·e de vouloir supprimer la constante {const} ?" + importInfo: "Vous pouvez importer un thème vers l’éditeur de thèmes en saisissant\ + \ son code ici." + deleteConstantConfirm: "Êtes-vous sûr·e de vouloir supprimer la constante {const}\ + \ ?" keys: accent: "Accentuation" bg: "Arrière-plan" @@ -1103,35 +1225,54 @@ _time: day: "j" _tutorial: title: "Comment utiliser Calckey" - step1_1 : "Bienvenue!" - step1_2 : "On va vous installer. Vous serez opérationnel en un rien de temps" - step2_1 : "Tout d'abord, remplissez votre profil" - step2_2 : "En fournissant quelques informations sur qui vous êtes, il sera plus facile pour les autres de savoir s'ils veulent voir vos notes ou vous suivre." - step3_1 : "Maintenant il est temps de suivre des gens !" - step3_2 : "Votre page d'accueil et vos timelines sociales sont basées sur les personnes que vous suivez, alors essayez de suivre quelques comptes pour commencer.\nCliquez sur le cercle plus en haut à droite d'un profil pour le suivre." - step4_1 : "On y va." - step4_2 : "Pour votre premier post, certaines personnes aiment faire un post {introduction} ou un simple post 'Hello world'." - step5_1 : "Lignes de temps, lignes de temps partout !" - step5_2 : "Votre instance a {timelines} différentes chronologies activées !" - step5_3 : "La timeline Home {icon} est l'endroit où vous pouvez voir les publications de vos followers." - step5_4 : "La timeline locale {icon} est l'endroit où vous pouvez voir les messages de tout le monde sur cette instance." - step5_5 : "La timeline {icon} recommandée est l'endroit où vous pouvez voir les messages des instances que les administrateurs recommandent." - step5_6 : "La timeline {icon} sociale est l'endroit où vous pouvez voir les publications des amis de vos followers." - step5_7 : "La timeline globale {icon} est l'endroit où vous pouvez voir les messages de toutes les autres instances connectées." - step6_1 : "Alors quel est cet endroit ?" - step6_2 : "Eh bien, vous ne venez pas de rejoindre Calckey. Vous avez rejoint un portail vers le Fediverse, un réseau interconnecté de milliers de serveurs, appelés \"instances\"." - step6_3 : "Chaque serveur fonctionne différemment, et tous les serveurs n'utilisent pas Calckey. Cependant, celui-ci le fait ! C'est un peu délicat, mais vous aurez le coup de main en un rien de temps." - step6_4 : "Maintenant, allez-y, explorez et amusez-vous !" + step1_1: "Bienvenue!" + step1_2: "On va vous installer. Vous serez opérationnel en un rien de temps" + step2_1: "Tout d'abord, remplissez votre profil" + step2_2: "En fournissant quelques informations sur qui vous êtes, il sera plus facile\ + \ pour les autres de savoir s'ils veulent voir vos notes ou vous suivre." + step3_1: "Maintenant il est temps de suivre des gens !" + step3_2: "Votre page d'accueil et vos timelines sociales sont basées sur les personnes\ + \ que vous suivez, alors essayez de suivre quelques comptes pour commencer.\n\ + Cliquez sur le cercle plus en haut à droite d'un profil pour le suivre." + step4_1: "On y va." + step4_2: "Pour votre premier post, certaines personnes aiment faire un post {introduction}\ + \ ou un simple post 'Hello world'." + step5_1: "Lignes de temps, lignes de temps partout !" + step5_2: "Votre instance a {timelines} différentes chronologies activées !" + step5_3: "La timeline Home {icon} est l'endroit où vous pouvez voir les publications\ + \ de vos followers." + step5_4: "La timeline locale {icon} est l'endroit où vous pouvez voir les messages\ + \ de tout le monde sur cette instance." + step5_5: "La timeline {icon} recommandée est l'endroit où vous pouvez voir les messages\ + \ des instances que les administrateurs recommandent." + step5_6: "La timeline {icon} sociale est l'endroit où vous pouvez voir les publications\ + \ des amis de vos followers." + step5_7: "La timeline globale {icon} est l'endroit où vous pouvez voir les messages\ + \ de toutes les autres instances connectées." + step6_1: "Alors quel est cet endroit ?" + step6_2: "Eh bien, vous ne venez pas de rejoindre Calckey. Vous avez rejoint un\ + \ portail vers le Fediverse, un réseau interconnecté de milliers de serveurs,\ + \ appelés \"instances\"." + step6_3: "Chaque serveur fonctionne différemment, et tous les serveurs n'utilisent\ + \ pas Calckey. Cependant, celui-ci le fait ! C'est un peu délicat, mais vous aurez\ + \ le coup de main en un rien de temps." + step6_4: "Maintenant, allez-y, explorez et amusez-vous !" _2fa: alreadyRegistered: "Configuration déjà achevée." registerDevice: "Ajouter un nouvel appareil" registerKey: "Enregistrer une clef" - step1: "Tout d'abord, installez une application d'authentification, telle que {a} ou {b}, sur votre appareil." + step1: "Tout d'abord, installez une application d'authentification, telle que {a}\ + \ ou {b}, sur votre appareil." step2: "Ensuite, scannez le code QR affiché sur l’écran." - step2Url: "Vous pouvez également saisir cette URL si vous utilisez un programme de bureau :" + step2Url: "Vous pouvez également saisir cette URL si vous utilisez un programme\ + \ de bureau :" step3: "Entrez le jeton affiché sur votre application pour compléter la configuration." - step4: "À partir de maintenant, ce même jeton vous sera demandé à chacune de vos connexions." - securityKeyInfo: "Vous pouvez configurer l'authentification WebAuthN pour sécuriser davantage le processus de connexion grâce à une clé de sécurité matérielle qui prend en charge FIDO2, ou bien en configurant l'authentification par empreinte digitale ou par code PIN sur votre appareil." + step4: "À partir de maintenant, ce même jeton vous sera demandé à chacune de vos\ + \ connexions." + securityKeyInfo: "Vous pouvez configurer l'authentification WebAuthN pour sécuriser\ + \ davantage le processus de connexion grâce à une clé de sécurité matérielle qui\ + \ prend en charge FIDO2, ou bien en configurant l'authentification par empreinte\ + \ digitale ou par code PIN sur votre appareil." _permissions: "read:account": "Afficher les informations du compte" "write:account": "Mettre à jour les informations de votre compte" @@ -1167,11 +1308,13 @@ _permissions: "write:gallery-likes": "Gérer les mentions « J'aime » dans la galerie" _auth: shareAccess: "Autoriser \"{name}\" à accéder à votre compte ?" - shareAccessAsk: "Voulez-vous vraiment autoriser cette application à accéder à votre compte?" + shareAccessAsk: "Voulez-vous vraiment autoriser cette application à accéder à votre\ + \ compte?" permissionAsk: "Cette application nécessite les autorisations suivantes :" pleaseGoBack: "Veuillez retourner à l’application" callback: "Retour vers l’application" denied: "Accès refusé" + copyAsk: Veuillez coller le code d’autorisation à l'application _antennaSources: all: "Toutes les notes" homeTimeline: "Notes venant des utilisateur·rice·s auxquel·les je suis abonné" @@ -1262,7 +1405,8 @@ _profile: youCanIncludeHashtags: "Vous pouvez également inclure des hashtags." metadata: "Informations supplémentaires" metadataEdit: "Éditer les informations supplémentaires" - metadataDescription: "Vous pouvez afficher jusqu'à quatre informations supplémentaires dans votre profil." + metadataDescription: "Vous pouvez afficher jusqu'à quatre informations supplémentaires\ + \ dans votre profil." metadataLabel: "Étiquette" metadataContent: "Contenu" changeAvatar: "Changer l'image de profil" @@ -1333,7 +1477,8 @@ _pages: url: "URL de la page" summary: "Résumé de page" alignCenter: "Centrée" - hideTitleWhenPinned: "Masquer le titre de la page lorsque celle-ci est épinglée au profil" + hideTitleWhenPinned: "Masquer le titre de la page lorsque celle-ci est épinglée\ + \ au profil" font: "Police de caractères" fontSerif: "Serif" fontSansSerif: "Sans Serif" @@ -1383,7 +1528,8 @@ _pages: note: "Note intégrée" _note: id: "Identifiant de la note" - idDescription: "Pour configurer la note, vous pouvez aussi coller ici l'URL correspondante." + idDescription: "Pour configurer la note, vous pouvez aussi coller ici l'URL\ + \ correspondante." detailed: "Afficher les détails" switch: "Interrupteur" _switch: @@ -1536,7 +1682,8 @@ _pages: _dailyRannum: arg1: "Minimum" arg2: "Maximum" - dailyRandomPick: "Sélectionné au hasard dans la liste (Quotidien pour chaque utilisateur)" + dailyRandomPick: "Sélectionné au hasard dans la liste (Quotidien pour chaque\ + \ utilisateur)" _dailyRandomPick: arg1: "Listes" seedRandom: "Aléatoire (graine)" @@ -1552,7 +1699,8 @@ _pages: _seedRandomPick: arg1: "Graine" arg2: "Listes" - DRPWPM: "Sélectionné au hasard dans une liste de probabilités (Quotidien pour chaque utilisateur)" + DRPWPM: "Sélectionné au hasard dans une liste de probabilités (Quotidien pour\ + \ chaque utilisateur)" _DRPWPM: arg1: "Liste de texte" pick: "Sélectionner dans la liste" @@ -1651,3 +1799,204 @@ _deck: list: "Listes" mentions: "Mentions" direct: "Direct" +keepOriginalUploadingDescription: Enregistrer l'image originale telle quelle. Si désactivé, + une version à afficher sur le web sera générée au chargement. +manageGroups: Gérer les groupes +moderation: Modération +disableDrawer: Ne pas utiliser des menus à tiroir +preferencesBackups: Sauvegarde des préférences +confirmToUnclipAlreadyClippedNote: Ce message fait déjà partie du clip "{name}". Voudriez-vous + plutôt le supprimer du clip ? +instanceSecurity: Sécurité de l'instance +recommended: Recommandé +recentNDays: Les derniers {n} jours +recentNHours: Les dernières {n} heures +check: Vérifier +thereIsUnresolvedAbuseReportWarning: Il y a des signalements non résolus. +numberOfPageCacheDescription: Augmenter ce nombre augmentera le confort des utilisateur⋅rice⋅s + mais augmentera la charge de travail du serveur, plus de mémoire sera utilisée. +logoutConfirm: Confirmer la déconnexion ? +lastActiveDate: Dernière utilisation le +cannotUploadBecauseNoFreeSpace: Mise en ligne échouée faute de place sur le Drive. +remoteOnly: Distant seulement +showUpdates: Afficher une fenêtre en sur-impression quand Calckey se met à jour +recommendedInstances: Instances recommandées +caption: Description automatique +migration: Migration +showAdminUpdates: Indiquer qu'une nouvelle version de Calckey est disponible (admin + seulement) +replayTutorial: Relancer le tutoriel +moveTo: Migrer le compte courant vers un nouveau compte +moveFromDescription: Ceci va configurer un alias pour votre ancien compte afin que + vous puissiez migrer de cet ancien compte à l'actuel. Faites ceci AVANT de migrer + de votre ancien compte. Merci d'entrer la mention de l'ancien compte sous ce format + @personne@instance.com +_sensitiveMediaDetection: + sensitivityDescription: Réduire la sensibilité conduira à moins de mauvaises détections + (faux positifs) alors que l'augmenter mènera à moins de détection manquées (faux + négatifs). + analyzeVideosDescription: Analyser les vidéos en plus des images. Cela augmentera + légèrement la charge du serveur. + setSensitiveFlagAutomatically: Marquer comme sensible (NSFW) + sensitivity: Sensibilité de la détection + analyzeVideos: Activer l'analyse des vidéos + setSensitiveFlagAutomaticallyDescription: Les résultats de la détection interne + seront conservés même si cette option est désactivée. + description: Réduit potentiellement l'effort de la modération du serveur en reconnaissant + automatiquement les médias sensibles (NSFW) via de l'intelligence artificielle. + Cela va augmenter légèrement la charge du serveur. +_messaging: + dms: Privé + groups: Groupes +cannotUploadBecauseExceedsFileSizeLimit: Le fichier n'a pas pu être chargé car il + dépasse la taille maximum autorisée. +moveAccountDescription: Ce processus est irréversible. Soyez sûr⋅e que vous avez préparé + un alias pour ce compte sur votre nouveau compte avant de migrer. Merci d'entrer + la mention du compte formaté comme ceci @personne@instance.com +moveAccount: Déplacer le compte ! +seperateRenoteQuote: Séparer les renotes et les boutons de citation +failedToFetchAccountInformation: Impossible de récupérer les informations de compte +noEmailServerWarning: Serveur mail non configuré. +deleteAccount: Supprimer le compte +document: Documentation +numberOfPageCache: Nombre de pages mise en cache +fast: Rapide +failedToUpload: Mise en ligne échouée +enableAutoSensitiveDescription: Permet la détection automatique des médias sensibles + (NSFW) via une intelligence artificielle, quand c'est possible. Même si cette option + est désactivée, elle peut être enclenchée au niveau de l'instance. +activeEmailValidationDescription: Active une vérification plus poussée des adresses + e-mail, ce qui inclut de vérifier la présence d’e-mail jetables et s'il est possible + de communiquer avec ces adresses. Si désactivé, seul le format de l’e-mail est vérifié. +adminCustomCssWarn: Ce paramètre ne devrait être utilisé que si vous savez ce qu'il + fait. Entrer des valeurs impropres pourraient empêcher les clients de TOUT LE MONDE + de fonctionner. Assurez-vous que votre CSS fonctionne correctement en l'essayant + dans vos paramètres utilisateur. +swipeOnDesktop: Permettre le style de glissement de fenêtre de mobile sur PC +moveFromLabel: 'Compte depuis lequel vous migrez :' +migrationConfirm: "Êtes-vous absolument certain⋅e que vous voulez migrer votre compte\ + \ vers {account} ? Une fois fait, vous ne pourrez pas revenir en arrière, et vous\ + \ ne pourrez plus utiliser le compte actuel normalement à nouveau.\nAussi, assurez-vous\ + \ d'avoir configuré le compte courant comme le compte depuis lequel vous migrez." +_preferencesBackups: + updatedAt: 'Mis à jour le : {date} {time}' + cannotLoad: Le chargement a échoué + invalidFile: Format de fichier invalide + saveConfirm: Enregistrer la sauvegarde sous le nom {name} ? + deleteConfirm: Supprimer la sauvegarde {name} ? + nameAlreadyExists: Une sauvegarde nommée "{name}" existe déjà. Merci d'entrer un + autre nom. + applyConfirm: Voulez-vous vraiment appliquer la sauvegarde "{name} à cet appareil + ? Les réglages existants de cet appareil seront écrasés. + noBackups: Aucune sauvegarde n'existe. Vous pouvez sauvegarder les paramètres de + votre client sur ce serveur en utilisant "Créer une nouvelle sauvegarde". + createdAt: 'Crée le : {date} {time}' + renameConfirm: Renommer la sauvegarde "{old}" à "{new}" ? + list: Sauvegardes créées + saveNew: Faire une nouvelle sauvegarde + loadFile: Charger depuis le fichier + apply: Appliquer à l'appareil + save: Enregistrer les changements + inputName: Merci d'entrer un nom pour cette sauvegarde + cannotSave: La sauvegarde a échoué +privateMode: Mode privé +privateModeInfo: Si activé, seules les instances autorisées peuvent fédérer avec votre + instance. Toutes les publications seront masquées de la visibilité publique. +allowedInstances: Instances autorisées +driveCapOverrideLabel: Changer la capacité du drive pour cet utilisateur +driveCapOverrideCaption: Réinitialiser la capacité à la valeur par défaut en entrant + 0 ou moins. +pleaseSelect: Sélectionner une option +customMOTD: Message du jour personnalisé (Message d'écran de démarrage) +refreshInterval: 'Intervalle de mise à jour ' +type: Type +speed: Vitesse +slow: Lent +move: Déplacer +showAds: Afficher les annonces +enterSendsMessage: Appuyer sur Entrée pendant la rédaction pour envoyer le message + (sinon Ctrl+Entrée) +allowedInstancesDescription: Hôtes des instances autorisées pour la fédération, chacun + séparé par une nouvelle ligne (s'applique uniquement en mode privé). +enableAutoSensitive: Marquage automatique du contenu sensible (NSFW) +regexpErrorDescription: "Il y a eu une erreur dans l'expression régulière à la ligne\ + \ {line} de votre {tab} des mots masqués :" +forwardReportIsAnonymous: À la place de votre compte, un compte système anonyme sera + affiché comme rapporteur à l'instance distante. +noThankYou: Non merci +addInstance: Ajouter une instance +renoteMute: Mettre en silence les renotes +flagSpeakAsCat: Parler comme un chat +flagSpeakAsCatDescription: Vos messages seront nyanifiés en mode chat +hiddenTags: Hashtags cachés +hiddenTagsDescription: "Lister les hashtags (sans le #) que vous souhaitez cacher\ + \ de tendances et explorer. Les hashtags cachés sont toujours découvrables par d'autres\ + \ moyens." +antennaInstancesDescription: Lister un hôte d'instance par ligne +userSaysSomethingReason: '{name} a dit {reason}' +breakFollowConfirm: Êtes vous sur de vouloir retirer l'abonné ? +recommendedInstancesDescription: Instances recommandées séparées par une nouvelle + ligne pour apparaître dans la timeline recommandée. Ne PAS ajouter `https://`, SEULEMENT + le domaine. +sendPushNotificationReadMessage: Supprimer les notifications push une fois que les + notifications ou messages concernés ont été lus +sendPushNotificationReadMessageCaption: Une notification contenant le texte "{emptyPushNotificationMessage}" + sera affichée pendant un court instant. Cela peut augmenter la consommation de batterie + de votre appareil. +splash: Écran d’Accueil +pushNotificationNotSupported: Votre navigateur ou instance ne supporte pas les notifications + push +customMOTDDescription: Messages personnalisé pour le message du jour (sur l'écran + d’accueil), séparés par des retours à la ligne, affichés au hasard à chaque (re)chargement + de page. +customSplashIcons: Icônes de l'écran d’accueil personnalisées (urls) +customSplashIconsDescription: URLs pour les icônes personnalisées de l'écran d’accueil, + séparés par des retours à la ligne, qui seront affichées aléatoirement à chaque + (re)chargement de page. Assurez-vous que les images sont sur des URL statiques, + de préférence toutes de taille 192x192. +updateAvailable: Une mise à jour est peut-être disponible ! +accountMoved: "L'utilisateur a migré vers un nouveau compte:" +enableEmojiReactions: Activer les réactions par émojis +showEmojisInReactionNotifications: Montrer les émojis dans les notifications de réaction +renoteUnmute: Notifier les renotes +selectInstance: Choisir une instance +noInstances: Il n'y a aucune instance +showLocalPosts: 'Montrer les notes locales dans :' +homeTimeline: Timeline d'Accueil +socialTimeline: Timeline Sociale +requireAdminForView: Vous avez besoin d'un compte d'administration pour voir cela. +isSystemAccount: Un compte créé et géré automatiquement par le système. +typeToConfirm: Entrer {x} pour confirmer +statusbar: Barre d'état +sensitiveMediaDetection: Détection des médias sensibles (NSFW) +cannotUploadBecauseInappropriate: Ce fichier n'a pas pu être mis en ligne, car il + a été détecté comme potentiellement sensible (NSFW). +beta: Beta +navbar: Barre de navigation +shuffle: Mélanger +pushNotification: Notifications push +subscribePushNotification: Activer les notifications push +unsubscribePushNotification: Désactiver les notifications push +pushNotificationAlreadySubscribed: Notifications push déjà activées +logoImageUrl: URL de l'image du logo +moveToLabel: 'Compte vers lequel vous migrez :' +moveFrom: Migrer vers ce compte depuis un ancien compte +defaultReaction: Émoji de réaction par défaut pour les notes entrantes et sortantes +license: Licence +indexPosts: Indexer les Notes +indexNotice: Indexation en cours. Cela prendra certainement du temps, veuillez ne + pas redémarrer votre serveur pour au moins une heure. +customKaTeXMacro: Macros KaTeX personnalisées +enableCustomKaTeXMacro: Activer les macros KaTeX personnalisées +noteId: ID de note +customKaTeXMacroDescription: "Définissez des macros pour écrire des expressions mathématiques\ + \ simplement ! La notation se conforme aux définitions de commandes LaTeX et s'écrit\ + \ \\newcommand{\\name}{content} ou \\newcommand{\\name}[number of arguments]{content}.\ + \ Par exemple, \\newcommand{\\add}[2]{#1 + #2} étendra \\add{3}{foo} en 3 + foo.\ + \ Les accolades entourant le nom de la macro peuvent être changés pour des parenthèses\ + \ ou des crochets. Cela affectera les types de parenthèses utilisées pour les arguments.\ + \ Une (et une seule) macro peut être définie par ligne, et vous ne pouvez pas couper\ + \ la ligne au milieu d'une définition. Les lignes invalides sont simplement ignorées.\ + \ Seulement de simples fonctions de substitution de chaines sont supportées; la\ + \ syntaxe avancée, telle que la ramification conditionnelle, ne peut pas être utilisée\ + \ ici." diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 5372c8e3d0..466212ba21 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1,20 +1,21 @@ _lang_: "日本語" - -headlineMisskey: "ノートでつながるネットワーク" -introMisskey: "ようこそ!Misskeyは、オープンソースの分散型マイクロブログサービスです。\n「ノート」を作成して、いま起こっていることを共有したり、あなたについて皆に発信しよう📡\n「リアクション」機能で、皆のノートに素早く反応を追加することもできます👍\n新しい世界を探検しよう🚀" +headlineMisskey: "ずっと無料でオープンソースの非中央集権型ソーシャルメディアプラットフォーム\U0001F680" +introMisskey: "ようこそ!Calckeyは、オープンソースの非中央集権型ソーシャルメディアプラットフォームです。\nいま起こっていることを共有したり、あなたについて皆に発信しましょう\U0001F4E1\ + \n「リアクション」機能で、皆の投稿に素早く反応を追加できます\U0001F44D\n新しい世界を探検しよう\U0001F680" monthAndDay: "{month}月 {day}日" search: "検索" notifications: "通知" username: "ユーザー名" password: "パスワード" -forgotPassword: "パスワードを忘れた" -fetchingAsApObject: "連合に照会中" +forgotPassword: "パスワードを忘れました" +fetchingAsApObject: "連合宇宙から取得中" ok: "OK" -gotIt: "わかった" +gotIt: "わかった!" cancel: "キャンセル" +noThankYou: "やめておく" enterUsername: "ユーザー名を入力" -renotedBy: "{user}がRenote" -noNotes: "ノートはありません" +renotedBy: "{user}がブースト" +noNotes: "投稿はありません" noNotifications: "通知はありません" instance: "インスタンス" settings: "設定" @@ -32,6 +33,7 @@ uploading: "アップロード中" save: "保存" users: "ユーザー" addUser: "ユーザーを追加" +addInstance: "インスタンスを追加" favorite: "お気に入り" favorites: "お気に入り" unfavorite: "お気に入り解除" @@ -44,7 +46,7 @@ copyContent: "内容をコピー" copyLink: "リンクをコピー" delete: "削除" deleteAndEdit: "削除して編集" -deleteAndEditConfirm: "このノートを削除してもう一度編集しますか?このノートへのリアクション、Renote、返信も全て削除されます。" +deleteAndEditConfirm: "この投稿を削除してもう一度編集しますか?この投稿へのリアクション、ブースト、返信は全て失われます。" addToList: "リストに追加" sendMessage: "メッセージを送信" copyUsername: "ユーザー名をコピー" @@ -64,14 +66,14 @@ import: "インポート" export: "エクスポート" files: "ファイル" download: "ダウンロード" -driveFileDeleteConfirm: "ファイル「{name}」を削除しますか?このファイルを添付したノートも消えます。" -unfollowConfirm: "{name}のフォローを解除しますか?" +driveFileDeleteConfirm: "ファイル「{name}」を削除しますか?このファイルを添付した投稿も消えます。" +unfollowConfirm: "{name}さんのフォローを解除しますか?" exportRequested: "エクスポートをリクエストしました。これには時間がかかる場合があります。エクスポートが終わると、「ドライブ」に追加されます。" importRequested: "インポートをリクエストしました。これには時間がかかる場合があります。" lists: "リスト" noLists: "リストはありません" -note: "ノート" -notes: "ノート" +note: "投稿" +notes: "投稿" following: "フォロー" followers: "フォロワー" followsYou: "フォローされています" @@ -94,19 +96,21 @@ followRequests: "フォロー申請" unfollow: "フォロー解除" followRequestPending: "フォロー許可待ち" enterEmoji: "絵文字を入力" -renote: "Renote" -unrenote: "Renote解除" -renoted: "Renoteしました。" -cantRenote: "この投稿はRenoteできません。" -cantReRenote: "RenoteをRenoteすることはできません。" +renote: "ブースト" +unrenote: "ブースト解除" +renoted: "ブーストしました。" +cantRenote: "この投稿はブーストできません。" +cantReRenote: "ブーストをブーストすることはできません。" quote: "引用" -pinnedNote: "ピン留めされたノート" +pinnedNote: "ピン留めされた投稿" pinned: "ピン留め" you: "あなた" clickToShow: "クリックして表示" sensitive: "閲覧注意" add: "追加" reaction: "リアクション" +enableEmojiReactions: "絵文字リアクションを有効にする" +showEmojisInReactionNotifications: "自分の投稿に対するリアクションの通知で絵文字を表示する" reactionSetting: "ピッカーに表示するリアクション" reactionSettingDescription2: "ドラッグして並び替え、クリックして削除、+を押して追加します。" rememberNoteVisibility: "公開範囲を記憶する" @@ -116,12 +120,14 @@ unmarkAsSensitive: "閲覧注意を解除する" enterFileName: "ファイル名を入力" mute: "ミュート" unmute: "ミュート解除" +renoteMute: "ブーストをミュート" +renoteUnmute: "ブーストのミュートを解除" block: "ブロック" unblock: "ブロック解除" suspend: "凍結" unsuspend: "解凍" blockConfirm: "ブロックしますか?" -unblockConfirm: "ブロック解除しますか?" +unblockConfirm: "ブロックを解除しますか?" suspendConfirm: "凍結しますか?" unsuspendConfirm: "解凍しますか?" selectList: "リストを選択" @@ -137,14 +143,16 @@ emojiUrl: "絵文字画像URL" addEmoji: "絵文字を追加" settingGuide: "おすすめ設定" cacheRemoteFiles: "リモートのファイルをキャッシュする" -cacheRemoteFilesDescription: "この設定を無効にすると、リモートファイルをキャッシュせず直リンクするようになります。サーバーのストレージを節約できますが、サムネイルが生成されないので通信量が増加します。" +cacheRemoteFilesDescription: "この設定を無効にすると、リモートファイルをキャッシュせず直リンクします。サーバーのストレージを節約できますが、サムネイルが生成されないので通信量が増加します。" flagAsBot: "Botとして設定" -flagAsBotDescription: "このアカウントがプログラムによって運用される場合は、このフラグをオンにします。オンにすると、反応の連鎖を防ぐためのフラグとして他の開発者に役立ったり、Misskeyのシステム上での扱いがBotに合ったものになります。" -flagAsCat: "Catとして設定" -flagAsCatDescription: "このアカウントが猫であることを示す場合は、このフラグをオンにします。" -flagShowTimelineReplies: "タイムラインにノートへの返信を表示する" -flagShowTimelineRepliesDescription: "オンにすると、タイムラインにユーザーのノート以外にもそのユーザーの他のノートへの返信を表示します。" -autoAcceptFollowed: "フォロー中ユーザーからのフォロリクを自動承認" +flagAsBotDescription: "このアカウントがBotである場合は、この設定をオンにします。オンにすると、反応の連鎖を防ぐためのフラグとして他の開発者に役立ったり、Calckeyのシステム上での扱いがBotに合ったものになります。" +flagAsCat: "あなたは…猫?\U0001F63A" +flagAsCatDescription: "このアカウントが猫であることを示す猫モードを有効にするには、このフラグをオンにします。" +flagSpeakAsCat: "猫語で話す" +flagSpeakAsCatDescription: "猫モードが有効の場合にオンにすると、あなたの投稿の「な」を「にゃ」に変換します。" +flagShowTimelineReplies: "タイムラインに投稿の返信を表示する" +flagShowTimelineRepliesDescription: "オンにすると、タイムラインにユーザーの他の投稿への返信も表示されます。" +autoAcceptFollowed: "フォローしているユーザーからのフォロー申請を自動承認" addAccount: "アカウントを追加" loginFailed: "ログインに失敗しました" showOnRemote: "リモートで表示" @@ -160,6 +168,7 @@ proxyAccount: "プロキシアカウント" proxyAccountDescription: "プロキシアカウントは、特定の条件下でユーザーのリモートフォローを代行するアカウントです。例えば、ユーザーがリモートユーザーをリストに入れたとき、リストに入れられたユーザーを誰もフォローしていないとアクティビティがインスタンスに配達されないため、代わりにプロキシアカウントがフォローするようにします。" host: "ホスト" selectUser: "ユーザーを選択" +selectInstance: "インスタンスを選択" recipient: "宛先" annotation: "注釈" federation: "連合" @@ -197,10 +206,11 @@ muteAndBlock: "ミュートとブロック" mutedUsers: "ミュートしたユーザー" blockedUsers: "ブロックしたユーザー" noUsers: "ユーザーはいません" +noInstances: "インスタンスはありません" editProfile: "プロフィールを編集" -noteDeleteConfirm: "このノートを削除しますか?" +noteDeleteConfirm: "この投稿を削除しますか?" pinLimitExceeded: "これ以上ピン留めできません" -intro: "Misskeyのインストールが完了しました!管理者アカウントを作成しましょう。" +intro: "Calckeyのインストールが完了しました!管理者アカウントを作成しましょう。" done: "完了" processing: "処理中" preview: "プレビュー" @@ -289,7 +299,7 @@ emptyDrive: "ドライブは空です" emptyFolder: "フォルダーは空です" unableToDelete: "削除できません" inputNewFileName: "新しいファイル名を入力してください" -inputNewDescription: "新しいキャプションを入力してください" +inputNewDescription: "新しい説明を入力してください" inputNewFolderName: "新しいフォルダ名を入力してください" circularReferenceFolder: "移動先のフォルダーは、移動するフォルダーのサブフォルダーです。" hasChildFilesOrFolders: "このフォルダは空でないため、削除できません。" @@ -325,8 +335,8 @@ connectService: "接続する" disconnectService: "切断する" enableLocalTimeline: "ローカルタイムラインを有効にする" enableGlobalTimeline: "グローバルタイムラインを有効にする" -enableRecommendedTimeline: "推奨されるタイムラインを有効にする" -disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用することができます。" +enableRecommendedTimeline: "おすすめタイムラインを有効にする" +disablingTimelinesInfo: "これらのタイムラインを無効化しても、利便性のため管理者およびモデレーターは引き続き利用できます。" registration: "登録" enableRegistration: "誰でも新規登録できるようにする" invite: "招待" @@ -342,7 +352,7 @@ pinnedUsersDescription: "「みつける」ページなどにピン留めした pinnedPages: "ピン留めページ" pinnedPagesDescription: "インスタンスのトップページにピン留めしたいページのパスを改行で区切って記述します。" pinnedClipId: "ピン留めするクリップのID" -pinnedNotes: "ピン留めされたノート" +pinnedNotes: "ピン留めされた投稿" hcaptcha: "hCaptcha" enableHcaptcha: "hCaptchaを有効にする" hcaptchaSiteKey: "サイトキー" @@ -359,10 +369,11 @@ antennaSource: "受信ソース" antennaKeywords: "受信キーワード" antennaExcludeKeywords: "除外キーワード" antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります" -notifyAntenna: "新しいノートを通知する" -withFileAntenna: "ファイルが添付されたノートのみ" +notifyAntenna: "新しい投稿を通知する" +withFileAntenna: "ファイルが添付された投稿のみ" enableServiceworker: "ブラウザへのプッシュ通知を有効にする" antennaUsersDescription: "ユーザー名を改行で区切って指定します" +antennaInstancesDescription: "インスタンスを改行で区切って指定します" caseSensitive: "大文字小文字を区別する" withReplies: "返信を含む" connectedTo: "次のアカウントに接続されています" @@ -371,7 +382,7 @@ withFiles: "ファイル付き" silence: "サイレンス" silenceConfirm: "サイレンスしますか?" unsilence: "サイレンス解除" -unsilenceConfirm: "サイレンス解除しますか?" +unsilenceConfirm: "サイレンスを解除しますか?" popularUsers: "人気のユーザー" recentlyUpdatedUsers: "最近投稿したユーザー" recentlyRegisteredUsers: "最近登録したユーザー" @@ -393,7 +404,7 @@ securityKeyName: "キーの名前" registerSecurityKey: "セキュリティキーを登録する" lastUsed: "最後の使用" unregister: "登録を解除" -passwordLessLogin: "パスワード無しログイン" +passwordLessLogin: "パスワード無しでログイン" resetPassword: "パスワードをリセット" newPasswordIs: "新しいパスワードは「{password}」です" reduceUiAnimation: "UIのアニメーションを減らす" @@ -422,11 +433,11 @@ messagingWithGroup: "グループでチャット" title: "タイトル" text: "テキスト" enable: "有効にする" -next: "次" +next: "次へ" retype: "再入力" -noteOf: "{user}のノート" +noteOf: "{user}の投稿" inviteToGroup: "グループに招待" -quoteAttached: "引用付き" +quoteAttached: "引用" quoteQuestion: "引用として添付しますか?" noMessagesYet: "まだチャットはありません" newMessageExists: "新しいメッセージがあります" @@ -482,12 +493,13 @@ accountSettings: "アカウント設定" promotion: "プロモーション" promote: "プロモート" numberOfDays: "日数" -hideThisNote: "このノートを非表示" -showFeaturedNotesInTimeline: "タイムラインにおすすめのノートを表示する" +hideThisNote: "この投稿を非表示" +showFeaturedNotesInTimeline: "タイムラインにおすすめの投稿を表示する" objectStorage: "オブジェクトストレージ" useObjectStorage: "オブジェクトストレージを使用" objectStorageBaseUrl: "Base URL" -objectStorageBaseUrlDesc: "参照に使用するURL。CDNやProxyを使用している場合はそのURL、S3: 'https://.s3.amazonaws.com'、GCS等: 'https://storage.googleapis.com/'。" +objectStorageBaseUrlDesc: "参照に使用するURL。CDNやProxyを使用している場合はそのURL、S3: 'https://.s3.amazonaws.com'、GCS等:\ + \ 'https://storage.googleapis.com/'。" objectStorageBucket: "Bucket" objectStorageBucketDesc: "使用サービスのbucket名を指定してください。" objectStoragePrefix: "Prefix" @@ -504,7 +516,7 @@ objectStorageSetPublicRead: "アップロード時に'public-read'を設定す serverLogs: "サーバーログ" deleteAll: "全て削除" showFixedPostForm: "タイムライン上部に投稿フォームを表示する" -newNoteRecived: "新しいノートがあります" +newNoteRecived: "新しい投稿があります" sounds: "サウンド" listen: "聴く" none: "なし" @@ -519,7 +531,7 @@ recentUsed: "最近使用" install: "インストール" uninstall: "アンインストール" installedApps: "インストールされたアプリ" -nothing: "ありません" +nothing: "まだ何もありません" installedDate: "インストール日時" lastUsedDate: "最終使用日時" state: "状態" @@ -527,10 +539,10 @@ sort: "ソート" ascendingOrder: "昇順" descendingOrder: "降順" scratchpad: "スクラッチパッド" -scratchpadDescription: "スクラッチパッドは、AiScriptの実験環境を提供します。Misskeyと対話するコードの記述、実行、結果の確認ができます。" +scratchpadDescription: "スクラッチパッドは、AiScriptの実験環境を提供します。Calckeyと対話するコードの記述、実行、結果の確認ができます。" output: "出力" script: "スクリプト" -disablePagesScript: "Pagesのスクリプトを無効にする" +disablePagesScript: "ページのスクリプトを無効にする" updateRemoteUser: "リモートユーザー情報の更新" deleteAllFiles: "すべてのファイルを削除" deleteAllFilesConfirm: "すべてのファイルを削除しますか?" @@ -559,8 +571,8 @@ disablePlayer: "プレイヤーを閉じる" expandTweet: "ツイートを展開する" themeEditor: "テーマエディター" description: "説明" -describeFile: "キャプションを付ける" -enterFileDescription: "キャプションを入力" +describeFile: "説明を付ける" +enterFileDescription: "説明を入力" author: "作者" leaveConfirm: "未保存の変更があります。破棄しますか?" manage: "管理" @@ -602,6 +614,7 @@ regexpError: "正規表現エラー" regexpErrorDescription: "{tab}ワードミュートの{line}行目の正規表現にエラーが発生しました:" instanceMute: "インスタンスミュート" userSaysSomething: "{name}が何かを言いました" +userSaysSomethingReason: "{name}が{reason}と言いました" makeActive: "アクティブにする" display: "表示" copy: "コピー" @@ -626,7 +639,7 @@ sample: "サンプル" abuseReports: "通報" reportAbuse: "通報" reportAbuseOf: "{name}を通報する" -fillAbuseReportDescription: "通報理由の詳細を記入してください。対象のノートがある場合はそのURLも記入してください。" +fillAbuseReportDescription: "通報理由の詳細を記入してください。対象の投稿がある場合はそのURLも記入してください。" abuseReported: "内容が送信されました。ご報告ありがとうございました。" reporter: "通報者" reporteeOrigin: "通報先" @@ -639,7 +652,7 @@ openInNewTab: "新しいタブで開く" openInSideView: "サイドビューで開く" defaultNavigationBehaviour: "デフォルトのナビゲーション" editTheseSettingsMayBreakAccount: "これらの設定を編集するとアカウントが破損する可能性があります。" -instanceTicker: "ノートのインスタンス情報" +instanceTicker: "投稿のインスタンス情報" waitingFor: "{x}を待っています" random: "ランダム" system: "システム" @@ -650,16 +663,16 @@ createNew: "新規作成" optional: "任意" createNewClip: "新しいクリップを作成" unclip: "クリップ解除" -confirmToUnclipAlreadyClippedNote: "このノートはすでにクリップ「{name}」に含まれています。ノートをこのクリップから除外しますか?" -public: "パブリック" +confirmToUnclipAlreadyClippedNote: "この投稿はすでにクリップ「{name}」に含まれています。投稿をこのクリップから除外しますか?" +public: "公開" i18nInfo: "Calckeyは有志によって様々な言語に翻訳されています。{link}で翻訳に協力できます。" manageAccessTokens: "アクセストークンの管理" accountInfo: "アカウント情報" -notesCount: "ノートの数" +notesCount: "投稿の数" repliesCount: "返信した数" -renotesCount: "Renoteした数" +renotesCount: "ブーストした数" repliedCount: "返信された数" -renotedCount: "Renoteされた数" +renotedCount: "ブーストされた数" followingCount: "フォロー数" followersCount: "フォロワー数" sentReactionsCount: "リアクションした数" @@ -671,17 +684,17 @@ no: "いいえ" driveFilesCount: "ドライブのファイル数" driveUsage: "ドライブ使用量" noCrawle: "クローラーによるインデックスを拒否" -noCrawleDescription: "検索エンジンにあなたのユーザーページ、ノート、Pagesなどのコンテンツを登録(インデックス)しないよう要請します。" -lockedAccountInfo: "フォローを承認制にしても、ノートの公開範囲を「フォロワー」にしない限り、誰でもあなたのノートを見ることができます。" +noCrawleDescription: "検索エンジンにあなたのプロフィールや投稿、ページなどのコンテンツを登録(インデックス)しないよう要請します。" +lockedAccountInfo: "フォローを承認制にしても、投稿の公開範囲を「フォロワー」にしない限り、誰でもあなたの投稿を見られます。" alwaysMarkSensitive: "デフォルトでメディアを閲覧注意にする" loadRawImages: "添付画像のサムネイルをオリジナル画質にする" disableShowingAnimatedImages: "アニメーション画像を再生しない" verificationEmailSent: "確認のメールを送信しました。メールに記載されたリンクにアクセスして、設定を完了してください。" notSet: "未設定" emailVerified: "メールアドレスが確認されました" -noteFavoritesCount: "お気に入りノートの数" -pageLikesCount: "Pageにいいねした数" -pageLikedCount: "Pageにいいねされた数" +noteFavoritesCount: "お気に入りの投稿の数" +pageLikesCount: "ページにいいねした数" +pageLikedCount: "ページにいいねされた数" contact: "連絡先" useSystemFont: "システムのデフォルトのフォントを使う" clips: "クリップ" @@ -689,7 +702,7 @@ experimentalFeatures: "実験的機能" developer: "開発者" makeExplorable: "アカウントを見つけやすくする" makeExplorableDescription: "オフにすると、「みつける」にアカウントが載らなくなります。" -showGapBetweenNotesInTimeline: "タイムラインのノートを離して表示" +showGapBetweenNotesInTimeline: "タイムラインの投稿を離して表示する" duplicate: "複製" left: "左" center: "中央" @@ -701,9 +714,9 @@ showTitlebar: "タイトルバーを表示する" clearCache: "キャッシュをクリア" onlineUsersCount: "{n}人がオンライン" nUsers: "{n}ユーザー" -nNotes: "{n}ノート" +nNotes: "{n}投稿" sendErrorReports: "エラーリポートを送信" -sendErrorReportsDescription: "オンにすると、問題が発生したときにエラーの詳細情報がMisskeyに共有され、ソフトウェアの品質向上に役立てることができます。エラー情報には、OSのバージョン、ブラウザの種類、行動履歴などが含まれます。" +sendErrorReportsDescription: "オンにすると、問題が発生したときにエラーの詳細情報がCalckeyに共有され、ソフトウェアの品質向上に役立てられます。エラー情報には、OSのバージョン、ブラウザの種類、行動履歴などが含まれます。" myTheme: "マイテーマ" backgroundColor: "背景" accentColor: "アクセント" @@ -738,11 +751,11 @@ showingPastTimeline: "過去のタイムラインを表示しています" clear: "クリア" markAllAsRead: "全て既読にする" goBack: "戻る" -unlikeConfirm: "いいね解除しますか?" +unlikeConfirm: "いいねを解除しますか?" fullView: "フルビュー" quitFullView: "フルビュー解除" addDescription: "説明を追加" -userPagePinTip: "個々のノートのメニューから「ピン留め」を選択することで、ここにノートを表示しておくことができます。" +userPagePinTip: "個々の投稿のメニューから「ピン留め」を選択することで、ここに投稿を表示できます。" notSpecifiedMentionWarning: "宛先に含まれていないメンションがあります" info: "情報" userInfo: "ユーザー情報" @@ -772,7 +785,7 @@ postToGallery: "ギャラリーへ投稿" gallery: "ギャラリー" recentPosts: "最近の投稿" popularPosts: "人気の投稿" -shareWithNote: "ノートで共有" +shareWithNote: "投稿で共有" ads: "広告" expiration: "期限" memo: "メモ" @@ -786,15 +799,16 @@ secureMode: "セキュアモード (Authorized Fetch)" instanceSecurity: "インスタンスのセキュリティー" secureModeInfo: "他のインスタンスからリクエストするときに、証明を付けなければ返送しません。他のインスタンスの設定ファイルでsignToActivityPubGetはtrueにしてください。" privateMode: "非公開モード" -privateModeInfo: "有効にして、許可されているインスタンスのみがリクエストできます。すべてのノートが公開に非表示にします。" +privateModeInfo: "有効にすると、許可したインスタンスのみからリクエストを受け付けます。" allowedInstances: "許可されたインスタンス" allowedInstancesDescription: "許可したいインスタンスのホストを改行で区切って設定します。非公開モードだけで有効です。" previewNoteText: "本文をプレビュー" customCss: "カスタムCSS" customCssWarn: "この設定は必ず知識のある方が行ってください。不適切な設定を行うとクライアントが正常に使用できなくなる恐れがあります。" global: "グローバル" +recommended: "推奨" squareAvatars: "アイコンを四角形で表示" -seperateRenoteQuote: "リノートと引用ボタンを分ける" +seperateRenoteQuote: "ブーストと引用ボタンを分ける" sent: "送信" received: "受信" searchResult: "検索結果" @@ -802,13 +816,13 @@ hashtags: "ハッシュタグ" troubleshooting: "トラブルシューティング" useBlurEffect: "UIにぼかし効果を使用" learnMore: "詳しく" -misskeyUpdated: "Misskeyが更新されました!" +misskeyUpdated: "Calckeyが更新されました!" whatIsNew: "更新情報を見る" translate: "翻訳" translatedFrom: "{x}から翻訳" accountDeletionInProgress: "アカウントの削除が進行中です" -usernameInfo: "サーバー上であなたのアカウントを一意に識別するための名前。アルファベット(a~z, A~Z)、数字(0~9)、およびアンダーバー(_)が使用できます。ユーザー名は後から変更することは出来ません。" -aiChanMode: "藍モード" +usernameInfo: "サーバー上であなたのアカウントを一意に識別するための名前です。アルファベット(a~z, A~Z)、数字(0~9)、およびアンダーバー(_)が使用できます。ユーザー名は後から変更できません。" +aiChanMode: "藍モード(クラシックUI)" enterSendsMessage: "メッセージングでReturnキーを押すと、メッセージが送信されます(デフォルトはCtrl + Returnです)" keepCw: "CWを維持する" pubSub: "Pub/Subのアカウント" @@ -816,7 +830,7 @@ lastCommunication: "直近の通信" resolved: "解決済み" unresolved: "未解決" breakFollow: "フォロワーを解除" -breakFollowConfirm: "フォロワー解除しますか?" +breakFollowConfirm: "フォロワーから削除しますか?" itsOn: "オンになっています" itsOff: "オフになっています" emailRequiredForSignup: "アカウント登録にメールアドレスを必須にする" @@ -845,6 +859,9 @@ overridedDeviceKind: "デバイスタイプ" smartphone: "スマートフォン" tablet: "タブレット" auto: "自動" +showLocalPosts: "ローカルの投稿を表示する場所" +homeTimeline: "ホームタイムライン" +socialTimeline: "ソーシャルタイムライン" themeColor: "テーマカラー" size: "サイズ" numberOfColumn: "列の数" @@ -868,7 +885,6 @@ recentNHours: "直近{n}時間" recentNDays: "直近{n}日" noEmailServerWarning: "メールサーバーの設定がされていません。" thereIsUnresolvedAbuseReportWarning: "未対応の通報があります。" -recommended: "推奨" check: "チェック" driveCapOverrideLabel: "このユーザーのドライブ容量上限を変更" driveCapOverrideCaption: "0以下を指定すると解除されます。" @@ -897,6 +913,7 @@ remoteOnly: "リモートのみ" failedToUpload: "アップロード失敗" cannotUploadBecauseInappropriate: "不適切な内容を含む可能性があると判定されたためアップロードできません。" cannotUploadBecauseNoFreeSpace: "ドライブの空き容量が無いためアップロードできません。" +cannotUploadBecauseExceedsFileSizeLimit: "ファイルサイズの制限を超えているためアップロードできません。" beta: "ベータ" enableAutoSensitive: "自動NSFW判定" enableAutoSensitiveDescription: "利用可能な場合は、機械学習を利用して自動でメディアにNSFWフラグを設定します。この機能をオフにしても、インスタンスによっては自動で設定されることがあります。" @@ -906,82 +923,100 @@ navbar: "ナビゲーションバー" shuffle: "シャッフル" account: "アカウント" move: "移動" +pushNotification: "プッシュ通知" +subscribePushNotification: "プッシュ通知を有効化" +unsubscribePushNotification: "プッシュ通知を停止する" +pushNotificationAlreadySubscribed: "プッシュ通知は有効です" +pushNotificationNotSupported: "ブラウザかサーバーがプッシュ通知に非対応" +sendPushNotificationReadMessage: "通知やメッセージが既読になったらプッシュ通知を削除する" +sendPushNotificationReadMessageCaption: "「{emptyPushNotificationMessage}」という通知が一瞬表示されるようになります。端末の電池消費量が増加する可能性があります。" adminCustomCssWarn: "この設定は、それが何をするものであるかを知っている場合のみ使用してください。不適切な値を入力すると、クライアントが正常に動作しなくなる可能性があります。ユーザー設定でCSSをテストし、正しく動作することを確認してください。" customMOTD: "カスタムMOTD(スプラッシュスクリーンメッセージ)" customMOTDDescription: "ユーザがページをロード/リロードするたびにランダムに表示される、改行で区切られたMOTD(スプラッシュスクリーン)用のカスタムメッセージ" customSplashIcons: "カスタムスプラッシュスクリーンアイコン" -customSplashIconsDescription: "ユーザがページをロード/リロードするたびにランダムに表示される、改行で区切られたカスタムスプラッシュスクリーンアイコンの URL。画像は静的なURLで、できればすべて192x192にリサイズしてください。" +customSplashIconsDescription: "ユーザがページをロード/リロードするたびにランダムに表示される、改行で区切られたカスタムスプラッシュスクリーンアイコンの\ + \ URL。画像は静的なURLで、できればすべて192x192にリサイズしてください。" showUpdates: "Calckeyの更新時にポップアップを表示する" -recommendedInstances: "推奨インスタンス" -recommendedInstancesDescription: "推奨タイムラインに表示するために改行で区切られた推奨インスタンス。`https://`を追加しないでください。ドメインのみを追加してください。" +recommendedInstances: "おすすめインスタンス" +recommendedInstancesDescription: "おすすめタイムラインに表示される、改行で区切られたインスタンス。`https://`を追加しないでください。ドメインのみを追加してください。" caption: "自動キャプション" splash: "スプラッシュスクリーン" -updateAvailable: "アップデートがありますよ" +updateAvailable: "アップデートがありますよ!" swipeOnDesktop: "デスクトップでモバイルスタイルのスワイプを可能にする" logoImageUrl: "ロゴのURL" -showAdminUpdates: "新しいCalckeyのバージョンが利用可能であることを示す(管理者のみ)" -replayTutorial: "リプレイチュートリアル" +showAdminUpdates: "新しいCalckeyのバージョンが利用可能なときに通知する(管理者のみ)" +replayTutorial: "もう一度チュートリアルを見る" +migration: "アカウントの引っ越し" +moveTo: "このアカウントを新しいアカウントに引っ越す" +moveToLabel: "引っ越し先のアカウント:" +moveAccount: "引っ越し実行!" +moveAccountDescription: "この操作は取り消せません。まずは引っ越し先のアカウントでこのアカウントに対しエイリアスを作成したことを確認してください。エイリアス作成後、引っ越し先のアカウントをこのように入力してください:@person@instance.com" +moveFrom: "別のアカウントからこのアカウントに引っ越す" +moveFromLabel: "引っ越し元のアカウント:" +moveFromDescription: "別のアカウントからこのアカウントにフォロワーを引き継いで引っ越したい場合、ここでエイリアスを作成しておく必要があります。必ず引っ越しを実行する前に作成してください!引っ越し元のアカウントをこのように入力してください:@person@instance.com" +migrationConfirm: "本当にこのアカウントを {account} に引っ越しますか?一度引っ越しを行うと取り消せず、二度とこのアカウントを元の状態で使用できなくなります。\n\ + また、引っ越し先のアカウントでエイリアスを作成したことを確認してください。" +defaultReaction: "リモートとローカルの投稿に対するデフォルトの絵文字リアクション" +license: "ライセンス" +indexPosts: "投稿をインデックス" +indexFrom: "この投稿ID以降をインデックスする(空白で全ての投稿を指定します)" +indexNotice: "インデックスを開始しました。完了まで時間がかかる場合があるため、少なくとも1時間はサーバーを再起動しないでください。" +customKaTeXMacro: "カスタムKaTeXマクロ" +customKaTeXMacroDescription: "数式入力を楽にするためのマクロを設定しましょう!記法はLaTeXにおけるコマンドの定義と同様に \\newcommand{\\\ + name}{content} または \\newcommand{\\add}[2]{#1 + #2} のように記述します。後者の例では \\add{3}{foo}\ + \ が 3 + foo に展開されます。また、マクロの名前を囲む波括弧を丸括弧 () および角括弧 [] に変更した場合、マクロの引数に使用する括弧が変更されます。マクロの定義は一行に一つのみで、途中で改行はできません。マクロの定義が無効な行は無視されます。文字列を単純に置換する機能のみに対応していて、条件分岐などの高度な構文は使用できません。" +enableCustomKaTeXMacro: "カスタムKaTeXマクロを有効にする" _sensitiveMediaDetection: - description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てることができます。サーバーの負荷が少し増えます。" + description: "機械学習を使って自動でセンシティブなメディアを検出し、モデレーションに役立てられます。サーバーの負荷が少し増えます。" sensitivity: "検出感度" sensitivityDescription: "感度を低くすると、誤検知(偽陽性)が減ります。感度を高くすると、検知漏れ(偽陰性)が減ります。" setSensitiveFlagAutomatically: "NSFWフラグを設定する" setSensitiveFlagAutomaticallyDescription: "この設定をオフにしても内部的に判定結果は保持されます。" analyzeVideos: "動画の解析を有効化" analyzeVideosDescription: "静止画に加えて動画も解析するようにします。サーバーの負荷が少し増えます。" - _emailUnavailable: used: "既に使用されています" format: "形式が正しくありません" disposable: "恒久的に使用可能なアドレスではありません" mx: "正しいメールサーバーではありません" smtp: "メールサーバーが応答しません" - _ffVisibility: public: "公開" followers: "フォロワーだけに公開" private: "非公開" - _signup: almostThere: "ほとんど完了です" emailAddressInfo: "あなたが使っているメールアドレスを入力してください。メールアドレスが公開されることはありません。" emailSent: "入力されたメールアドレス({email})宛に確認のメールが送信されました。メールに記載されたリンクにアクセスすると、アカウントの作成が完了します。" - _accountDelete: accountDelete: "アカウントの削除" mayTakeTime: "アカウントの削除は負荷のかかる処理であるため、作成したコンテンツの数やアップロードしたファイルの数が多いと完了までに時間がかかることがあります。" - sendEmail: "アカウントの削除が完了する際は、登録してあったメールアドレス宛に通知を送信します。" + sendEmail: "アカウントの削除が完了した際に、登録されていたメールアドレス宛に通知を送信します。" requestAccountDelete: "アカウント削除をリクエスト" - started: "削除処理が開始されました。" + started: "削除処理を開始しました。" inProgress: "削除が進行中" - _ad: back: "戻る" reduceFrequencyOfThisAd: "この広告の表示頻度を下げる" - _forgotPassword: enterEmail: "アカウントに登録したメールアドレスを入力してください。そのアドレス宛てに、パスワードリセット用のリンクが送信されます。" ifNoEmail: "メールアドレスを登録していない場合は、管理者までお問い合わせください。" contactAdmin: "このインスタンスではメールがサポートされていないため、パスワードリセットを行う場合は管理者までお問い合わせください。" - _gallery: my: "自分の投稿" liked: "いいねした投稿" like: "いいね!" unlike: "いいね解除" - _email: _follow: title: "フォローされました" _receiveFollowRequest: title: "フォローリクエストを受け取りました" - _plugin: install: "プラグインのインストール" installWarn: "信頼できないプラグインはインストールしないでください。" manage: "プラグインの管理" - _preferencesBackups: list: "作成したバックアップ" saveNew: "新規保存" @@ -998,49 +1033,45 @@ _preferencesBackups: noBackups: "バックアップはありません。「新規保存」で現在のクライアント設定をサーバーに保存できます。" createdAt: "作成日時: {date} {time}" updatedAt: "更新日時: {date} {time}" - cannotLoad: "読み込みできません" + cannotLoad: "読み込めません。" invalidFile: "ファイル形式が違います。" - _registry: scope: "スコープ" key: "キー" keys: "キー" domain: "ドメイン" createKey: "キーを作成" - _aboutMisskey: - about: "Calckeyは、2022年から開発されているThatOneCalculator社製のMisskeyのforkです。" + about: "Calckeyは、2022年に生まれたThatOneCalculatorによるMisskeyのforkです。" contributors: "主なコントリビューター" allContributors: "全てのコントリビューター" source: "ソースコード" - translation: "Misskeyを翻訳" - donate: "Misskeyに寄付" - morePatrons: "他にも多くの方が支援してくれています。ありがとうございます🥰" + translation: "Calckeyを翻訳" + donate: "Calckeyに寄付" + morePatrons: "他にも多くの方が支援してくれています。ありがとうございます! \U0001F970" patrons: "支援者" - _nsfw: respect: "閲覧注意のメディアは隠す" ignore: "閲覧注意のメディアを隠さない" force: "常にメディアを隠す" - _mfm: cheatSheet: "MFMチートシート" - intro: "MFMは、Misskey内の様々な場所で使用できる専用のマークアップ言語です。ここでは、MFMで使用可能な構文一覧が確認できます。" - dummy: "MisskeyでFediverseの世界が広がります" + intro: "MFMは、MisskeyやCalckey、Akkomaなどの様々な場所で使用できるマークアップ言語です。ここでは、MFMで使用可能な構文一覧が確認できます。" + dummy: "CalckeyでFediverseの世界が広がります" mention: "メンション" - mentionDescription: "アットマーク + ユーザー名で、特定のユーザーを示すことができます。" + mentionDescription: "アットマーク + ユーザー名で、特定のユーザーを示せます。" hashtag: "ハッシュタグ" - hashtagDescription: "ナンバーサイン + タグで、ハッシュタグを示すことができます。" + hashtagDescription: "ナンバーサイン + タグで、ハッシュタグを示せます。" url: "URL" - urlDescription: "URLを示すことができます。" + urlDescription: "URLを示せます。" link: "リンク" - linkDescription: "文章の特定の範囲を、URLに紐づけることができます。" + linkDescription: "文章の特定の範囲を、URLに紐づけられます。" bold: "太字" - boldDescription: "文字を太く表示して強調することができます。" + boldDescription: "文字を太く表示して強調できます。" small: "目立たなく" - smallDescription: "内容を小さく・薄く表示させることができます。" + smallDescription: "内容を小さく・薄く表示させられます。" center: "中央寄せ" - centerDescription: "内容を中央寄せで表示させることができます。" + centerDescription: "内容を中央寄せで表示させられます。" inlineCode: "コード(インライン)" inlineCodeDescription: "プログラムなどのコードをインラインでシンタックスハイライトします。" blockCode: "コード(ブロック)" @@ -1050,11 +1081,11 @@ _mfm: blockMath: "数式(ブロック)" blockMathDescription: "複数行の数式(KaTeX)をブロックで表示します。" quote: "引用" - quoteDescription: "内容が引用であることを示すことができます。" + quoteDescription: "内容が引用であることを示せます。" emoji: "カスタム絵文字" - emojiDescription: "コロンでカスタム絵文字名を囲むと、カスタム絵文字を表示させることができます。" + emojiDescription: "コロンでカスタム絵文字名を囲むと、カスタム絵文字を表示させられます。" search: "検索" - searchDescription: "入力済み検索ボックスを表示させることができます。" + searchDescription: "検索ボックスを表示させられます。" flip: "反転" flipDescription: "内容を上下または左右に反転させます。" jelly: "アニメーション(びよんびよん)" @@ -1080,7 +1111,7 @@ _mfm: blur: "ぼかし" blurDescription: "内容をぼかすことができます。ポインターを上に乗せるとはっきり見えるようになります。" font: "フォント" - fontDescription: "内容のフォントを指定することができます。" + fontDescription: "内容のフォントを指定できます。" rainbow: "レインボー" rainbowDescription: "内容をレインボーにします。" sparkle: "キラキラ" @@ -1089,18 +1120,15 @@ _mfm: rotateDescription: "指定した角度で回転させます。" plain: "プレーン" plainDescription: "内側の構文を全て無効にします。" - _instanceTicker: none: "表示しない" remote: "リモートユーザーに表示" always: "常に表示" - _serverDisconnectedBehavior: reload: "自動でリロード" dialog: "ダイアログで警告" quiet: "控えめに警告" nothing: "何も起こらない" - _channel: create: "チャンネルを作成" edit: "チャンネルを編集" @@ -1111,33 +1139,28 @@ _channel: following: "フォロー中" usersCount: "{n}人が参加中" notesCount: "{n}投稿があります" - _messaging: - dms: "ディーエム" + dms: "プライベート" groups: "グループ" - _menuDisplay: sideFull: "横" sideIcon: "横(アイコン)" top: "上部" hide: "隠す" - _wordMute: muteWords: "ミュートするワード" muteWordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります。" muteWordsDescription2: "キーワードをスラッシュで囲むと正規表現になります。" - softDescription: "指定した条件のノートをタイムラインから隠します。" - hardDescription: "指定した条件のノートをタイムラインに追加しないようにします。追加されなかったノートは、条件を変更しても除外されたままになります。" + softDescription: "指定した条件の投稿をタイムラインから隠します。" + hardDescription: "指定した条件の投稿をタイムラインに追加しないようにします。追加されなかった投稿は、条件を変更しても除外されたままになります。" soft: "ソフト" hard: "ハード" - mutedNotes: "ミュートされたノート" - + mutedNotes: "ミュートされた投稿" _instanceMute: - instanceMuteDescription: "ミュートしたインスタンスのユーザーへの返信を含めて、設定したインスタンスの全てのノートとRenoteをミュートします。" + instanceMuteDescription: "ミュートしたインスタンスのユーザーへの返信を含めて、設定したインスタンスの全ての投稿とブーストをミュートします。" instanceMuteDescription2: "改行で区切って設定します" - title: "設定したインスタンスのノートを隠します。" + title: "設定したインスタンスの投稿を隠します。" heading: "ミュートするインスタンス" - _theme: explore: "テーマを探す" install: "テーマのインストール" @@ -1168,7 +1191,6 @@ _theme: inputConstantName: "定数名を入力してください" importInfo: "ここにテーマコードを貼り付けて、エディターにインポートできます" deleteConstantConfirm: "定数 {const} を削除しても良いですか?" - keys: accent: "アクセント" bg: "背景" @@ -1187,7 +1209,7 @@ _theme: hashtag: "ハッシュタグ" mention: "メンション" mentionMe: "あなた宛てメンション" - renote: "Renote" + renote: "ブースト" modalBg: "モーダルの背景" divider: "分割線" scrollbarHandle: "スクロールバーの取っ手" @@ -1213,16 +1235,14 @@ _theme: accentDarken: "アクセント (暗め)" accentLighten: "アクセント (明るめ)" fgHighlighted: "強調された文字" - _sfx: - note: "ノート" - noteMy: "ノート(自分)" + note: "投稿" + noteMy: "投稿(自分)" notification: "通知" chat: "チャット" chatBg: "チャット(バックグラウンド)" antenna: "アンテナ受信" channel: "チャンネル通知" - _ago: future: "未来" justNow: "たった今" @@ -1233,35 +1253,33 @@ _ago: weeksAgo: "{n}週間前" monthsAgo: "{n}ヶ月前" yearsAgo: "{n}年前" - _time: second: "秒" minute: "分" hour: "時間" day: "日" - _tutorial: title: "Calckeyの使い方" - step1_1: "ようこそ!" - step1_2: "設定をしてみましょう" - step2_1: "メモを書いたり、誰かをフォローする前に、プロフィールの設定を済ませましょう。" - step2_2: "あなたが誰なのか、いくつかの情報を提供することで、他の人があなたのメモを見たり、フォローしたりしたいのかがわかりやすくなります。" - step3_1: "さあ、何人かの人をフォローする時間です!" - step3_2: "あなたのホームとソーシャルタイムラインは、あなたが誰をフォローしているかで決まります。 まずは、いくつかのアカウントをフォローしてみましょう。" - step4_1: "さあ、外に出てみましょう。" - step4_2: "最初の投稿は、{introduction}の投稿や、シンプルに「こんにちは、世界よ!」的な投稿をするのが好きな人もいます。" + step1_1: "ようこそ!" + step1_2: "使い始める前に、いくつか設定を済ませましょう。すぐできますよ!" + step2_1: "最初に、あなたのプロフィールを作りましょう。" + step2_2: "プロフィールを設定することで、他の人があなたの投稿を見たり、フォローしたりするときの助けになります。" + step3_1: "それでは、何人かフォローしてみましょう!" + step3_2: "あなたのホームとソーシャルタイムラインは、あなたが誰をフォローしているかで決まります。まずは、いくつかのアカウントをフォローしてみましょう。\n\ + プロフィールの右上にある丸い+ボタンをクリックするとフォローできます。" + step4_1: "投稿してみましょう!" + step4_2: "最初は{introduction}に投稿したり、シンプルに「こんにちは、アカウント作ってみました!」などの投稿をする人もいます。" step5_1: "タイムライン、タイムラインだらけ!" - step5_2: "あなたのインスタンスは{timelines}異なるタイムラインを有効にしています。" - step5_3: "ホーム{icon}のタイムラインは、あなたのフォロワーからの投稿を見ることができます。" - step5_4: "ローカル{icon}タイムラインは、このインスタンスのみんなの投稿を見ることができる場所です。" - step5_5: "おすすめ{icon}のタイムラインは、管理人がおすすめするインスタンスの投稿を見ることができます。" - step5_6: "ソーシャル{icon}のタイムラインは、あなたのフォロワーの友達の投稿を見ることができる場所です。" - step5_7: "グローバル{icon}タイムラインは、接続している他のすべてのインスタンスからの投稿を見ることができます。" - step6_1: "それで、ここは何なの?" - step6_2: "まあ、あなたはCalckeyに参加しただけではありません。何千ものサーバーが相互接続されたネットワークで インスタンスと呼ばれる。" - step6_3: "各サーバーは異なる方法で動作し、すべてのサーバーがCalckeyを実行するわけではありません。でも、このサーバーは動くんです" - step6_4: "さあ、探検して、楽しんでください!" - + step5_2: "あなたのインスタンスでは{timelines}種類のタイムラインが有効になっています。" + step5_3: "ホーム{icon}タイムラインでは、あなたがフォローしているアカウントとこのインスタンスのみんなの投稿を見られます。もしフォローしているアカウントの投稿だけ見たい場合は、設定から変更できます。" + step5_4: "ローカル{icon}タイムラインでは、このインスタンスにいるみんなの投稿を見られます。" + step5_5: "ソーシャル{icon}タイムラインでは、あなたがフォローしているアカウントの投稿を見られます。" + step5_6: "おすすめ{icon}タイムラインでは、管理人がおすすめするインスタンスの投稿を見られます。" + step5_7: "グローバル{icon}タイムラインでは、接続している他のすべてのインスタンスからの投稿を見られます。" + step6_1: "じゃあ、ここはどんな場所なの?" + step6_2: "実は、あなたはただCalckeyに参加しただけではありません。ここは、何千もの相互接続されたサーバーが構成する Fediverse への入口です。各サーバーは「インスタンス」と呼ばれます。" + step6_3: "それぞれのサーバーでは必ずしもCalckeyが使われているわけではなく、異なる動作をするサーバーもあります。しかし、あなたは他のサーバーのアカウントもフォローしたり、返信・ブーストができます。一見難しそうですが大丈夫!すぐ慣れます。" + step6_4: "これで完了です。お楽しみください!" _2fa: alreadyRegistered: "既に設定は完了しています。" registerDevice: "デバイスを登録" @@ -1272,7 +1290,6 @@ _2fa: step3: "アプリに表示されているトークンを入力して完了です。" step4: "これからログインするときも、同じようにトークンを入力します。" securityKeyInfo: "FIDO2をサポートするハードウェアセキュリティキーもしくは端末の指紋認証やPINを使用してログインするように設定できます。" - _permissions: "read:account": "アカウントの情報を見る" "write:account": "アカウントの情報を変更する" @@ -1288,7 +1305,7 @@ _permissions: "write:messaging": "チャットを操作する" "read:mutes": "ミュートを見る" "write:mutes": "ミュートを操作する" - "write:notes": "ノートを作成・削除する" + "write:notes": "投稿を作成・削除する" "read:notifications": "通知を見る" "write:notifications": "通知を操作する" "read:reactions": "リアクションを見る" @@ -1306,22 +1323,21 @@ _permissions: "write:gallery": "ギャラリーを操作する" "read:gallery-likes": "ギャラリーのいいねを見る" "write:gallery-likes": "ギャラリーのいいねを操作する" - _auth: shareAccess: "「{name}」がアカウントにアクセスすることを許可しますか?" shareAccessAsk: "アカウントへのアクセスを許可しますか?" - permissionAsk: "このアプリは次の権限を要求しています" - pleaseGoBack: "アプリケーションに戻ってやっていってください" + permissionAsk: "このアプリケーションは次の権限を要求しています" + pleaseGoBack: "アプリケーションに戻り続行してください" callback: "アプリケーションに戻っています" denied: "アクセスを拒否しました" - + copyAsk: "以下の認証コードをアプリケーションにコピーしてください" _antennaSources: - all: "全てのノート" - homeTimeline: "フォローしているユーザーのノート" - users: "指定した一人または複数のユーザーのノート" - userList: "指定したリストのユーザーのノート" - userGroup: "指定したグループのユーザーのノート" - + all: "全ての投稿" + homeTimeline: "フォローしているユーザーの投稿" + users: "指定した一人または複数のユーザーの投稿" + userList: "指定したリストのユーザーの投稿" + userGroup: "指定したグループのユーザーの投稿" + instances: "指定したインスタンスの全ユーザーの投稿" _weekday: sunday: "日曜日" monday: "月曜日" @@ -1330,7 +1346,6 @@ _weekday: thursday: "木曜日" friday: "金曜日" saturday: "土曜日" - _widgets: memo: "付箋" notifications: "通知" @@ -1353,14 +1368,14 @@ _widgets: jobQueue: "ジョブキュー" serverMetric: "サーバーメトリクス" aiscript: "AiScriptコンソール" - aichan: "藍" - + userList: "ユーザーリスト" + _userList: + chooseList: "リストを選択" _cw: hide: "隠す" show: "もっと見る" chars: "{count}文字" files: "{count}ファイル" - _poll: noOnlyOneChoice: "選択肢は最低2つ必要です" choiceN: "選択肢{n}" @@ -1383,11 +1398,10 @@ _poll: remainingHours: "終了まであと{h}時間{m}分" remainingMinutes: "終了まであと{m}分{s}秒" remainingSeconds: "終了まであと{s}秒" - _visibility: - public: "パブリック" + public: "公開" publicDescription: "全てのユーザーに公開" - home: "ホーム" + home: "未収載" homeDescription: "ホームタイムラインのみに公開" followers: "フォロワー" followersDescription: "自分のフォロワーのみに公開" @@ -1395,10 +1409,9 @@ _visibility: specifiedDescription: "指定したユーザーのみに公開" localOnly: "ローカルのみ" localOnlyDescription: "リモートユーザーには非公開" - _postForm: - replyPlaceholder: "このノートに返信..." - quotePlaceholder: "このノートを引用..." + replyPlaceholder: "この投稿に返信..." + quotePlaceholder: "この投稿を引用..." channelPlaceholder: "チャンネルに投稿..." _placeholders: a: "いまどうしてる?" @@ -1407,64 +1420,59 @@ _postForm: d: "言いたいことは?" e: "ここに書いてください" f: "あなたが書くのを待っています..." - _profile: name: "名前" username: "ユーザー名" description: "自己紹介" - youCanIncludeHashtags: "ハッシュタグを含めることができます。" + youCanIncludeHashtags: "ハッシュタグを含められます。" metadata: "追加情報" metadataEdit: "追加情報を編集" - metadataDescription: "プロフィールに表として追加情報を表示することができます。" + metadataDescription: "プロフィールに表として追加情報を表示できます。" metadataLabel: "ラベル" metadataContent: "内容" changeAvatar: "アバター画像を変更" changeBanner: "バナー画像を変更" - + locationDescription: "英語表記の都市名から始まる内容を入力すると、現地時間がユーザーページに表示されます。" _exportOrImport: - allNotes: "全てのノート" + allNotes: "全ての投稿" followingList: "フォロー" muteList: "ミュート" blockingList: "ブロック" userLists: "リスト" excludeMutingUsers: "ミュートしているユーザーを除外" excludeInactiveUsers: "使われていないアカウントを除外" - _charts: federation: "連合" apRequest: "リクエスト" usersIncDec: "ユーザーの増減" usersTotal: "ユーザーの合計" activeUsers: "アクティブユーザー数" - notesIncDec: "ノートの増減" - localNotesIncDec: "ローカルのノートの増減" - remoteNotesIncDec: "リモートのノートの増減" - notesTotal: "ノートの合計" + notesIncDec: "投稿の増減" + localNotesIncDec: "ローカルの投稿の増減" + remoteNotesIncDec: "リモートの投稿の増減" + notesTotal: "投稿の合計" filesIncDec: "ファイルの増減" filesTotal: "ファイルの合計" storageUsageIncDec: "ストレージ使用量の増減" storageUsageTotal: "ストレージ使用量の合計" - _instanceCharts: requests: "リクエスト" users: "ユーザーの増減" usersTotal: "ユーザーの累積" - notes: "ノートの増減" - notesTotal: "ノートの累積" + notes: "投稿の増減" + notesTotal: "投稿の累積" ff: "フォロー/フォロワーの増減" ffTotal: "フォロー/フォロワーの累積" cacheSize: "キャッシュサイズの増減" cacheSizeTotal: "キャッシュサイズの累積" files: "ファイル数の増減" filesTotal: "ファイル数の累積" - _timelines: home: "ホーム" local: "ローカル" - recommended: "一押し" + recommended: "おすすめ" social: "ソーシャル" global: "グローバル" - _pages: newPage: "ページの作成" editPage: "ページの編集" @@ -1511,59 +1519,49 @@ _pages: section: "セクション" image: "画像" button: "ボタン" - if: "もし" _if: variable: "変数" - post: "投稿フォーム" _post: text: "内容" attachCanvasImage: "キャンバスの画像を添付する" canvasId: "キャンバスID" - textInput: "テキスト入力" _textInput: name: "変数名" text: "タイトル" default: "デフォルト値" - textareaInput: "複数行テキスト入力" _textareaInput: name: "変数名" text: "タイトル" default: "デフォルト値" - numberInput: "数値入力" _numberInput: name: "変数名" text: "タイトル" default: "デフォルト値" - canvas: "キャンバス" _canvas: id: "キャンバスID" width: "幅" height: "高さ" - - note: "ノート埋め込み" + note: "投稿の埋め込み" _note: - id: "ノートID" - idDescription: "ノートURLをペーストして設定することもできます。" + id: "投稿のID" + idDescription: "投稿のURLをペーストして設定することもできます。" detailed: "詳細な表示" - switch: "スイッチ" _switch: name: "変数名" text: "タイトル" default: "デフォルト値" - counter: "カウンター" _counter: name: "変数名" text: "タイトル" inc: "増加値" - _button: text: "タイトル" colored: "色付き" @@ -1582,14 +1580,12 @@ _pages: callAiScript: "AiScript呼び出し" _callAiScript: functionName: "関数名" - radioButton: "選択肢" _radioButton: name: "変数名" title: "タイトル" values: "改行で区切った選択肢" default: "デフォルト値" - script: categories: flow: "制御" @@ -1766,18 +1762,16 @@ _pages: enviromentVariables: "環境変数" pageVariables: "ページ要素" argVariables: "入力スロット" - _relayStatus: requesting: "承認待ち" accepted: "承認済み" rejected: "拒否済み" - _notification: fileUploaded: "ファイルがアップロードされました" youGotMention: "{name}からのメンション" youGotReply: "{name}からのリプライ" youGotQuote: "{name}による引用" - youRenoted: "{name}がRenoteしました" + youRenoted: "{name}がブーストしました" youGotPoll: "{name}が投票しました" youGotMessagingMessageFromUser: "{name}からのチャットがあります" youGotMessagingMessageFromGroup: "{name}のチャットがあります" @@ -1787,13 +1781,12 @@ _notification: youWereInvitedToGroup: "{userName}があなたをグループに招待しました" pollEnded: "アンケートの結果が出ました" emptyPushNotificationMessage: "プッシュ通知の更新をしました" - _types: all: "すべて" follow: "フォロー" mention: "メンション" reply: "リプライ" - renote: "Renote" + renote: "ブースト" quote: "引用" reaction: "リアクション" pollVote: "アンケートに投票された" @@ -1802,12 +1795,10 @@ _notification: followRequestAccepted: "フォローが受理された" groupInvited: "グループに招待された" app: "連携アプリからの通知" - _actions: followBack: "フォローバック" reply: "返信" - renote: "Renote" - + renote: "ブースト" _deck: alwaysShowMainColumn: "常にメインカラムを表示" columnAlign: "カラムの寄せ" @@ -1819,13 +1810,14 @@ _deck: swapDown: "下に移動" stackLeft: "左に重ねる" popRight: "右に出す" - profile: "プロファイル" - newProfile: "新規プロファイル" - deleteProfile: "プロファイルを削除" + profile: "ワークスペース" + newProfile: "新規ワークスペース" + renameProfile: "ワークスペース名を変更" + deleteProfile: "ワークスペースを削除" + nameAlreadyExists: "この名前のワークスペースは既に存在します。" introduction: "カラムを組み合わせて自分だけのインターフェイスを作りましょう!" introduction2: "画面の右にある + を押して、いつでもカラムを追加できます。" widgetsIntroduction: "カラムのメニューから、「ウィジェットの編集」を選択してウィジェットを追加してください" - _columns: main: "メイン" widgets: "ウィジェット" @@ -1835,3 +1827,23 @@ _deck: list: "リスト" mentions: "あなた宛て" direct: "ダイレクト" +_apps: + apps: "アプリ" + crossPlatform: "クロスプラットフォーム" + mobile: "モバイル" + firstParty: "ファーストパーティ" + firstClass: "対応度◎" + secondClass: "対応度○" + thirdClass: "対応度△" + free: "無料" + paid: "有料" + pwa: "PWAをインストール" + kaiteki: "Kaiteki" + milktea: "Milktea" + missLi: "MissLi" + mona: "Mona" + theDesk: "TheDesk" + lesskey: "Lesskey" +noteId: 投稿のID +hiddenTagsDescription: 'トレンドと「みつける」から除外したいハッシュタグを(先頭の # を除いて)改行区切りで入力してください。この設定はトレンドと「みつける」以外には影響しません。' +hiddenTags: 非表示にするハッシュタグ diff --git a/locales/pl-PL.yml b/locales/pl-PL.yml index a7cbec5b64..1c7b675c50 100644 --- a/locales/pl-PL.yml +++ b/locales/pl-PL.yml @@ -1,7 +1,8 @@ ---- _lang_: "Polski" -headlineMisskey: "Sieć połączona wpisami" -introMisskey: "Misskey jest serwisem mikroblogowym typu open source.\nMisskey to opensource'owy serwis mikroblogowy, w którym możesz tworzyć \"notatki\", aby dzielić się tym, co się dzieje i opowiadać wszystkim o sobie.\nMożesz również użyć funkcji \"Reakcje\", aby szybko dodać własne reakcje do notatek innych użytkowników👍.\nOdkrywaj nowy świat🚀!" +headlineMisskey: "Otwartoźródłowa, zdecentralizowana sieć społecznościowa, która zawsze\ + \ będzie darmowa! \U0001F680" +introMisskey: "Hej! Calckey to otwartoźródłowa oraz zdecentralizowana sieć społecznościowa,\ + \ która zawsze będzie darmowa! \U0001F680" monthAndDay: "{month}-{day}" search: "Szukaj" notifications: "Powiadomienia" @@ -13,7 +14,7 @@ ok: "OK" gotIt: "Rozumiem!" cancel: "Anuluj" enterUsername: "Wprowadź nazwę użytkownika" -renotedBy: "Udostępniono przez {user}" +renotedBy: "Podbito przez {user}" noNotes: "Brak wpisów" noNotifications: "Brak powiadomień" instance: "Instancja" @@ -23,50 +24,53 @@ otherSettings: "Pozostałe ustawienia" openInWindow: "Otwórz w oknie" profile: "Profil" timeline: "Oś czasu" -noAccountDescription: "Ten użytkownik nie napisał jeszcze swojej biografii." +noAccountDescription: "Ten użytkownik nie napisał jeszcze swojego opisu." login: "Zaloguj się" loggingIn: "Logowanie" logout: "Wyloguj się" signup: "Zarejestruj się" -uploading: "Wysyłanie" +uploading: "Wysyłanie..." save: "Zapisz" users: "Użytkownicy" addUser: "Dodaj użytkownika" favorite: "Dodaj do ulubionych" -favorites: "Ulubione" -unfavorite: "Usuń z ulubionych" -favorited: "Dodano do ulubionych." -alreadyFavorited: "Już jest w ulubionych." -cantFavorite: "Nie można dodać do ulubionych." +favorites: "Zakładki" +unfavorite: "Usuń zakładkę" +favorited: "Dodano do zakładek." +alreadyFavorited: "Już jest w zakładkach." +cantFavorite: "Nie można dodać do zakładek." pin: "Przypnij do profilu" unpin: "Odepnij z profilu" copyContent: "Skopiuj zawartość" copyLink: "Skopiuj odnośnik" delete: "Usuń" deleteAndEdit: "Usuń i edytuj" -deleteAndEditConfirm: "Czy na pewno chcesz usunąć ten wpis i zedytować go? Utracisz wszystkie reakcje, udostępnienia i odpowiedzi do tego wpisu." +deleteAndEditConfirm: "Czy na pewno chcesz usunąć ten wpis i zedytować go? Utracisz\ + \ wszystkie reakcje, podbicia i odpowiedzi do tego wpisu." addToList: "Dodaj do listy" sendMessage: "Wyślij wiadomość" copyUsername: "Kopiuj nazwę użytkownika" searchUser: "Wyszukiwanie użytkowników" reply: "Odpowiedz" loadMore: "Załaduj więcej" -showMore: "Załaduj więcej" +showMore: "Pokaż więcej" showLess: "Zamknij" -youGotNewFollower: "Zaobserwował(a) Cię" +youGotNewFollower: "Zaobserwował* Cię" receiveFollowRequest: "Otrzymano prośbę o możliwość obserwacji" followRequestAccepted: "Zaakceptowano prośbę o możliwość obserwacji" mention: "Wspomnij" mentions: "Wspomnienia" -directNotes: "Bezpośrednie wpisy" -importAndExport: "Import i eksport" +directNotes: "Bezpośrednie wiadomości" +importAndExport: "Import i eksport danych" import: "Importuj" export: "Eksportuj" files: "Pliki" download: "Pobierz" -driveFileDeleteConfirm: "Czy chcesz usunąć plik \"{name}\"? Zniknie również notatka, do której dołączony jest ten plik." +driveFileDeleteConfirm: "Czy chcesz usunąć plik \"{name}\"? Zniknie również wpis,\ + \ do której dołączony jest ten plik." unfollowConfirm: "Czy na pewno chcesz przestać obserwować {name}?" -exportRequested: "Zażądałeś eksportu. Może to zająć trochę czasu. Po zakończeniu eksportu zostanie on dodany do Twoich \"dysków\"." +exportRequested: "Zażądałeś eksportu. Może to zająć chwilę. Po zakończeniu eksportu\ + \ zostanie on dodany do Twojego dysku." importRequested: "Zażądano importu. Może to zająć chwilę." lists: "Listy" noLists: "Nie masz żadnych list" @@ -80,11 +84,12 @@ manageLists: "Zarządzaj listami" error: "Błąd" somethingHappened: "Coś poszło nie tak" retry: "Spróbuj ponownie" -pageLoadError: "Nie udało się załadować strony" -pageLoadErrorDescription: "Zwykle jest to spowodowane problemem z siecią lub cache przeglądarki. Spróbuj wyczyścić cache i sprawdź jeszcze raz za chwilę." +pageLoadError: "Nie udało się załadować strony." +pageLoadErrorDescription: "Zwykle jest to spowodowane problemem z siecią lub cache\ + \ przeglądarki. Spróbuj wyczyścić cache i sprawdź jeszcze raz za chwilę." serverIsDead: "Serwer nie odpowiada. Zaczekaj chwilę i spróbuj ponownie." -youShouldUpgradeClient: "Odśwież stronę, by zaaktualizować klienta." -enterListName: "Nazwa listy" +youShouldUpgradeClient: "Aby zobaczyć tą stronę, odśwież ją, by zaaktualizować klienta." +enterListName: "Wpisz nazwę listy" privacy: "Prywatność" makeFollowManuallyApprove: "Prośby o możliwość obserwacji wymagają zatwierdzenia" defaultNoteVisibility: "Domyślna widoczność" @@ -94,11 +99,11 @@ followRequests: "Prośby o możliwość obserwacji" unfollow: "Przestań obserwować" followRequestPending: "Oczekująca prośba o możliwość obserwacji" enterEmoji: "Wprowadź emoji" -renote: "Udostępnij" -unrenote: "Cofnij udostępnienie" -renoted: "Udostępniono." -cantRenote: "Ten wpis nie może zostać udostępniony." -cantReRenote: "Udostępnienie nie może zostać udostępnione." +renote: "Podbij" +unrenote: "Cofnij podbicie" +renoted: "Podbito." +cantRenote: "Ten wpis nie może zostać podbity." +cantReRenote: "Podbicie nie może zostać podbite." quote: "Cytuj" pinnedNote: "Przypięty wpis" pinned: "Przypnij do profilu" @@ -108,7 +113,8 @@ sensitive: "NSFW" add: "Dodaj" reaction: "Reakcja" reactionSetting: "Reakcje do pokazania w wyborniku reakcji" -reactionSettingDescription2: "Przeciągnij aby zmienić kolejność, naciśnij aby usunąć, naciśnij „+” aby dodać" +reactionSettingDescription2: "Przeciągnij aby zmienić kolejność, naciśnij aby usunąć,\ + \ naciśnij „+” aby dodać." rememberNoteVisibility: "Zapamiętuj ustawienia widoczności wpisu" attachCancel: "Usuń załącznik" markAsSensitive: "Oznacz jako NSFW" @@ -125,7 +131,7 @@ unblockConfirm: "Czy na pewno chcesz odblokować to konto?" suspendConfirm: "Czy na pewno chcesz zawiesić to konto?" unsuspendConfirm: "Czy na pewno chcesz cofnąć zawieszenie tego konta?" selectList: "Wybierz listę" -selectAntenna: "Wybierz Antennę" +selectAntenna: "Wybierz antenę" selectWidget: "Wybierz widżet" editWidgets: "Edytuj widżety" editWidgetsExit: "Gotowe" @@ -137,13 +143,19 @@ emojiUrl: "Adres URL emoji" addEmoji: "Dodaj emoji" settingGuide: "Proponowana konfiguracja" cacheRemoteFiles: "Przechowuj zdalne pliki w pamięci podręcznej" -cacheRemoteFilesDescription: "Gdy ta opcja jest wyłączona, zdalne pliki są ładowane bezpośrednio ze zdalnych instancji. Wyłączenie the opcji zmniejszy użycie powierzchni dyskowej, ale zwiększy transfer, ponieważ miniaturki nie będą generowane." +cacheRemoteFilesDescription: "Gdy ta opcja jest wyłączona, zdalne pliki są ładowane\ + \ bezpośrednio ze zdalnych instancji. Wyłączenie the opcji zmniejszy użycie powierzchni\ + \ dyskowej, ale zwiększy transfer, ponieważ miniaturki nie będą generowane." flagAsBot: "To konto jest botem" -flagAsBotDescription: "Jeżeli ten kanał jest kontrolowany przez jakiś program, ustaw tę opcję. Jeżeli włączona, będzie działać jako flaga informująca innych programistów, aby zapobiegać nieskończonej interakcji z różnymi botami i dostosowywać wewnętrzne systemy Misskey, traktując konto jako bota." -flagAsCat: "To konto jest kotem" -flagAsCatDescription: "Przełącz tę opcję, aby konto było oznaczone jako kot." +flagAsBotDescription: "Jeżeli ten kanał jest kontrolowany przez jakiś program, ustaw\ + \ tę opcję. Jeżeli włączona, będzie działać jako flaga informująca innych programistów,\ + \ aby zapobiegać nieskończonej interakcji z różnymi botami i dostosowywać wewnętrzne\ + \ systemy Calckey, traktując konto jako bota." +flagAsCat: "Czy jesteś kotem? \U0001F63A" +flagAsCatDescription: "Dostaniesz kocie uszka, oraz będziesz mówić jak kot!" flagShowTimelineReplies: "Pokazuj odpowiedzi na osi czasu" -autoAcceptFollowed: "Automatycznie przyjmuj prośby o możliwość obserwacji od użytkowników, których obserwujesz" +autoAcceptFollowed: "Automatycznie przyjmuj prośby o możliwość obserwacji od użytkowników,\ + \ których obserwujesz" addAccount: "Dodaj konto" loginFailed: "Nie udało się zalogować" showOnRemote: "Zobacz na zdalnej instancji" @@ -157,7 +169,7 @@ followConfirm: "Czy na pewno chcesz zaobserwować {name}?" proxyAccount: "Konto proxy" host: "Host" selectUser: "Wybierz użytkownika" -recipient: "Odbiorca" +recipient: "Odbiorca(-y)" annotation: "Komentarze" federation: "Federacja" instances: "Instancja" @@ -175,7 +187,7 @@ operations: "Działania" software: "Oprogramowanie" version: "Wersja" metadata: "Metadane" -withNFiles: "{n} plik(i)" +withNFiles: "{n} plik(i/ów)" monitor: "Monitor" jobQueue: "Kolejka zadań" cpuAndMemory: "CPU i pamięć" @@ -185,21 +197,24 @@ instanceInfo: "Informacje o instancji" statistics: "Statystyki" clearQueue: "Wyczyść kolejkę" clearQueueConfirmTitle: "Czy na pewno chcesz wyczyścić kolejkę?" -clearQueueConfirmText: "Wszystkie niewysłane wpisy z kolejki nie zostaną wysłane. Zwykle to nie jest konieczne." +clearQueueConfirmText: "Wszystkie niewysłane wpisy z kolejki nie zostaną wysłane.\ + \ Zwykle to nie jest konieczne." clearCachedFiles: "Wyczyść pamięć podręczną" -clearCachedFilesConfirm: "Czy na pewno chcesz usunąć wszystkie zdalne pliki z pamięci podręcznej?" +clearCachedFilesConfirm: "Czy na pewno chcesz usunąć wszystkie zdalne pliki z pamięci\ + \ podręcznej?" blockedInstances: "Zablokowane instancje" -blockedInstancesDescription: "Wypisz nazwy hostów instancji, które powinny zostać zablokowane. Wypisane instancje nie będą mogły dłużej komunikować się z tą instancją." -muteAndBlock: "Wycisz / Zablokuj" +blockedInstancesDescription: "Wypisz nazwy hostów instancji, które powinny zostać\ + \ zablokowane. Wypisane instancje nie będą mogły dłużej komunikować się z tą instancją." +muteAndBlock: "Wyciszenia i blokady" mutedUsers: "Wyciszeni użytkownicy" blockedUsers: "Zablokowani użytkownicy" noUsers: "Brak użytkowników" editProfile: "Edytuj profil" noteDeleteConfirm: "Czy na pewno chcesz usunąć ten wpis?" -pinLimitExceeded: "Nie możesz przypiąć więcej wpisów." -intro: "Zakończono instalację Misskey! Utwórz konto administratora." +pinLimitExceeded: "Nie możesz przypiąć więcej wpisów" +intro: "Zakończono instalację Calckey! Utwórz konto administratora." done: "Gotowe" -processing: "Przetwarzanie" +processing: "Przetwarzanie..." preview: "Podgląd" default: "Domyślne" defaultValueIs: "Domyślne: {value}" @@ -253,7 +268,8 @@ agreeTo: "Wyrażam zgodę na {0}" tos: "Regulamin" start: "Rozpocznij" home: "Strona główna" -remoteUserCaution: "Te informacje mogą nie być aktualne, ponieważ użytkownik pochodzi ze zdalnej instancji." +remoteUserCaution: "Te informacje mogą nie być aktualne, ponieważ użytkownik pochodzi\ + \ ze zdalnej instancji." activity: "Aktywność" images: "Zdjęcia" birthday: "Data urodzenia" @@ -286,7 +302,8 @@ unableToDelete: "Nie można usunąć" inputNewFileName: "Wprowadź nową nazwę pliku" inputNewDescription: "Proszę wpisać nowy napis" inputNewFolderName: "Wprowadź nową nazwę katalogu" -circularReferenceFolder: "Katalog docelowy jest podkatalogiem katalogu, który chcesz przenieść." +circularReferenceFolder: "Katalog docelowy jest podkatalogiem katalogu, który chcesz\ + \ przenieść." hasChildFilesOrFolders: "Ponieważ ten katalog nie jest pusty, nie może być usunięty." copyUrl: "Skopiuj adres URL" rename: "Zmień nazwę" @@ -294,7 +311,7 @@ avatar: "Awatar" banner: "Baner" nsfw: "NSFW" whenServerDisconnected: "Po utracie połączenia z serwerem" -disconnectedFromServer: "Utracono połączenie z serwerem." +disconnectedFromServer: "Utracono połączenie z serwerem" reload: "Odśwież" doNothing: "Ignoruj" reloadConfirm: "Czy chcesz odświeżyć oś czasu?" @@ -315,12 +332,13 @@ dayX: "{day}" monthX: "{month}" yearX: "{year}" pages: "Strony" -integration: "Integracja" +integration: "Integracje" connectService: "Połącz" disconnectService: "Rozłącz" enableLocalTimeline: "Włącz lokalną oś czasu" enableGlobalTimeline: "Włącz globalną oś czasu" -disablingTimelinesInfo: "Administratorzy i moderatorzy będą zawsze mieć dostęp do wszystkich osi czasu, nawet gdy są one wyłączone." +disablingTimelinesInfo: "Administratorzy i moderatorzy będą zawsze mieć dostęp do\ + \ wszystkich osi czasu, nawet gdy są one wyłączone." registration: "Zarejestruj się" enableRegistration: "Włącz rejestrację nowych użytkowników" invite: "Zaproś" @@ -332,9 +350,11 @@ bannerUrl: "Adres URL banera" backgroundImageUrl: "Adres URL tła" basicInfo: "Podstawowe informacje" pinnedUsers: "Przypięty użytkownik" -pinnedUsersDescription: "Wypisz po jednej nazwie użytkownika w wierszu. Podani użytkownicy zostaną przypięci pod kartą „Eksploruj”." +pinnedUsersDescription: "Wypisz po jednej nazwie użytkownika w wierszu. Podani użytkownicy\ + \ zostaną przypięci pod kartą „Eksploruj”." pinnedPages: "Przypięte strony" -pinnedPagesDescription: "Wprowadź ścieżki stron które chcesz przypiąć na głównej stronie instancji, oddzielone znakiem nowego wiersza." +pinnedPagesDescription: "Wprowadź ścieżki stron które chcesz przypiąć na głównej stronie\ + \ instancji, oddzielone znakiem nowego wiersza." pinnedClipId: "ID przypiętego klipu" pinnedNotes: "Przypięty wpis" hcaptcha: "hCaptcha" @@ -345,17 +365,19 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "Włącz reCAPTCHA" recaptchaSiteKey: "Klucz strony" recaptchaSecretKey: "Tajny klucz" -avoidMultiCaptchaConfirm: "Używanie wielu Captchy może spowodować zakłócenia. Czy chcesz wyłączyć inną Captchę? Możesz zostawić wiele jednocześnie, klikając Anuluj." +avoidMultiCaptchaConfirm: "Używanie wielu Captchy może spowodować zakłócenia. Czy\ + \ chcesz wyłączyć inną Captchę? Możesz zostawić wiele jednocześnie, klikając Anuluj." antennas: "Anteny" -manageAntennas: "Zarządzaj Antenami" +manageAntennas: "Zarządzaj antenami" name: "Nazwa" -antennaSource: "Źródło Anteny" +antennaSource: "Źródło anteny" antennaKeywords: "Słowa kluczowe do obserwacji" antennaExcludeKeywords: "Wykluczone słowa kluczowe" -antennaKeywordsDescription: "Oddziel spacjami dla warunku AND, albo wymuś koniec linii dla warunku OR" +antennaKeywordsDescription: "Oddziel spacjami dla warunku AND, albo wymuś koniec linii\ + \ dla warunku OR." notifyAntenna: "Powiadamiaj o nowych wpisach" withFileAntenna: "Filtruj tylko wpisy z załączonym plikiem" -enableServiceworker: "Włącz ServiceWorker" +enableServiceworker: "Włącz powiadomienia push dla twojej przeglądarki" antennaUsersDescription: "Wypisz po jednej nazwie użytkownika w linii" caseSensitive: "Wielkość liter ma znaczenie" withReplies: "Uwzględnij odpowiedzi" @@ -375,7 +397,7 @@ exploreFediverse: "Eksploruj Fediwersum" popularTags: "Tagi na czasie" userList: "Listy" about: "Informacje" -aboutMisskey: "O Misskey" +aboutMisskey: "O Calckey" administrator: "Admin" token: "Token" twoStepAuthentication: "Uwierzytelnianie dwuskładnikowe" @@ -402,7 +424,7 @@ markAsReadAllTalkMessages: "Oznacz wszystkie wiadomości jako przeczytane" help: "Pomoc" inputMessageHere: "Wprowadź wiadomość tutaj" close: "Zamknij" -group: "Grupy" +group: "Grupa" groups: "Grupy" createGroup: "Utwórz grupę" ownedGroups: "Posiadane grupy" @@ -428,10 +450,10 @@ onlyOneFileCanBeAttached: "Możesz załączyć tylko jeden plik do wiadomości" signinRequired: "Proszę się zalogować" invitations: "Zaproś" invitationCode: "Kod zaproszenia" -checking: "Sprawdzam" +checking: "Sprawdzam..." available: "Dostępna" unavailable: "Niedostępna" -usernameInvalidFormat: "może zawierać litery, cyfry i podkreślniki." +usernameInvalidFormat: "Nazwa użytkownika może zawierać litery, cyfry i podkreślniki." tooShort: "Zbyt krótka" tooLong: "Zbyt długa" weakPassword: "Słabe hasło" @@ -440,7 +462,8 @@ strongPassword: "Silne hasło" passwordMatched: "Pasuje" passwordNotMatched: "Hasła nie pasują do siebie" signinWith: "Zaloguj się z {x}" -signinFailed: "Nie udało się zalogować. Wprowadzona nazwa użytkownika lub hasło są nieprawidłowe." +signinFailed: "Nie udało się zalogować. Wprowadzona nazwa użytkownika lub hasło są\ + \ nieprawidłowe." tapSecurityKey: "Wybierz swój klucz bezpieczeństwa" or: "Lub" language: "Język" @@ -486,13 +509,18 @@ objectStorageBucketDesc: "Podaj nazwę „wiadra” używaną przez konfigurowan objectStoragePrefix: "Prefiks" objectStoragePrefixDesc: "Pliki będą przechowywane w katalogu z tym prefiksem." objectStorageEndpoint: "Punkt końcowy" -objectStorageEndpointDesc: "Pozostaw puste jeżeli używasz AWS S3, w innym wypadku określ punkt końcowy jako '' lub ':' zgodnie z instrukcjami usługi, której używasz." +objectStorageEndpointDesc: "Pozostaw puste jeżeli używasz AWS S3, w innym wypadku\ + \ określ punkt końcowy jako '' lub ':' zgodnie z instrukcjami\ + \ usługi, której używasz." objectStorageRegion: "Region" -objectStorageRegionDesc: "Określ region, np. 'xx-east-1'. Jeżeli usługa której używasz nie zawiera rozróżnienia regionów, pozostaw to pustym lub wprowadź 'us-east-1'." +objectStorageRegionDesc: "Określ region, np. 'xx-east-1'. Jeżeli usługa której używasz\ + \ nie zawiera rozróżnienia regionów, pozostaw to pustym lub wprowadź 'us-east-1'." objectStorageUseSSL: "Użyj SSL" -objectStorageUseSSLDesc: "Wyłącz, jeżeli nie zamierzasz używać HTTPS dla połączenia z API" +objectStorageUseSSLDesc: "Wyłącz, jeżeli nie zamierzasz używać HTTPS dla połączenia\ + \ z API" objectStorageUseProxy: "Połącz przez proxy" -objectStorageUseProxyDesc: "Wyłącz, jeżeli nie zamierzasz używać proxy dla połączenia z pamięcią blokową" +objectStorageUseProxyDesc: "Wyłącz, jeżeli nie zamierzasz używać proxy dla połączenia\ + \ z pamięcią blokową" serverLogs: "Dziennik zdarzeń" deleteAll: "Usuń wszystkie" showFixedPostForm: "Wyświetlaj formularz tworzenia wpisu w górnej części osi czasu" @@ -506,7 +534,7 @@ volume: "Głośność" masterVolume: "Głośność główna" details: "Szczegóły" chooseEmoji: "Wybierz emoji" -unableToProcess: "Nie udało się dokończyć działania." +unableToProcess: "Nie udało się dokończyć działania" recentUsed: "Ostatnio używane" install: "Zainstaluj" uninstall: "Odinstaluj" @@ -519,18 +547,22 @@ sort: "Sortuj" ascendingOrder: "Rosnąco" descendingOrder: "Malejąco" scratchpad: "Brudnopis" -scratchpadDescription: "Brudnopis zawiera eksperymentalne środowisko dla AiScript. Możesz pisać, wykonywać i sprawdzać wyniki w interakcji z Misskey." +scratchpadDescription: "Brudnopis to środowisko dla eksperymentów z AiScript. Możesz\ + \ pisać, wykonywać i sprawdzać wyniki interakcji skryptu z Calckey." output: "Wyjście" script: "Skrypt" disablePagesScript: "Wyłącz AiScript na Stronach" updateRemoteUser: "Aktualizuj zdalne dane o użytkowniku" deleteAllFiles: "Usuń wszystkie pliki" deleteAllFilesConfirm: "Czy na pewno chcesz usunąć wszystkie pliki?" -removeAllFollowingDescription: "Przestań obserwować wszystkie konta z {host}. Wykonaj to, jeżeli instancja już nie istnieje." +removeAllFollowingDescription: "Przestań obserwować wszystkie konta z {host}. Wykonaj\ + \ to, jeżeli instancja już nie istnieje." userSuspended: "To konto zostało zawieszone." userSilenced: "Ten użytkownik został wyciszony." yourAccountSuspendedTitle: "To konto jest zawieszone" -yourAccountSuspendedDescription: "To konto zostało zawieszone z powodu złamania regulaminu serwera lub innych podobnych. Skontaktuj się z administratorem, jeśli chciałbyś poznać bardziej szczegółowy powód. Proszę nie zakładać nowego konta." +yourAccountSuspendedDescription: "To konto zostało zawieszone z powodu złamania regulaminu\ + \ serwera lub innych podobnych. Skontaktuj się z administratorem, jeśli chciałbyś\ + \ poznać bardziej szczegółowy powód. Proszę nie zakładać nowego konta." menu: "Menu" divider: "Rozdzielacz" addItem: "Dodaj element" @@ -569,12 +601,14 @@ permission: "Uprawnienia" enableAll: "Włącz wszystko" disableAll: "Wyłącz wszystko" tokenRequested: "Przydziel dostęp do konta" -pluginTokenRequestedDescription: "Ta wtyczka będzie mogła korzystać z ustawionych tu uprawnień." +pluginTokenRequestedDescription: "Ta wtyczka będzie mogła korzystać z ustawionych\ + \ tu uprawnień." notificationType: "Rodzaj powiadomień" edit: "Edytuj" emailServer: "Serwer poczty e-mail" enableEmail: "Włącz dostarczanie wiadomości e-mail" -emailConfigInfo: "Wykorzystywany do potwierdzenia adresu e-mail w trakcie rejestracji, lub gdy zapomnisz hasła" +emailConfigInfo: "Wykorzystywany do potwierdzenia adresu e-mail w trakcie rejestracji,\ + \ lub gdy zapomnisz hasła" email: "Adres e-mail" emailAddress: "Adres e-mail" smtpConfig: "Konfiguracja serwera SMTP" @@ -582,12 +616,13 @@ smtpHost: "Host" smtpPort: "Port" smtpUser: "Nazwa użytkownika" smtpPass: "Hasło" -emptyToDisableSmtpAuth: "Pozostaw adres e-mail i hasło puste, aby wyłączyć weryfikację SMTP" +emptyToDisableSmtpAuth: "Pozostaw adres e-mail i hasło puste, aby wyłączyć weryfikację\ + \ SMTP" smtpSecureInfo: "Wyłącz, jeżeli używasz STARTTLS" testEmail: "Przetestuj dostarczanie wiadomości e-mail" wordMute: "Wyciszenie słowa" instanceMute: "Wyciszone instancje" -userSaysSomething: "{name} powiedział(-a) coś" +userSaysSomething: "{name} powiedział* coś" makeActive: "Aktywuj" display: "Wyświetlanie" copy: "Kopiuj" @@ -599,12 +634,14 @@ database: "Baza danych" channel: "Kanały" create: "Utwórz" notificationSetting: "Ustawienia powiadomień" -notificationSettingDesc: "Wybierz rodzaj powiadomień do wyświetlania" +notificationSettingDesc: "Wybierz rodzaj powiadomień do wyświetlania." useGlobalSetting: "Użyj globalnych ustawień" -useGlobalSettingDesc: "Jeżeli włączone, zostaną wykorzystane ustawienia powiadomień Twojego konta. Jeżeli wyłączone, mogą zostać wykonane oddzielne konfiguracje." +useGlobalSettingDesc: "Jeżeli włączone, zostaną wykorzystane ustawienia powiadomień\ + \ Twojego konta. Jeżeli wyłączone, mogą zostać wykonane oddzielne konfiguracje." other: "Inne" regenerateLoginToken: "Generuj token logowania ponownie" -regenerateLoginTokenDescription: "Regeneruje token używany wewnętrznie podczas logowania. Zazwyczaj nie jest to konieczne. Po regeneracji wszystkie urządzenia zostaną wylogowane." +regenerateLoginTokenDescription: "Regeneruje token używany wewnętrznie podczas logowania.\ + \ Zazwyczaj nie jest to konieczne. Po regeneracji wszystkie urządzenia zostaną wylogowane." setMultipleBySeparatingWithSpace: "Możesz ustawić wiele, oddzielając je spacjami." fileIdOrUrl: "ID pliku albo URL" behavior: "Zachowanie" @@ -612,10 +649,11 @@ sample: "Przykład" abuseReports: "Zgłoszenia" reportAbuse: "Zgłoś" reportAbuseOf: "Zgłoś {name}" -fillAbuseReportDescription: "Wypełnij szczegóły zgłoszenia. Jeżeli dotyczy ono określonego wpisu, uwzględnij jego adres URL." +fillAbuseReportDescription: "Wypełnij szczegóły zgłoszenia. Jeżeli dotyczy ono określonego\ + \ wpisu, uwzględnij jego adres URL." abuseReported: "Twoje zgłoszenie zostało wysłane. Dziękujemy." -reporteeOrigin: "Pochodzenie zgłoszonego" -reporterOrigin: "Pochodzenie zgłaszającego" +reporteeOrigin: "Pochodzenie osoby zgłoszonej" +reporterOrigin: "Pochodzenie osoby zgłaszającej" forwardReport: "Przekaż zgłoszenie do innej instancji" send: "Wyślij" abuseMarkAsResolved: "Oznacz zgłoszenie jako rozwiązane" @@ -627,23 +665,25 @@ instanceTicker: "Informacje o wpisach instancji" waitingFor: "Oczekiwanie na {x}" random: "Losowe" system: "System" -switchUi: "Przełącz interfejs użytkownika" +switchUi: "Layout" desktop: "Pulpit" clip: "Klip" createNew: "Utwórz nowy" optional: "Nieobowiązkowe" createNewClip: "Utwórz nowy klip" unclip: "Odczep" -confirmToUnclipAlreadyClippedNote: "Ten wpis jest już częścią klipu \"{name}\". Czy chcesz ją usunąć z tego klipu?" +confirmToUnclipAlreadyClippedNote: "Ten wpis jest już częścią klipu \"{name}\". Czy\ + \ chcesz ją usunąć z tego klipu?" public: "Publiczny" -i18nInfo: "Calckey jest tłumaczone na wiele języków przez wolontariuszy. Możesz pomóc na {link}." +i18nInfo: "Calckey jest tłumaczone na wiele języków przez wolontariuszy. Możesz pomóc\ + \ na {link}." manageAccessTokens: "Zarządzaj tokenami dostępu" accountInfo: "Informacje o koncie" notesCount: "Liczba wpisów" repliesCount: "Liczba wysłanych odpowiedzi" -renotesCount: "Liczba wysłanych udostępnień" +renotesCount: "Liczba wysłanych podbić" repliedCount: "Liczba otrzymanych odpowiedzi" -renotedCount: "Liczba otrzymanych udostępnień" +renotedCount: "Liczba otrzymanych podbić" followingCount: "Liczba obserwowanych kont" followersCount: "Liczba obserwujących" sentReactionsCount: "Liczba wysłanych reakcji" @@ -655,15 +695,19 @@ no: "Nie" driveFilesCount: "Liczba plików na dysku" driveUsage: "Użycie przestrzeni dyskowej" noCrawle: "Odrzuć indeksowanie przez crawlery" -noCrawleDescription: "Proś wyszukiwarki internetowe, aby nie indeksowały Twojego profilu, wpisów, stron itd." -lockedAccountInfo: "Dopóki nie ustawisz widoczności wpisu na \"Obserwujący\", twoje wpisy będą mogli widzieć wszyscy, nawet jeśli ustawisz manualne zatwierdzanie obserwujących." +noCrawleDescription: "Proś wyszukiwarki internetowe, aby nie indeksowały Twojego profilu,\ + \ wpisów, stron itd." +lockedAccountInfo: "Dopóki nie ustawisz widoczności wpisu na \"Obserwujący\", twoje\ + \ wpisy będą mogli widzieć wszyscy, nawet jeśli ustawisz manualne zatwierdzanie\ + \ obserwujących." alwaysMarkSensitive: "Oznacz domyślnie jako NSFW" loadRawImages: "Wyświetlaj zdjęcia w załącznikach w całości zamiast miniatur" disableShowingAnimatedImages: "Nie odtwarzaj animowanych obrazów" -verificationEmailSent: "Wiadomość weryfikacyjna została wysłana. Odwiedź uwzględniony odnośnik, aby ukończyć weryfikację." +verificationEmailSent: "Wiadomość weryfikacyjna została wysłana. Odwiedź uwzględniony\ + \ odnośnik, aby ukończyć weryfikację." notSet: "Nie ustawiono" emailVerified: "Adres e-mail został potwierdzony" -noteFavoritesCount: "Liczba polubionych wpisów" +noteFavoritesCount: "Liczba zakładek" pageLikesCount: "Liczba otrzymanych polubień stron" pageLikedCount: "Liczba polubionych stron" contact: "Kontakt" @@ -672,15 +716,17 @@ clips: "Klipy" experimentalFeatures: "Eksperymentalne funkcje" developer: "Programista" makeExplorable: "Pokazuj konto na stronie „Eksploruj”" -makeExplorableDescription: "Jeżeli wyłączysz tę opcję, Twoje konto nie będzie wyświetlać się w sekcji „Eksploruj”." -showGapBetweenNotesInTimeline: "Pokazuj odstęp między wpisami na osi czasu." +makeExplorableDescription: "Jeżeli wyłączysz tę opcję, Twoje konto nie będzie wyświetlać\ + \ się w sekcji „Eksploruj”." +showGapBetweenNotesInTimeline: "Pokazuj odstęp między wpisami na osi czasu" duplicate: "Duplikuj" left: "Lewo" -center: "Wyśsrodkuj" +center: "Wyśrodkuj" wide: "Szerokie" narrow: "Wąskie" -reloadToApplySetting: "To ustawienie zostanie zastosowane po odświeżeniu strony. Chcesz odświeżyć?" -needReloadToApply: "To ustawienie zostanie zastosowane po odświeżeniu strony" +reloadToApplySetting: "To ustawienie zostanie zastosowane po odświeżeniu strony. Chcesz\ + \ odświeżyć?" +needReloadToApply: "To ustawienie zostanie zastosowane po odświeżeniu strony." showTitlebar: "Pokazuj pasek tytułowy" clearCache: "Wyczyść pamięć podręczną" onlineUsersCount: "{n} osób jest online" @@ -715,7 +761,7 @@ emailNotification: "Powiadomienia e-mail" publish: "Publikuj" inChannelSearch: "Szukaj na kanale" useReactionPickerForContextMenu: "Otwórz wybornik reakcji prawym kliknięciem" -typingUsers: "{users} pisze" +typingUsers: "{users} pisze/ą" jumpToSpecifiedDate: "Przejdź do określonej daty" showingPastTimeline: "Obecnie wyświetla starą oś czasu" clear: "Wróć" @@ -725,14 +771,17 @@ unlikeConfirm: "Na pewno chcesz usunąć polubienie?" fullView: "Pełny widok" quitFullView: "Opuść pełny widok" addDescription: "Dodaj opis" -userPagePinTip: "Możesz wyświetlać wpisy w tym miejscu po wybraniu \"Przypnij do profilu\" z menu pojedyńczego wpisu" -notSpecifiedMentionWarning: "Ten wpis zawiera wzmianki o użytkownikach niezawartych jako odbiorcy" +userPagePinTip: "Możesz wyświetlać wpisy w tym miejscu po wybraniu \"Przypnij do profilu\"\ + \ z menu pojedynczego wpisu." +notSpecifiedMentionWarning: "Ten wpis zawiera wzmianki o użytkownikach niezawartych\ + \ jako odbiorcy" info: "Informacje" userInfo: "Informacje o użykowniku" unknown: "Nieznane" onlineStatus: "Status online" hideOnlineStatus: "Ukryj status online" -hideOnlineStatusDescription: "Ukrywanie statusu online ogranicza wygody niektórych funkcji, tj. wyszukiwanie" +hideOnlineStatusDescription: "Ukrywanie statusu online ogranicza wygody niektórych\ + \ funkcji, takich jak wyszukiwanie." online: "Online" active: "Aktywny" offline: "Offline" @@ -763,27 +812,30 @@ priority: "Priorytet" high: "Wysoki" middle: "Średnie" low: "Niski" -emailNotConfiguredWarning: "Nie podano adresu e-mail" +emailNotConfiguredWarning: "Nie podano adresu e-mail." ratio: "Stosunek" previewNoteText: "Pokaż podgląd" customCss: "Własny CSS" -customCssWarn: "Używaj tego ustawienia tylko wtedy, gdy wiesz co ono robi. Nieprawidłowe wpisy mogą spowodować, że klient przestanie działać poprawnie." +customCssWarn: "Używaj tego ustawienia tylko wtedy, gdy wiesz co ono robi. Nieprawidłowe\ + \ wpisy mogą spowodować, że klient przestanie działać poprawnie." global: "Globalna" squareAvatars: "Wyświetlaj kwadratowe awatary" -sent: "Wyślij" +sent: "Wysłane" received: "Otrzymane" searchResult: "Wyniki wyszukiwania" hashtags: "Hashtag" troubleshooting: "Rozwiązywanie problemów" useBlurEffect: "Użyj efektów rozmycia w UI" learnMore: "Dowiedz się więcej" -misskeyUpdated: "Misskey zostało zaktualizowane!" +misskeyUpdated: "Calckey zostało zaktualizowane!" whatIsNew: "Pokaż zmiany" translate: "Przetłumacz" translatedFrom: "Przetłumaczone z {x}" accountDeletionInProgress: "Trwa usuwanie konta" -usernameInfo: "Nazwa, która identyfikuje Twoje konto spośród innych na tym serwerze. Możesz użyć alfabetu (a~z, A~Z), cyfr (0~9) lub podkreślników (_). Nazwy użytkownika nie mogą być później zmieniane." -aiChanMode: "Tryb Ai" +usernameInfo: "Nazwa, która identyfikuje Twoje konto spośród innych na tym serwerze.\ + \ Możesz użyć alfabetu (a~z, A~Z), cyfr (0~9) lub podkreślników (_). Nazwy użytkownika\ + \ nie mogą być później zmieniane." +aiChanMode: "Ai-chan w klasycznym interfejsie" keepCw: "Zostaw ostrzeżenia o zawartości" pubSub: "Konta Pub/Sub" resolved: "Rozwiązane" @@ -795,21 +847,24 @@ unread: "Nieodczytane" filter: "Filtr" controlPanel: "Panel sterowania" manageAccounts: "Zarządzaj kontami" -makeReactionsPublic: "Ustawić historię reakcji jako publiczną" -makeReactionsPublicDescription: "To spowoduje, że lista wszystkich Twoich dotychczasowych reakcji będzie publicznie widoczna." +makeReactionsPublic: "Ustaw historię reakcji jako publiczną" +makeReactionsPublicDescription: "To spowoduje, że lista wszystkich Twoich dotychczasowych\ + \ reakcji będzie publicznie widoczna." classic: "Klasyczny" muteThread: "Wycisz wątek" unmuteThread: "Wyłącz wyciszenie wątku" ffVisibility: "Widoczność obserwowanych/obserwujących" -ffVisibilityDescription: "Pozwala skonfigurować, kto może zobaczyć, kogo obserwujesz i kto Cię obserwuje." -continueThread: "Pokaż kontynuację wątku" +ffVisibilityDescription: "Pozwala skonfigurować, kto może zobaczyć, kogo obserwujesz\ + \ i kto Cię obserwuje." +continueThread: "Kontynuuj wątek" deleteAccountConfirm: "Spowoduje to nieodwracalne usunięcie Twojego konta. Kontynuować?" incorrectPassword: "Nieprawidłowe hasło." voteConfirm: "Potwierdzić swój głos na \"{choice}\"?" hide: "Ukryj" leaveGroup: "Opuść grupę" leaveGroupConfirm: "Czy na pewno chcesz opuścić \"{name}\"?" -useDrawerReactionPickerForMobile: "Wyświetlaj wybornik reakcji jako szufladę na urządzeniach mobilnych" +useDrawerReactionPickerForMobile: "Wyświetlaj wybornik reakcji jako szufladę na urządzeniach\ + \ mobilnych" welcomeBackWithName: "Witaj z powrotem, {name}" clickToFinishEmailVerification: "Kliknij [{ok}], aby zakończyć weryfikację e-mail." overridedDeviceKind: "Typ urządzenia" @@ -819,7 +874,7 @@ auto: "Automatycznie" size: "Rozmiar" numberOfColumn: "Liczba kolumn" searchByGoogle: "Szukaj" -indefinitely: "Nigdy" +indefinitely: "Dożywotnio" file: "Pliki" logoutConfirm: "Czy na pewno chcesz się wylogować?" lastActiveDate: "Ostatnio użyte w" @@ -830,19 +885,34 @@ colored: "Kolorowe" label: "Etykieta" type: "Typ" speed: "Prędkość" -localOnly: "Lokalne tylko" +localOnly: "Tylko lokalne" failedToUpload: "Przesyłanie nie powiodło się" -cannotUploadBecauseInappropriate: "Nie można przesłać tego pliku, ponieważ jego części zostały wykryte jako potencjalnie nieodpowiednie." -cannotUploadBecauseNoFreeSpace: "Przesyłanie nie powiodło się z powodu braku miejsca na dysku." +cannotUploadBecauseInappropriate: "Nie można przesłać tego pliku, ponieważ jego części\ + \ zostały wykryte jako potencjalnie nieodpowiednie." +cannotUploadBecauseNoFreeSpace: "Przesyłanie nie powiodło się z powodu braku miejsca\ + \ na dysku." beta: "Beta" enableAutoSensitive: "Automatyczne oznaczanie NSFW" -enableAutoSensitiveDescription: "Umożliwia automatyczne wykrywanie i oznaczanie zawartości NSFW za pomocą uczenia maszynowego. Nawet jeśli ta opcja jest wyłączona, może być włączona w całej instancji." +enableAutoSensitiveDescription: "Umożliwia automatyczne wykrywanie i oznaczanie zawartości\ + \ NSFW za pomocą uczenia maszynowego. Nawet jeśli ta opcja jest wyłączona, może\ + \ być włączona na całej instancji." navbar: "Pasek nawigacyjny" account: "Konta" move: "Przenieś" _sensitiveMediaDetection: - description: "Zmniejsza wysiłek związany z moderacją serwera dzięki automatycznemu rozpoznawaniu zawartości NSFW za pomocą uczenia maszynowego. To nieznacznie zwiększy obciążenie serwera." + description: "Zmniejsza wysiłek związany z moderacją serwera dzięki automatycznemu\ + \ rozpoznawaniu zawartości NSFW za pomocą uczenia maszynowego. To nieznacznie\ + \ zwiększy obciążenie serwera." setSensitiveFlagAutomatically: "Oznacz jako NSFW" + sensitivity: Czułość wykrywania + analyzeVideosDescription: Analizuje filmy, w dodatku do zdjęć. Zwiększy to nieznacznie + zużycie serwera. + sensitivityDescription: Zmniejszenie czułości doprowadzi do mniejszej liczby błędnych + wykryć (fałszywie pozytywnych), podczas gdy zwiększenie czułości doprowadzi do + mniejszej liczby brakujących wykryć (fałszywie negatywnych). + setSensitiveFlagAutomaticallyDescription: Wyniki wykrywania wewnętrznego zostaną + zachowane, nawet jeśli ta opcja jest wyłączona. + analyzeVideos: Włącz analizę filmów _emailUnavailable: used: "Ten adres e-mail jest już używany" format: "Format tego adresu e-mail jest nieprawidłowy" @@ -856,11 +926,15 @@ _ffVisibility: _signup: almostThere: "Prawie na miejscu" emailAddressInfo: "Podaj swój adres e-mail. Nie zostanie on upubliczniony." - emailSent: "E-mail z potwierdzeniem został wysłany na Twój adres e-mail ({email}). Kliknij dołączony link, aby dokończyć tworzenie konta." + emailSent: "E-mail z potwierdzeniem został wysłany na Twój adres e-mail ({email}).\ + \ Kliknij dołączony link, aby dokończyć tworzenie konta." _accountDelete: accountDelete: "Usuń konto" - mayTakeTime: "Ponieważ usuwanie konta jest procesem wymagającym dużej ilości zasobów, jego ukończenie może zająć trochę czasu, w zależności od ilości utworzonej zawartości i liczby przesłanych plików." - sendEmail: "Po zakończeniu usuwania konta na adres e-mail zarejestrowany na tym koncie zostanie wysłana wiadomość e-mail." + mayTakeTime: "Ponieważ usuwanie konta jest procesem wymagającym dużej ilości zasobów,\ + \ jego ukończenie może zająć trochę czasu, w zależności od ilości utworzonej zawartości\ + \ i liczby przesłanych plików." + sendEmail: "Po zakończeniu usuwania konta na adres e-mail zarejestrowany na tym\ + \ koncie zostanie wysłana wiadomość e-mail." requestAccountDelete: "Poproś o usunięcie konta" started: "Usuwanie się rozpoczęło." inProgress: "Usuwanie jest obecnie w toku" @@ -868,9 +942,12 @@ _ad: back: "Wróć" reduceFrequencyOfThisAd: "Pokazuj tę reklamę rzadziej" _forgotPassword: - enterEmail: "Wpisz adres e-mail użyty do rejestracji. Zostanie do niego wysłany link, za pomocą którego możesz zresetować hasło." - ifNoEmail: "Jeżeli nie podano adresu e-mail podczas rejestracji, skontaktuj się z administratorem zamiast tego." - contactAdmin: "Jeżeli Twoja instancja nie obsługuje adresów e-mail, skontaktuj się zamiast tego z administratorem, aby zresetować hasło." + enterEmail: "Wpisz adres e-mail użyty do rejestracji. Zostanie do niego wysłany\ + \ link, za pomocą którego możesz zresetować hasło." + ifNoEmail: "Jeżeli nie podano adresu e-mail podczas rejestracji, skontaktuj się\ + \ z administratorem zamiast tego." + contactAdmin: "Jeżeli Twoja instancja nie obsługuje adresów e-mail, skontaktuj się\ + \ zamiast tego z administratorem, aby zresetować hasło." _gallery: my: "Moja galeria" liked: "Polubione wpisy" @@ -878,7 +955,7 @@ _gallery: unlike: "Cofnij polubienie" _email: _follow: - title: "Zaobserwował(a) Cię" + title: "Zaobserwował* Cię" _receiveFollowRequest: title: "Otrzymano prośbę o możliwość obserwacji" _plugin: @@ -893,15 +970,19 @@ _preferencesBackups: save: "Zapisz zmiany" inputName: "Proszę podać nazwę dla tej kopii zapasowej" cannotSave: "Zapisanie nie powiodło się" - nameAlreadyExists: "Kopia zapasowa o nazwie \"{name}\" już istnieje. Proszę podać inną nazwę." - applyConfirm: "Czy na pewno chcesz zastosować kopię zapasową \"{name}\" na tym urządzeniu? Istniejące ustawienia tego urządzenia zostaną nadpisane." + nameAlreadyExists: "Kopia zapasowa o nazwie \"{name}\" już istnieje. Proszę podać\ + \ inną nazwę." + applyConfirm: "Czy na pewno chcesz zastosować kopię zapasową \"{name}\" na tym urządzeniu?\ + \ Istniejące ustawienia tego urządzenia zostaną nadpisane." saveConfirm: "Zapisać kopię zapasową jako {name}?" deleteConfirm: "Usunąć kopię zapasową {name}?" renameConfirm: "Zmienić nazwę kopii zapasowej z \"{old}\" na \"{new}\"?" - createdAt: "Utworzony w: {date} {time}" + createdAt: "Utworzono w: {date} {time}" updatedAt: "Zaktualizowano w: {date} {time}" cannotLoad: "Ładowanie nie powiodło się" invalidFile: "Nieprawidłowy format pliku" + noBackups: Nie znaleziono kopii zapasowych. Możesz utworzyć kopię zapasową twoich + ustawień klienta na tym serwerze poprzez użycie “Utwórz nową kopię zapasową”. _registry: scope: "Zakres" key: "Klucz" @@ -909,13 +990,15 @@ _registry: domain: "Domena" createKey: "Utwórz klucz" _aboutMisskey: - about: "Misskey jest oprogramowanie open source rozwijanym przez syuilo od 2014." + about: "Calckey jest forkiem Misskey utworzonym przez ThatOneCalculator, rozwijanym\ + \ od 2022." contributors: "Główni twórcy" allContributors: "Wszyscy twórcy" source: "Kod źródłowy" - translation: "Tłumacz Misskey" - donate: "Przekaż darowiznę na Misskey" - morePatrons: "Naprawdę doceniam wsparcie ze strony wielu niewymienionych tu osób. Dziękuję! 🥰" + translation: "Tłumacz Calckey" + donate: "Przekaż darowiznę na Calckey" + morePatrons: "Naprawdę doceniam wsparcie ze strony wielu niewymienionych tu osób.\ + \ Dziękuję! \U0001F970" patrons: "Wspierający" _nsfw: respect: "Ukrywaj media NSFW" @@ -923,14 +1006,17 @@ _nsfw: force: "Ukrywaj wszystkie media" _mfm: cheatSheet: "Ściąga MFM" - intro: "MFM to język składniowy wyjątkowy dla Misskey, który może być użyty w wielu miejscach. Tu znajdziesz listę wszystkich możliwych elementów składni MFM." - dummy: "Misskey rozszerza świat Fediwersum" + intro: "MFM jest językiem składniowym używanym przez m.in. Misskey, forki *key (w\ + \ tym Calckey), oraz Akkomę, który może być użyty w wielu miejscach. Tu znajdziesz\ + \ listę wszystkich możliwych elementów składni MFM." + dummy: "Calckey rozszerza świat Fediwersum" mention: "Wspomnij" - mentionDescription: "Używając znaku @ i nazwy użytkownika, możesz określić danego użytkownika." + mentionDescription: "Używając znaku @ i nazwy użytkownika, możesz określić danego\ + \ użytkownika." hashtag: "Hashtag" hashtagDescription: "Używając kratki i tekstu, możesz określić hashtag." url: "Adres URL" - urlDescription: "Adresy URL mogą być wyświetlane" + urlDescription: "Adresy URL mogą być wyświetlane." link: "Odnośnik" linkDescription: "Określone części tekstu mogą być wyświetlane jako adres URL." bold: "Pogrubienie" @@ -941,19 +1027,21 @@ _mfm: centerDescription: "Wyśrodkowuje zawartość." inlineCode: "Kod (w wierszu)" blockCode: "Kod (blok)" - blockCodeDescription: "Wyświetla kod z podświetlaną składnią składający się z wielu linii." + blockCodeDescription: "Wyświetla kod z podświetlaną składnią składający się z wielu\ + \ linii." blockMath: "Matematyka (Blok)" quote: "Cytuj" quoteDescription: "Wyświetla treść jako cytat." emoji: "Niestandardowe emoji" - emojiDescription: "Otaczając nazwę niestandardowego emoji dwukropkami, możesz użyć niestandardowego emoji." + emojiDescription: "Otaczając nazwę niestandardowego emoji dwukropkami, możesz użyć\ + \ niestandardowego emoji." search: "Szukaj" searchDescription: "Wyświetla pole wyszukiwania z wcześniej wpisanym tekstem." flip: "Odwróć" flipDescription: "Przerzuca treść poziomo lub pionowo." jelly: "Animacja (Galaretka)" jellyDescription: "Nadaje treści galaretowatą animację." - tada: "Animation (Tada)" + tada: "Animacja (Tada)" tadaDescription: "Nadaje treści animację podobną do \"Tada!\"." jump: "Animacja (Skok)" jumpDescription: "Nadaje treści animację skakania." @@ -970,7 +1058,7 @@ _mfm: x3: "Bardzo duże" x3Description: "Czyni treść jeszcze większą." x4: "Ogromne" - x4Description: "Czyni treść jeszcze większą niż jeszcze większa." + x4Description: "Czyni treść nawet większą niż jeszcze większa." blur: "Rozmycie" blurDescription: "Rozmywa treść. Zostanie wyraźnie wyświetlona po najechaniu." font: "Czcionka" @@ -979,10 +1067,14 @@ _mfm: rainbowDescription: "Sprawia, że zawartość pojawia się w kolorach tęczy." sparkle: "Blask" sparkleDescription: "Nadaje zawartości efekt lśniącego brokatu." - rotate: "Obróć" + rotate: "Obrót" rotateDescription: "Obraca zawartość o określony kąt." plain: "Zwyczajny" plainDescription: "Wyłącza efekty wszystkich MFM zawartych w tym efekcie MFM." + inlineCodeDescription: Wyświetla podświetlanie składni dla kodu (programu) w linii. + inlineMath: Matematyka (Inline) + inlineMathDescription: Pokaż formuły matematyczne (KaTeX) w linii + blockMathDescription: Pokaż wieloliniowe formuły matematyczne (KaTeX) w bloku _instanceTicker: none: "Nigdy nie pokazuj" remote: "Pokaż dla zdalnych użytkowników" @@ -991,6 +1083,7 @@ _serverDisconnectedBehavior: reload: "Automatycznie odśwież" dialog: "Pokazuj okno ostrzeżenia" quiet: "Pokazuj nieirytujące ostrzeżenia" + nothing: Nic nie rób _channel: create: "Utwórz kanał" edit: "Edytuj kanał" @@ -1004,15 +1097,26 @@ _channel: _menuDisplay: top: "Góra" hide: "Ukryj" + sideFull: Z boku + sideIcon: Z boku (tylko ikony) _wordMute: muteWords: "Słowo do wyciszenia" muteWordsDescription2: "Otocz słowa kluczowe ukośnikami, aby używać wyrażeń regularnych." soft: "Łagodny" hard: "Twardy" mutedNotes: "Wyciszone wpisy" + muteWordsDescription: Rozdzielaj spacją dla kondycji AND, lub przerwaniem wiersza + dla kondycji OR. + softDescription: Ukryj z osi czasu wpisy, które spełniają podane warunki. + hardDescription: Zapobiega dodawania do osi czasu wpisów, które spełniają podane + warunki. Dodatkowo, te wpisy nie zostaną dodane do osi czasu, jeśli warunki się + zmienią. _instanceMute: title: "Ukrywa wpisy z wymienionych instancji." heading: "Lista instancji do wyciszenia" + instanceMuteDescription2: Oddzielaj nowymi liniami + instanceMuteDescription: Spowoduje to wyciszenie wszystkich wpisów/podbić z podanych + instancji, w tym tych od użytkowników odpowiadających na wpisy z wyciszonych instancji. _theme: explore: "Przeglądaj motywy" install: "Zainstaluj motyw" @@ -1023,7 +1127,7 @@ _theme: installedThemes: "Zainstalowane motywy" builtinThemes: "Wbudowane motywy" alreadyInstalled: "Motyw jest już zainstalowany" - invalid: "Format motywu jest nieprawidłowy." + invalid: "Format motywu jest nieprawidłowy" make: "Utwórz motyw" base: "Podstawowy" addConstant: "Dodaj stałą" @@ -1041,8 +1145,9 @@ _theme: darken: "Ściemnij" lighten: "Rozjaśnij" inputConstantName: "Wprowadź nazwę stałej" - importInfo: "Jeżeli wprowadzisz tu kod motywu, możesz zaimportować go w edytorze motywu" - deleteConstantConfirm: "Czy na pewno chcesz usunąć stała {const}?" + importInfo: "Jeżeli wprowadzisz tu kod motywu, możesz zaimportować go w edytorze\ + \ motywu" + deleteConstantConfirm: "Czy na pewno chcesz usunąć stałą {const}?" keys: accent: "Akcent" bg: "Tło" @@ -1061,7 +1166,7 @@ _theme: hashtag: "Hashtag" mention: "Wspomnij" mentionMe: "Wspomnienia (ja)" - renote: "Udostępnij" + renote: "Podbij" modalBg: "Tło modalu" divider: "Rozdzielacz" scrollbarHandle: "Uchwyt paska przewijania" @@ -1113,64 +1218,93 @@ _time: _tutorial: title: "Jak korzystać z Calckey" step1_1: "Witamy!" - step1_2: "Pozwól, że cię skonfigurujemy. Będziesz działać w mgnieniu oka!" - step2_1: "Po pierwsze, proszę wypełnić swój profil" - step2_2: "Podanie kilku informacji o tym, kim jesteś, ułatwi innym stwierdzenie, czy chcą zobaczyć Twoje notatki lub śledzić Cię." + step1_2: "Pozwól, że Cię skonfigurujemy. Będziesz działać w mgnieniu oka!" + step2_1: "Najpierw, proszę wypełnij swój profil." + step2_2: "Podanie kilku informacji o tym, kim jesteś, ułatwi innym stwierdzenie,\ + \ czy chcą zobaczyć Twoje wpisy lub śledzić Cię." step3_1: "Teraz czas na śledzenie niektórych osób!" - step3_2: "Twoje domowe i społeczne linie czasu opierają się na tym, kogo śledzisz, więc spróbuj śledzić kilka kont, aby zacząć.\nKliknij kółko z plusem w prawym górnym rogu profilu, aby go śledzić." - step4_1: "Pozwól, że się tam dostaniesz." - step4_2: "Dla twojego pierwszego postu, niektórzy ludzie lubią zrobić {introduction} post lub prosty \"Hello world!\"" - step5_1: "Timelines, timelines everywhere!" - step5_2: "Twoja instancja ma włączone {timelines} różne timelines" - step5_3: "Oś czasu Home {icon} to miejsce, w którym możesz zobaczyć posty od swoich zwolenników" - step5_4: "The Local {icon} timeline to miejsce, w którym możesz zobaczyć posty od wszystkich innych osób na tej instancji." - step5_5: "Oś czasu Recommended {icon} to miejsce, gdzie możesz zobaczyć posty z instancji, które admini polecają." - step5_6: "Oś czasu Social {icon} to miejsce, w którym możesz zobaczyć posty od znajomych swoich followersów." - step5_7: "The Global {icon} timeline to miejsce, gdzie możesz zobaczyć posty z każdej innej połączonej instancji." - step6_1: "Więc, co to jest to miejsce?" - step6_2: "Cóż, nie dołączyłeś po prostu do Calckey. Dołączyłeś do portalu do Fediverse, połączonej sieci tysięcy serwerów, zwanych instancjami." - step6_3: "Każdy serwer działa w inny sposób, i nie wszystkie serwery działają z Calckey. Ten jednak działa! Jest to trochę skomplikowane, ale w krótkim czasie załapiesz o co chodzi." + step3_2: "Twoje domowe i społeczne linie czasu opierają się na tym, kogo śledzisz,\ + \ więc spróbuj śledzić kilka kont, aby zacząć.\nKliknij kółko z plusem w prawym\ + \ górnym rogu profilu, aby go śledzić." + step4_1: "Pozwól, że zabierzemy Cię tam." + step4_2: "Dla twojego pierwszego postu, niektórzy ludzie lubią zrobić {introduction}\ + \ post lub prosty \"Hello world!\"" + step5_1: "Osie czasu, wszędzie widzę osie czasu!" + step5_2: "Twoja instancja ma włączone {timelines} różne osie czasu." + step5_3: "Główna {icon} oś czasu to miejsce, w którym możesz zobaczyć posty od użytkowników\ + \ których obserwujesz, oraz innych użytkowników z tej instancji. Jeśli wolisz,\ + \ by główna oś czasu pokazywała tylko posty od użytkowników których obserwujesz,\ + \ możesz łatwo to zmienić w ustawieniach!" + step5_4: "Lokalna {icon} oś czasu to miejsce, w którym możesz zobaczyć posty od\ + \ wszystkich innych osób na tej instancji." + step5_5: "Społeczna {icon} oś czasu to miejsce, gdzie możesz zobaczyć posty z instancji,\ + \ które admini polecają." + step5_6: "Polecana {icon} oś czasu to miejsce, gdzie możesz zobaczyć posty z instancji,\ + \ które admini polecają." + step5_7: "Globalna {icon} oś czasu to miejsce, gdzie możesz zobaczyć posty z każdej\ + \ innej połączonej instancji." + step6_1: "Więc, czym to jest to miejsce?" + step6_2: "Cóż, nie dołączył*ś po prostu do Calckey. Dołączył*ś do portalu do Fediverse,\ + \ połączonej sieci tysięcy serwerów, zwanych instancjami." + step6_3: "Każdy serwer działa w inny sposób, i nie wszystkie serwery używają Calckey.\ + \ Ten jednak używa! Jest to trochę skomplikowane, ale w krótkim czasie załapiesz\ + \ o co chodzi." step6_4: "A teraz idź, odkrywaj i baw się dobrze!" _2fa: alreadyRegistered: "Zarejestrowałeś już urządzenie do uwierzytelniania dwuskładnikowego." registerDevice: "Zarejestruj nowe urządzenie" registerKey: "Zarejestruj klucz bezpieczeństwa" - step1: "Najpierw, zainstaluj aplikację uwierzytelniającą (taką jak {a} lub {b}) na swoim urządzeniu." + step1: "Najpierw, zainstaluj aplikację uwierzytelniającą (taką jak {a} lub {b})\ + \ na swoim urządzeniu." step2: "Następnie, zeskanuje kod QR z ekranu." step3: "Wprowadź token podany w aplikacji, aby ukończyć konfigurację." step4: "Od teraz, przy każdej próbie logowania otrzymasz prośbę o token logowania." + step2Url: 'Możesz też wpisać ten URL jeśli używasz programu komputerowego:' + securityKeyInfo: Oprócz uwierzytelnienia odciskiem palców lub PIN, możesz również + skonfigurować uwierzytelnienie za pomocą kluczy sprzętowych obsługujących FIDO2, + w celu dalszego zabezpieczenia Twojego konta. _permissions: - "read:account": "Wyświetl informacje o swoim koncie" - "write:account": "Edytuj swoje informacje o koncie" - "read:blocks": "Zobacz listę osób, które zablokowałeś(-aś)" - "write:blocks": "Edytuj listę osób, które zablokowałeś(-aś)" - "read:drive": "Dostęp do plików i katalogów ze Twojego dysku" - "write:drive": "Edycja i usuwanie plików i katalogów z Twojego dysku." - "read:favorites": "Wyświetlanie Twojej listy ulubionych." - "write:favorites": "Edycja Twojej listy ulubionych." + "read:account": "Wyświetlanie informacji o twoim koncie" + "write:account": "Edycja informacji o twoim koncie" + "read:blocks": "Wyświetlanie listy zablokowanych użytkowników" + "write:blocks": "Blokowanie i odblokowywanie użytkowników" + "read:drive": "Wyświetlanie plików i folderów z twojego Dysku" + "write:drive": "Edycja i usuwanie plików i katalogów z Twojego dysku" + "read:favorites": "Wyświetlanie Twoich zakładek" + "write:favorites": "Edycja Twoich zakładek" "read:following": "Wyświetlanie informacji o obserwowanych" "write:following": "Obserwowanie lub cofanie obserwacji innych kont" - "read:messaging": "Zobacz swoje czaty" - "read:mutes": "Wyświetlanie listy osób, które wyciszyłeś(-aś)" - "write:mutes": "Edycja listy osób, które wyciszyłeś(-aś)" + "read:messaging": "Wyświetlanie twoich czatów" + "read:mutes": "Wyświetlanie listy wyciszonych osób" + "write:mutes": "Edycja listy wyciszonych osób" "read:notifications": "Wyświetlanie powiadomień" "write:notifications": "Działanie na powiadomieniach" "read:reactions": "Wyświetlanie reakcji" "write:reactions": "Edycja reakcji" "write:votes": "Głosowanie w ankiecie" "read:pages": "Wyświetlanie Twoich stron" - "write:pages": "Edycja lub usuwanie Twoich stron" + "write:pages": "Edycja i usuwanie Twoich stron" "read:page-likes": "Wyświetlanie polubień na stronach" "write:page-likes": "Edycja polubień na stronach" "read:user-groups": "Wyświetlanie grup użytkownika" - "write:user-groups": "Edycja lub usuwanie grup użytkownika" - "read:channels": "Zobacz swoje kanały" - "write:channels": "Edytuj swoje kanały" - "read:gallery": "Zobacz swoją galerię" - "write:gallery": "Edytuj swoją galerię" + "write:user-groups": "Edycja i usuwanie grup użytkownika" + "read:channels": "Wyświetlenie Twoich kanałów" + "write:channels": "Edycja Twoich kanałów" + "read:gallery": "Wyświetlenie Twojej galerii" + "write:gallery": "Edycja Twojej galerii" + "write:messaging": Tworzenie i usuwanie wiadomości czatu + "write:notes": Tworzenie i usuwanie wpisów + "read:gallery-likes": Wyświetlenie Twojej listy z polubionymi postami galerii + "write:gallery-likes": Edycja Twojej listy z polubionymi postami galerii _auth: shareAccess: "Czy chcesz autoryzować „{name}” do dostępu do tego konta?" permissionAsk: "Ta aplikacja wymaga następujących uprawnień:" + denied: Odmowa dostępu + copyAsk: Proszę wpisz następujący kod autoryzacyjny w aplikacji + shareAccessAsk: Czy na pewno chcesz upoważnić tą aplikację do dostępu do Twojego + konta? + pleaseGoBack: Wróć do aplikacji + callback: Wracam do aplikacji _weekday: sunday: "Niedziela" monday: "Poniedziałek" @@ -1201,11 +1335,15 @@ _widgets: serverMetric: "Metryka serwera" aiscript: "Konsola AiScript" aichan: "Ai" + rssTicker: Ticker RSS + userList: Lista użytkowników + _userList: + chooseList: Wybierz listę _cw: hide: "Ukryj" show: "Załaduj więcej" - chars: "{count} znaków" - files: "{count} plików" + chars: "{count} znak(-i/-ów)" + files: "{count} plik(-i/-ów)" _poll: noOnlyOneChoice: "Wymagane są przynajmniej dwie opcje" choiceN: "Opcja {n}" @@ -1230,11 +1368,15 @@ _poll: remainingSeconds: "Pozostało {s} sekund" _visibility: public: "Publiczny" - publicDescription: "Twój wpis pojawi się w publicznych osiach czasu" - home: "Strona główna" + publicDescription: "Wpis pojawi się u wszystkich" + home: "Niewidoczny" followers: "Obserwujący" specified: "Bezpośredni" specifiedDescription: "Napisz tylko określonym użytkownikom" + homeDescription: Wpis będzie publiczny ale nie pojawi się na osi czasu instancji + followersDescription: Wpis pojawi się tylko na osiach czasu Twoich obserwujących + localOnly: Lokalnie + localOnlyDescription: Wpis będzie widoczny tylko dla użytkowników tej instancji _postForm: _placeholders: a: "Co się dzieje?" @@ -1243,6 +1385,9 @@ _postForm: d: "Czy masz coś do powiedzenia?" e: "Zacznij coś pisać…" f: "Czekamy, aż coś napiszesz." + quotePlaceholder: Cytuj ten wpis... + channelPlaceholder: Wyślij na kanał... + replyPlaceholder: Odpowiedz na ten wpis... _profile: name: "Nazwa" username: "Nazwa użytkownika" @@ -1250,47 +1395,65 @@ _profile: youCanIncludeHashtags: "Możesz umieścić hashtagi w swoim opisie." metadata: "Dodatkowe informacje" metadataEdit: "Edytuj dodatkowe informacje" - metadataDescription: "Możesz wyświetlać do czterech sekcji dodatkowych informacji na swoim profilu." + metadataDescription: "Możesz wyświetlać do czterech sekcji dodatkowych informacji\ + \ na swoim profilu." metadataLabel: "Etykieta" metadataContent: "Treść" changeAvatar: "Zmień awatar" changeBanner: "Zmień baner" + locationDescription: Jeśli wpiszesz z początku swoje miasto, twój czas lokalny będzie + się pokazywać innym użytkownikom. _exportOrImport: allNotes: "Wszystkie wpisy" followingList: "Obserwowani" muteList: "Wycisz" blockingList: "Zablokuj" userLists: "Listy" + excludeMutingUsers: Wyklucz wyciszonych użytkowników + excludeInactiveUsers: Wyklucz nieaktywnych użytkowników _charts: federation: "Federacja" apRequest: "Żądania" usersTotal: "Łącznie # użytkowników" activeUsers: "Aktywni użytkownicy" + storageUsageTotal: Łączne użycie dysku + filesIncDec: Różnica w liczbie plików + filesTotal: Łączna liczba plików + storageUsageIncDec: Różnica w wykorzystaniu miejsca + localNotesIncDec: Różnica w liczbie lokalnych wpisów + remoteNotesIncDec: Różnica w liczbie zdalnych wpisów + notesTotal: Łączna liczba wpisów + usersIncDec: Różnica w liczbie użytkowników + notesIncDec: Różnica w liczbie wpisów _instanceCharts: requests: "Żądania" notesTotal: "Łącznie # wpisów" - ff: "Różnica w # obserwujących" + ff: "Różnica w # obserwujących " ffTotal: "Łączna liczba # obserwujących" cacheSize: "Różnica w rozmiarze pamięci podręcznej" cacheSizeTotal: "Łączny rozmiar pamięci podręcznej" files: "Różnica # plików" filesTotal: "Łącznie # plików" + usersTotal: Łączna liczba użytkowników + users: Różnica w liczbie użytkowników + notes: Różnica w liczbie wpisów _timelines: home: "Strona główna" local: "Lokalne" - social: "Społeczność" + social: "Społeczna" global: "Globalna" + recommended: Polecana _pages: newPage: "Utwórz stronę" editPage: "Edytuj tę stronę" readPage: "Aktywowano widok źródła" - created: "Pomyślnie utworzono stronę!" - updated: "Pomyślnie zaktualizowano stronę!" - deleted: "Strona została usunięta" + created: "Pomyślnie utworzono stronę" + updated: "Pomyślnie zaktualizowano stronę" + deleted: "Pomyślnie usunięto stronę" pageSetting: "Ustawienia strony" nameAlreadyExists: "Określony adres URL strony już istnieje" invalidNameTitle: "Podany adres URL strony jest nieprawidłowy" - invalidNameText: "Sprawdź, czy nie jest puste" + invalidNameText: "Upewnij się, że pole tytułowe strony nie jest puste" editThisPage: "Edytuj tę stronę" viewSource: "Zobacz źródło" viewPage: "Wyświetlanie Twoich stron" @@ -1298,10 +1461,10 @@ _pages: unlike: "Cofnij polubienie" my: "Moje strony" liked: "Polubione strony" - featured: "Wyróżnione" + featured: "Popularne" inspector: "Inspektor" contents: "Zawartość" - content: "Blokada strony" + content: "Blok strony" variables: "Zmienne" title: "Tytuł" url: "URL strony" @@ -1311,8 +1474,8 @@ _pages: font: "Czcionka" fontSerif: "Szeryfowa" fontSansSerif: "Bezszeryfowa" - eyeCatchingImageSet: "Ustaw przyciągające wzrok zdjęcie" - eyeCatchingImageRemove: "Usuń przyciągające wzrok zdjęcie" + eyeCatchingImageSet: "Ustaw miniaturę" + eyeCatchingImageRemove: "Usuń miniaturę" chooseBlock: "Dodaj blok" selectType: "Wybierz typ" enterVariableName: "Wprowadź nazwę dla swojej zmiennej" @@ -1332,12 +1495,14 @@ _pages: post: "Utwórz wpis" _post: text: "Treść" + attachCanvasImage: Załącz obraz płótna + canvasId: ID płótna textInput: "Pole tekstowe" _textInput: name: "Nazwa zmiennej" text: "Tytuł" default: "Domyślna wartość" - textareaInput: "Pole tekstowe na wiele wierszy" + textareaInput: "Wielowierszowe pole tekstowe" _textareaInput: name: "Nazwa zmiennej" text: "Tytuł" @@ -1350,6 +1515,7 @@ _pages: _canvas: width: "Szerokość" height: "Wysokość" + id: ID płótna note: "Osadzony wpis" _note: id: "ID wpisu" @@ -1389,6 +1555,7 @@ _pages: title: "Tytuł" values: "Lista wyborów (oddzielonych znakiem nowego wiersza)" default: "Domyślna wartość" + canvas: Płótno script: categories: flow: "Kontrola przepływu" @@ -1479,7 +1646,8 @@ _pages: if: "Warunek" _if: arg1: "Jeżeli" - arg2: "Jeżeli prawda" + arg2: "Wtedy" + arg3: Inaczej not: "NIE" _not: arg1: "NIE" @@ -1493,14 +1661,14 @@ _pages: randomPick: "Wybierz losowo z listy" _randomPick: arg1: "Listy" - dailyRandom: "Losowo (zostaje na dzień)" + dailyRandom: "Losowo (zmienia się raz dziennie dla każdego użytkownika)" _dailyRandom: arg1: "Prawdopodobieństwo" - dailyRannum: "Losowa liczba (zostaje na dzień)" + dailyRannum: "Losowa liczba (zmienia się raz dziennie dla każdego użytkownika)" _dailyRannum: arg1: "Minimalna wartość" arg2: "Maksymalna wartość" - dailyRandomPick: "Wybierz losowo z listy (zostaje na dzień)" + dailyRandomPick: "Wybierz losowo z listy (zmienia się raz dziennie dla każdegoużytkownika)" _dailyRandomPick: arg1: "Listy" seedRandom: "Losowo (z ziarnem)" @@ -1516,7 +1684,7 @@ _pages: _seedRandomPick: arg1: "Ziarno" arg2: "Listy" - DRPWPM: "Wybierz losowo z ważonej listy (zostaje na dzień)" + DRPWPM: "Wybierz losowo z ważonej listy (zmienia się raz dziennie dla każdegoużytkownika)" pick: "Wybierz z listy" _pick: arg1: "Listy" @@ -1539,53 +1707,69 @@ _pages: fn: "Funkcje" _fn: arg1: "Wyjście" + slots-info: Oddziel każde gniazdo nową linią + slots: Gniazda for: "Powtórzenie" _for: arg1: "Liczba powtórzeń" arg2: "Działanie" + textList: Lista tekstowa + strPick: Wyciągaczka ciągu znaków + strReverse: Odwróć tekst + join: Łączenie tekstu + round: Zaokrąglanie wartości dziesiętnych + _DRPWPM: + arg1: Lista tekstowa types: string: "Tekst" number: "Liczba" boolean: "Flaguj" array: "Listy" + stringArray: Lista tekstowa enviromentVariables: "Zmienna środowiskowa" pageVariables: "Element strony" + argVariables: Gniazda wejściowe + typeError: Gniazdo {slot} akceptuje wartości typu “{expect}”, lecz wprowadzona + wartość jest typu “{actual}”! + thereIsEmptySlot: Gniazdo {slot} jest puste! + emptySlot: Puste gniazdo _relayStatus: requesting: "Oczekujące" accepted: "Zaakceptowano" rejected: "Odrzucono" _notification: fileUploaded: "Pomyślnie wysłano plik" - youGotMention: "{name} wspomniał(a) o Tobie" - youGotReply: "{name} odpowiedział(a) Tobie" - youGotQuote: "{name} zacytował(a) Ciebie" - youRenoted: "{name} udostępnił(a) Twój wpis" - youGotPoll: "{name} zagłosował(a) w Twojej ankiecie" - youGotMessagingMessageFromUser: "{name} wysłał(a) Ci wiadomość" + youGotMention: "{name} wspomniał* o Tobie" + youGotReply: "{name} odpowiedział* Tobie" + youGotQuote: "{name} zacytował* Ciebie" + youRenoted: "{name} podbił* Twój wpis" + youGotPoll: "{name} zagłosował* w Twojej ankiecie" + youGotMessagingMessageFromUser: "{name} wysłał* Ci wiadomość" youGotMessagingMessageFromGroup: "Została wysłana wiadomość do grupy {name}" - youWereFollowed: "Zaobserwował(a) Cię" - youReceivedFollowRequest: "Otrzymałeś(-aś) prośbę o możliwość obserwacji" + youWereFollowed: "Zaobserwował* Cię" + youReceivedFollowRequest: "Otrzymał*ś prośbę o możliwość obserwacji" yourFollowRequestAccepted: "Twoja prośba o możliwość obserwacji została przyjęta" - youWereInvitedToGroup: "Zaproszony(-a) do grupy" + youWereInvitedToGroup: "{userName} zaprosił* Ciebie do grupy" pollEnded: "Wyniki ankiety stały się dostępne" emptyPushNotificationMessage: "Powiadomienia push zostały zaktualizowane" _types: all: "Wszystkie" follow: "Nowi obserwujący" - mention: "Wspomnij" + mention: "Wspomnienia" reply: "Odpowiedzi" - renote: "Udostępnij" - quote: "Cytuj" - reaction: "Reakcja" + renote: "Podbicia" + quote: "Cytaty" + reaction: "Reakcje" pollVote: "Głosy w ankietach" - receiveFollowRequest: "Otrzymano prośbę o możliwość obserwacji" - followRequestAccepted: "Przyjęto prośbę o możliwość obserwacji" - groupInvited: "Zaproszono do grup" - app: "Powiadomienia z aplikacji" + receiveFollowRequest: "Otrzymane prośby o możliwość obserwacji" + followRequestAccepted: "Przyjęte prośby o możliwość obserwacji" + groupInvited: "Zaproszenia do grup" + app: "Powiadomienia z powiązanych aplikacji" + pollEnded: Zakończone ankiety _actions: - followBack: "zaobserwował cię z powrotem" + followBack: "zaobserwował* cię z powrotem" reply: "Odpowiedz" - renote: "Udostępnij" + renote: "Podbicia" _deck: alwaysShowMainColumn: "Zawsze pokazuj główną kolumnę" columnAlign: "Wyrównaj kolumny" @@ -1597,9 +1781,9 @@ _deck: swapDown: "Zamień z poniższym" stackLeft: "Przypnij do lewej" popRight: "Odepnij w prawo" - profile: "Profil" - newProfile: "Nowy profil" - deleteProfile: "Usuń profil" + profile: "Przestrzeń" + newProfile: "Nowa przestrzeń" + deleteProfile: "Usuń przestrzeń" widgetsIntroduction: "Wybierz \"Edytuj widżety\" w menu kolumny i dodaj widżet." _columns: main: "Główna" @@ -1609,4 +1793,209 @@ _deck: antenna: "Anteny" list: "Listy" mentions: "Wspomnienia" - direct: "Bezpośredni" + direct: "Bezpośrednie wiadomości" + introduction2: Kliknij + z prawej strony ekranu, by dodać nowe kolumny kiedy chcesz. + introduction: Utwórz idealny dla siebie interfejs, poprzez dowolne ustawianie kolumn! + renameProfile: Zmień nazwę przestrzeni + nameAlreadyExists: Ta nazwa przestrzeni już istnieje. +accountMoved: 'Użytkownik przeniósł się na nowe konto:' +flagShowTimelineRepliesDescription: Jeśli włączone, pokazuje odpowiedzi użytkowników + na wpisy innych użytkowników na osi czasu. +manageGroups: Zarządzaj grupami +objectStorageSetPublicRead: Ustaw "public-read" podczas wysyłania +removeAllFollowing: Przestań obserwować wszystkich obserwowanych użytkowników +smtpSecure: Użyj implicit SSL/TLS dla połączeń SMTP +secureMode: Tryb bezpieczny (Authorized Fetch) +instanceSecurity: Bezpieczeństwo instancji +privateMode: Tryb prywatny +allowedInstances: Dopuszczone instancje +recommended: Polecane +allowedInstancesDescription: Hosty instancji które mają być dopuszczone do federacji, + każda separowana nową linią (dotyczy tylko trybu prywatnego). +seperateRenoteQuote: Oddziel przyciski podbicia i cytatów +refreshInterval: 'Częstotliwość aktualizacji ' +slow: Wolna +_messaging: + dms: Prywatne + groups: Grupy +_antennaSources: + all: Wszystkie wpisy + users: Wpisy od konkretnych użytkowników + homeTimeline: Wpisy od obserwowanych użytkowników + userList: Wpisy od użytkowników z konkretnej listy + userGroup: Wpisy od użytkowników z konkretnej grupy + instances: Wpisy od wszystkich użytkowników na instancji +enableRecommendedTimeline: Włącz polecaną oś czasu +recentNDays: Ostatnie {n} dni +driveCapOverrideCaption: Zresetuj pojemność do domyślnej poprzed wpisanie wartości + 0 lub mniejszej. +requireAdminForView: Musisz zalogować się jako administrator, by to zobaczyć. +replayTutorial: Powtórz samouczek +migration: Migracja +moveTo: Przenieś obecne konto do nowego +moveToLabel: 'Konto na które się przenosisz:' +moveAccount: Przenieś konto! +moveAccountDescription: Ten proces jest nieodwracalny. Upewnij się, że utworzył*ś + alias dla tego konta na nowym koncie, przed rozpoczęciem. Proszę wpisz tag konta + w formacie @person@instance.com +moveFrom: Przejdź ze starego konta na obecne +moveFromLabel: 'Konto które przenosisz:' +showUpdates: Pokaż pop-up po aktualizacji Calckey +swipeOnDesktop: Zezwól na przeciąganie w stylu mobilnym na desktopie +moveFromDescription: To utworzy alias twojego starego konta, w celu umożliwienia migracji + z tamtego konta na to. Zrób to ZANIM rozpoczniesz przenoszenie się z tamtego konta. + Proszę wpisz tag konta w formacie @person@instance.com +migrationConfirm: "Czy jesteś na 200% pewn* tego, że chcesz przenieść swoje konto\ + \ na {account}? Gdy to zrobisz, odwrócenie tego będzie nie możliwe, i nie będziesz\ + \ w stanie ponownie używać normalnie z tego konta.\nUpewnij się, że to konto zostało\ + \ ustawione jako konto z którego się przenosisz." +noThankYou: Nie, dziękuję +addInstance: Dodaj instancję +renoteMute: Wycisz podbicia +renoteUnmute: Odcisz podbicia +flagSpeakAsCat: Mów jak kot +flagSpeakAsCatDescription: Twoje posty zostaną znya-izowane, gdy w trybie kota +selectInstance: Wybierz instancję +noInstances: Brak instancji +keepOriginalUploadingDescription: Zapisuje oryginalne zdjęcie. Jeśli wyłączone, wersja + do wyświetlania w sieci zostanie wygenerowana podczas wysłania. +antennaInstancesDescription: Wypisz jednego hosta instancji na linię +regexpError: Błąd regularnego wyrażenia +regexpErrorDescription: 'Wystąpił błąd w regularnym wyrażeniu znajdującym się w linijce + {line} Twoich {tab} wyciszeń słownych:' +forwardReportIsAnonymous: Zamiast Twojego konta, anonimowe konto systemowe zostanie + wyświetlone na zdalnej instancji jako zgłaszający. +breakFollowConfirm: Czy na pewno chcesz usunąć obserwującego? +instanceDefaultThemeDescription: Wpisz kod motywu w formacie obiektowym. +mutePeriod: Długość wyciszenia +tenMinutes: 10 minut +showLocalPosts: 'Pokaż lokalne wpisy w:' +socialTimeline: Społeczna oś czasu +homeTimeline: Główna oś czasu +reflectMayTakeTime: Może upłynąć trochę czasu, zanim pojawią się zmiany. +failedToFetchAccountInformation: Nie można uzyskać informacji o koncie +pushNotification: Powiadomienia push +subscribePushNotification: Włącz powiadomienia push +unsubscribePushNotification: Wyłącz powiadomienia push +pushNotificationAlreadySubscribed: Powiadomienia push są już włączone +pushNotificationNotSupported: Twoja przeglądarka lub instancja nie obsługuje powiadomień + push +sendPushNotificationReadMessage: Usuń powiadomienia push, gdy odpowiednie powiadomienia + lub wiadomości zostaną odczytane +sendPushNotificationReadMessageCaption: Powiadomienie zawierające tekst "{emptyPushNotificationMessage}" + zostanie wyświetlone przez krótką chwilę. Jeśli dotyczy, może to zwiększyć zużycie + baterii Twojego urządzenia. +defaultReaction: Domyślna reakcja emoji dla wychodzących i przychodzących wpisów +license: Licencja +indexPosts: Indeksuj wpisy +indexFrom: Indeksuj wpisy od ID (zostaw puste dla indeksowania wszystkich wpisów) +indexNotice: Indeksuję. Zapewne zajmie to chwilę, nie restartuj serwera przez co najmniej + godzinę. +customKaTeXMacro: Niestandardowe makra KaTeX +enableCustomKaTeXMacro: Włącz niestandardowe makra KaTeX +noteId: ID wpisu +_apps: + apps: Aplikacje + crossPlatform: Wieloplatformowe + mobile: Mobilne + firstParty: Oficjalne + firstClass: Pierwszej klasy + secondClass: Drugiej klasy + thirdClass: Trzeciej klasy + free: Darmowe + paid: Płatne + pwa: Zainstaluj PWA + kaiteki: Kaiteki + milktea: Milktea + missLi: MissLi + mona: Mona + theDesk: TheDesk + lesskey: Lesskey +hiddenTagsDescription: 'Wypisz tagi (bez #) hashtagów które masz zamiar ukryć z "Na + czasie" i "Eksploruj". Na ukryte hashtagi można dalej wejść innymi sposobami.' +proxyAccountDescription: Konto proxy jest kontem które w określonych sytuacjach zachowuje + się jak zdalny obserwujący. Na przykład, kiedy użytkownik dodaje zdalnego użytkownika + do listy, oraz żaden lokalny użytkownik nie obserwuje tego konta, aktywność owego + użytkownika nie zostanie dostarczona na oś czasu. W takim razie, użytkownika zaobserwuje + konto proxy. +objectStorageBaseUrlDesc: "URL stosowany jako odniesienie. Podaj URL twojego CDN,\ + \ albo proxy, jeśli używasz któregokolwiek.\nDla S3 użyj 'https://.s3.amazonaws.com',\ + \ a dla GCS i jego odpowiedników użyj 'https://storage.googleapis.com/',\ + \ itd." +sendErrorReportsDescription: "Gdy ta opcja jest włączona, szczegółowe informacje o\ + \ błędach będą udostępnianie z Calckey gdy wystąpi problem, pomagając w ulepszaniu\ + \ Calckey.\nZawrze to informacje takie jak wersja twojego systemu operacyjnego,\ + \ przeglądarki, Twoja aktywność na Calckey itd." +privateModeInfo: Jeśli włączone, tylko dopuszczone instancje będą mogły federować + z Twoją instancją. Wszystkie posty będą ukryte przed publiką. +oneHour: Godzina +oneDay: Dzień +oneWeek: Tydzień +recommendedInstances: Polecane instancje +recommendedInstancesDescription: Polecane instancje, mające pojawić się w odpowiedniej + osi czasu, oddzielane nowymi liniami. NIE dodawaj “https://”, TYLKO samą domenę. +rateLimitExceeded: Przekroczono ratelimit +cropImage: Kadruj zdjęcie +cropImageAsk: Czy chcesz skadrować to zdjęcie? +recentNHours: Ostatnie {n} godzin +noEmailServerWarning: Serwer email nie jest skonfigurowany. +thereIsUnresolvedAbuseReportWarning: Istnieją nierozwiązane zgłoszenia. +check: Sprawdź +driveCapOverrideLabel: Zmień pojemność dysku dla tego użytkownika +isSystemAccount: Konto założone i automatycznie zarządzane przez system. +typeToConfirm: Wpisz {x} by potwierdzić +deleteAccount: Usuń konto +document: Dokumentacja +numberOfPageCache: Liczba zbuforowanych stron +numberOfPageCacheDescription: Zwiększenie tej liczby poprawi wygodę użytkowników, + ale spowoduje większe zużycie serwera, jak i pamięci. +fast: Szybka +sensitiveMediaDetection: Wykrywanie nieodpowiednich multimediów +remoteOnly: Tylko zdalne +activeEmailValidationDescription: Włącza ściślejszą walidację adresów e-mail, która + obejmuje sprawdzanie adresów jednorazowych oraz tego, czy rzeczywiście można się + z nim komunikować. Jeśli wyłączone, walidowany jest tylko format wiadomości e-mail. +shuffle: Losuj +showAds: Pokazuj reklamy +enterSendsMessage: Wciśnij Enter w komunikatorze, by wysłać wiadomość (domyślnie – + Ctrl + Enter) +adminCustomCssWarn: To ustawienie powinno być używane tylko pod warunkiem, że wiesz + za co ono odpowiada. Wpisanie niepoprawnych wartości może spowodować niepoprawne + działanie klientów KAŻDEGO użytkownika. Proszę upewnij się, że twój CSS działa poprawnie + poprzez przetestowanie go w ustawieniach twojego użytkownika. +customMOTD: Niestandardowe MOTD (wiadomości splash screen) +customMOTDDescription: Niestandardowe wiadomości dla MOTD (splash screen), oddzielane + nowymi liniami, mające pokazywać się za każdym razem gdy użytkownik ładuje/odświeża + stronę. +customSplashIcons: Niestandardowe ikony na splash screenie (URL-e) +customSplashIconsDescription: URL-e dla niestandardowych ikonych na splash screenie, + mające pokazywać się za każdym razem, gdy użytkownik ładuje/odświeża stronę, oddzielane + nowymi liniami. Upewnij się, że zdjęcia są na statycznych URL-ach, najlepiej o rozmiarze + 192x192. +caption: Auto opis +splash: Splash screen +updateAvailable: Może być dostępna aktualizacja! +logoImageUrl: URL grafiki loga +showAdminUpdates: Wskaż, że jest dostępna nowa wersja Calckey (tylko dla adminów) +hiddenTags: Ukryte hashtagi +userSaysSomethingReason: '{name} powiedział* {reason}' +customKaTeXMacroDescription: 'Skonfiguruj makra, aby łatwo pisać wyrażenia matematyczne! + Notacja jest zgodna z definicjami poleceń LaTeXa i zapisywana jest jako \newcommand{\nazwa}{treść} + lub \newcommand{\nazwa}[numer argumentów]{treść}. Na przykład, \newcommand{\add}[2]{#1 + + #2} rozszerzy \add{3}{foo} do 3 + foo. Nawiasy klamrowe otaczające nazwę makra + mogą być zmienione na nawiasy okrągłe lub kwadratowe. Wpłynie to na nawiasy używane + dla argumentów. W każdym wierszu można zdefiniować jedno (i tylko jedno) makro i + nie można przerwać linii w środku definicji. Nieprawidłowe linie są po prostu ignorowane. + Obsługiwane są tylko proste funkcje podstawiania łańcuchów; nie można tu stosować + zaawansowanej składni, takiej jak warunkowe rozgałęzienia.' +secureModeInfo: Nie odsyłaj bez dowodu przy żądaniu z innych instancji. +preferencesBackups: Kopie zapasowe ustawień +undeck: Opuść tablicę +reporter: Osoba zgłaszająca +instanceDefaultDarkTheme: Domyślny ciemny motyw instancji +lastCommunication: Ostatnie połączenie +emailRequiredForSignup: Wymagaj adresu email przy rejestracji +themeColor: Kolor znacznika instancji +instanceDefaultLightTheme: Domyślny jasny motyw instancji +enableEmojiReactions: Włącz reakcje emoji +showEmojisInReactionNotifications: Pokazuj emoji w powiadomieniach reakcyjnych diff --git a/locales/ru-RU.yml b/locales/ru-RU.yml index 9d76dc6239..91d96fcc51 100644 --- a/locales/ru-RU.yml +++ b/locales/ru-RU.yml @@ -1,7 +1,7 @@ ---- _lang_: "Русский" headlineMisskey: "Сеть, сплетённая из заметок" -introMisskey: "Добро пожаловать! Misskey — это децентрализованный сервис микроблогов с открытым исходным кодом.\nПишите «заметки» — делитесь со всеми происходящим вокруг или рассказывайте о себе 📡\nСтавьте «реакции» — выражайте свои чувства и эмоции от заметок других 👍\nОткройте для себя новый мир 🚀" +introMisskey: "Calckey - это децентрализованная платформа социальных сетей с открытым\ + \ исходным кодом, которая свободна навсегда! \U0001F680" monthAndDay: "{day}.{month}" search: "Поиск" notifications: "Уведомления" @@ -14,7 +14,7 @@ gotIt: "Ясно!" cancel: "Отмена" enterUsername: "Введите имя пользователя" renotedBy: "{user} делится" -noNotes: "Нет ни одной заметки" +noNotes: "Нет ни одного поста" noNotifications: "Нет ни одного уведомления" instance: "Инстанс" settings: "Настройки" @@ -23,7 +23,7 @@ otherSettings: "Прочие настройки" openInWindow: "Открывать в плавающих окнах" profile: "Профиль" timeline: "Лента" -noAccountDescription: "Пользователь ничего не написал про себя" +noAccountDescription: "Пользователь ничего не написал про себя." login: "Войти" loggingIn: "Выполняется вход" logout: "Выйти" @@ -44,7 +44,8 @@ copyContent: "Скопировать содержимое" copyLink: "Скопировать ссылку" delete: "Удалить" deleteAndEdit: "Удалить и отредактировать" -deleteAndEditConfirm: "Удалить эту заметку и создать отредактированную? Все реакции, ссылки и ответы на существующую будут будут потеряны." +deleteAndEditConfirm: "Удалить этот пост и создать отредактированный? Все реакции,\ + \ ссылки и ответы на существующий будут потеряны." addToList: "Добавить в список" sendMessage: "Отправить сообщение" copyUsername: "Скопировать имя пользователя" @@ -64,14 +65,15 @@ import: "Импорт" export: "Экспорт" files: "Файлы" download: "Скачать" -driveFileDeleteConfirm: "Удалить файл «{name}»? Заметки с ним также будут удалены." +driveFileDeleteConfirm: "Удалить файл «{name}»? Посты с ним также будут удалены." unfollowConfirm: "Удалить из подписок пользователя {name}?" -exportRequested: "Вы запросили экспорт. Это может занять некоторое время. Результат будет добавлен на «Диск»." +exportRequested: "Вы запросили экспорт. Это может занять некоторое время. Результат\ + \ будет добавлен на «Диск»." importRequested: "Вы запросили импорт. Это может занять некоторое время." lists: "Списки" noLists: "Нет ни одного списка" -note: "Заметка" -notes: "Заметки" +note: "Пост" +notes: "Посты" following: "Подписки" followers: "Подписчики" followsYou: "Читает вас" @@ -80,14 +82,16 @@ manageLists: "Управление списками" error: "Ошибка" somethingHappened: "Что-то пошло не так" retry: "Повторить попытку" -pageLoadError: "Не удалось загрузить страницу" -pageLoadErrorDescription: "Обычно это случается из-за сбоев в сети или кэша браузера. Попробуйте очистить кэш, или подождать пару минут, а потом попытаться загрузить страницу снова." +pageLoadError: "Не удалось загрузить страницу." +pageLoadErrorDescription: "Обычно это случается из-за сбоев в сети или кэша браузера.\ + \ Попробуйте очистить кэш, или подождать пару минут, а потом попытаться загрузить\ + \ страницу снова." serverIsDead: "Ответа от сервера нет. Пожалуйста, подождите немного и повторите попытку." youShouldUpgradeClient: "Чтобы просмотреть эту страницу, пожалуйста, обновите ее." enterListName: "Название списка" privacy: "Конфиденциальность" makeFollowManuallyApprove: "Принимать подписчиков вручную" -defaultNoteVisibility: "Видимость заметок по умолчанию" +defaultNoteVisibility: "Видимость постов по умолчанию" follow: "Подписка" followRequest: "Запрос на подписку" followRequests: "Запросы на подписку" @@ -100,7 +104,7 @@ renoted: "Репост совершён." cantRenote: "Это нельзя репостить." cantReRenote: "Невозможно репостить репост." quote: "Цитата" -pinnedNote: "Закреплённая заметка" +pinnedNote: "Закреплённый пост" pinned: "Закрепить в профиле" you: "Вы" clickToShow: "Нажмите для просмотра" @@ -108,8 +112,9 @@ sensitive: "Содержимое не для всех" add: "Добавить" reaction: "Реакции" reactionSetting: "Реакции, отображаемые в палитре" -reactionSettingDescription2: "Расставляйте перетаскиванием, удаляйте нажатием, добавляйте кнопкой «+»." -rememberNoteVisibility: "Запоминать видимость заметок" +reactionSettingDescription2: "Расставляйте перетаскиванием, удаляйте нажатием, добавляйте\ + \ кнопкой «+»." +rememberNoteVisibility: "Запоминать видимость постов" attachCancel: "Удалить вложение" markAsSensitive: "Отметить как «не для всех»" unmarkAsSensitive: "Снять отметку «не для всех»" @@ -137,13 +142,18 @@ emojiUrl: "URL эмодзи" addEmoji: "Добавить эмодзи" settingGuide: "Рекомендуемые настройки" cacheRemoteFiles: "Кешировать внешние файлы" -cacheRemoteFilesDescription: "Когда эта настройка отключена, файлы с других сайтов будут загружаться прямо оттуда. Это сэкономит место на сервере, но увеличит трафик, так как не будут создаваться эскизы." +cacheRemoteFilesDescription: "Когда эта настройка отключена, файлы с других сайтов\ + \ будут загружаться прямо оттуда. Это сэкономит место на сервере, но увеличит трафик,\ + \ так как не будут создаваться эскизы." flagAsBot: "Аккаунт бота" -flagAsBotDescription: "Включите, если этот аккаунт управляется программой. Это позволит системе Misskey учитывать это, а также поможет разработчикам других ботов предотвратить бесконечные циклы взаимодействия." +flagAsBotDescription: "Включите, если этот аккаунт управляется программой. Это позволит\ + \ системе Calckey учитывать это, а также поможет разработчикам других ботов предотвратить\ + \ бесконечные циклы взаимодействия." flagAsCat: "Аккаунт кота" -flagAsCatDescription: "Включите, и этот аккаунт будет помечен как кошачий." -flagShowTimelineReplies: "Показывать ответы на заметки в ленте" -flagShowTimelineRepliesDescription: "Если этот параметр включен, то в ленте, в дополнение к заметкам пользователя, отображаются ответы на другие заметки пользователя." +flagAsCatDescription: "Вы получите кошачьи ушки и будете говорить как кот!" +flagShowTimelineReplies: "Показывать ответы на посты в ленте" +flagShowTimelineRepliesDescription: "Если этот параметр включен, то в ленте, в дополнение\ + \ к постам пользователя, отображаются ответы на другие посты пользователя." autoAcceptFollowed: "Принимать подписчиков автоматически" addAccount: "Добавить учётную запись" loginFailed: "Неудачная попытка входа" @@ -156,7 +166,11 @@ searchWith: "Найденное «{q}»" youHaveNoLists: "У вас нет ни одного списка" followConfirm: "Подписаться на {name}?" proxyAccount: "Учётная запись прокси" -proxyAccountDescription: "Учетная запись прокси предназначена служить подписчиком на пользователей с других сайтов. Например, если пользователь добавит кого-то с другого сайта а список, деятельность того не отобразится, пока никто с этого же сайта не подписан на него. Чтобы это стало возможным, на него подписывается прокси." +proxyAccountDescription: "Учетная запись прокси предназначена служить подписчиком\ + \ на пользователей с других сайтов. Например, если пользователь добавит кого-то\ + \ с другого сайта а список, деятельность того не отобразится, пока никто с этого\ + \ же сайта не подписан на него. Чтобы это стало возможным, на него подписывается\ + \ прокси." host: "Хост" selectUser: "Выберите пользователя" recipient: "Кому" @@ -177,7 +191,7 @@ operations: "Операции" software: "Программы" version: "Версия" metadata: "Метаданные" -withNFiles: "Файлы, {n} шт." +withNFiles: "Файлы, {n} шт" monitor: "Монитор" jobQueue: "Очередь заданий" cpuAndMemory: "Процессор и память" @@ -187,21 +201,23 @@ instanceInfo: "Информация об инстансе" statistics: "Статистика" clearQueue: "Очистить очередь" clearQueueConfirmTitle: "Очистить очередь?" -clearQueueConfirmText: "Всё, что осталось в очереди, не будет доставлено. Обычно эта операция НЕ нужна." +clearQueueConfirmText: "Всё, что осталось в очереди, не будет доставлено. Обычно эта\ + \ операция НЕ нужна." clearCachedFiles: "Очистить кэш" clearCachedFilesConfirm: "Удалить все закэшированные файлы с других сайтов?" blockedInstances: "Заблокированные инстансы" -blockedInstancesDescription: "Введите список инстансов, которые хотите заблокировать. Они больше не смогут обмениваться с вашим инстансом." +blockedInstancesDescription: "Введите список инстансов, которые хотите заблокировать.\ + \ Они больше не смогут обмениваться с вашим инстансом." muteAndBlock: "Скрытие и блокировка" mutedUsers: "Скрытые пользователи" blockedUsers: "Заблокированные пользователи" noUsers: "Нет ни одного пользователя" editProfile: "Редактировать профиль" -noteDeleteConfirm: "Вы хотите удалить эту заметку?" -pinLimitExceeded: "Нельзя закрепить ещё больше заметок" -intro: "Установка Misskey завершена! А теперь создайте учетную запись администратора." +noteDeleteConfirm: "Вы хотите удалить этот пост?" +pinLimitExceeded: "Нельзя закрепить ещё больше постов" +intro: "Установка Calckey завершена! А теперь создайте учетную запись администратора." done: "Готово" -processing: "Обработка" +processing: "Обработка..." preview: "Предпросмотр" default: "По умолчанию" defaultValueIs: "По умолчанию: {value}" @@ -219,7 +235,7 @@ instanceFollowers: "Подписчики инстанса" instanceUsers: "Пользователи инстанса" changePassword: "Изменить пароль" security: "Безопасность" -retypedNotMatch: "Не совпадают" +retypedNotMatch: "Не совпадают." currentPassword: "Текущий пароль" newPassword: "Новый пароль" newPasswordRetype: "Новый пароль (ещё раз)" @@ -232,7 +248,7 @@ lookup: "Запрос" announcements: "Оповещения" imageUrl: "Ссылка на изображение" remove: "Удалить" -removed: "Удалено" +removed: "\uFEFFУдалено" removeAreYouSure: "Хотите удалить «{x}»?" deleteAreYouSure: "Хотите удалить «{x}»?" resetAreYouSure: "На самом деле сбросить?" @@ -240,7 +256,8 @@ saved: "Сохранено" messaging: "Сообщения" upload: "Загрузить" keepOriginalUploading: "Сохранить исходное изображение" -keepOriginalUploadingDescription: "Сохраняет исходную версию при загрузке изображений. Если выключить, то при загрузке браузер генерирует изображение для публикации." +keepOriginalUploadingDescription: "Сохраняет исходную версию при загрузке изображений.\ + \ Если выключить, то при загрузке браузер генерирует изображение для публикации." fromDrive: "С «диска»" fromUrl: "По ссылке" uploadFromUrl: "Загрузить по ссылке" @@ -256,7 +273,8 @@ agreeTo: "Я соглашаюсь с {0}" tos: "Пользовательское соглашение" start: "Начать" home: "Главная" -remoteUserCaution: "Это пользователь с другого сайта, поэтому информация может быть неточной." +remoteUserCaution: "Это пользователь с другого сайта, поэтому информация может быть\ + \ неточной." activity: "Активность" images: "Изображения" birthday: "День рождения" @@ -288,7 +306,7 @@ emptyFolder: "Папка пуста" unableToDelete: "Удаление невозможно" inputNewFileName: "Введите имя нового файла" inputNewDescription: "Введите новую подпись" -inputNewFolderName: "Пожалуйста, введите новое имя папки!" +inputNewFolderName: "Пожалуйста, введите новое имя папки" circularReferenceFolder: "Вы пытаетесь переместить папку внутрь себя." hasChildFilesOrFolders: "Эта папка не пуста и не может быть удалена." copyUrl: "Копировать ссылку" @@ -318,12 +336,13 @@ dayX: "{day} день" monthX: "{month} месяц" yearX: "{year} год" pages: "Страницы" -integration: "Интеграция" +integration: "Интеграции" connectService: "Подключиться" disconnectService: "Отключиться" enableLocalTimeline: "Включить локальную ленту" enableGlobalTimeline: "Включить глобальную ленту" -disablingTimelinesInfo: "У администраторов и модераторов есть доступ ко всем лентам, даже если они отключены." +disablingTimelinesInfo: "У администраторов и модераторов есть доступ ко всем лентам,\ + \ даже если они отключены." registration: "Регистрация" enableRegistration: "Разрешить регистрацию" invite: "Пригласить" @@ -335,11 +354,13 @@ bannerUrl: "Ссылка на изображение в шапке" backgroundImageUrl: "Ссылка на фоновое изображение" basicInfo: "Общая информация" pinnedUsers: "Прикреплённый пользователь" -pinnedUsersDescription: "Перечислите по одному имени пользователя в строке. Пользователи, перечисленные здесь, будут привязаны к закладке \"Изучение\"." +pinnedUsersDescription: "Перечислите по одному имени пользователя в строке. Пользователи,\ + \ перечисленные здесь, будут привязаны к закладке \"Изучение\"." pinnedPages: "Закрепленные страницы" -pinnedPagesDescription: "Если хотите закрепить страницы на главной сайта, сюда можно добавить пути к ним, каждый в отдельной строке." +pinnedPagesDescription: "Если хотите закрепить страницы на главной сайта, сюда можно\ + \ добавить пути к ним, каждый в отдельной строке." pinnedClipId: "Идентификатор закреплённой подборки" -pinnedNotes: "Закреплённая заметка" +pinnedNotes: "Закреплённые посты" hcaptcha: "hCaptcha" enableHcaptcha: "Включить hCaptcha" hcaptchaSiteKey: "Ключ сайта" @@ -348,25 +369,29 @@ recaptcha: "reCAPTCHA" enableRecaptcha: "Включить reCAPTCHA" recaptchaSiteKey: "Ключ сайта" recaptchaSecretKey: "Секретный ключ" -avoidMultiCaptchaConfirm: "Несколько способов проверки могут мешать друг другу. Подтвердите, если хотите отключить другие способы. Или нажмите «Отмена», чтобы оставить их включёнными." +avoidMultiCaptchaConfirm: "Несколько способов проверки могут мешать друг другу. Подтвердите,\ + \ если хотите отключить другие способы. Или нажмите «Отмена», чтобы оставить их\ + \ включёнными." antennas: "Антенны" manageAntennas: "Настройки антенн" name: "Название" antennaSource: "Источник антенны" antennaKeywords: "Ключевые слова" antennaExcludeKeywords: "Исключения" -antennaKeywordsDescription: "Пишите слова через пробел в одной строке, чтобы ловить их появление вместе; на отдельных строках располагайте слова, или группы слов, чтобы ловить любые из них." -notifyAntenna: "Уведомлять о новых заметках" -withFileAntenna: "Только заметки с вложениями" +antennaKeywordsDescription: "Пишите слова через пробел в одной строке, чтобы ловить\ + \ их появление вместе; на отдельных строках располагайте слова, или группы слов,\ + \ чтобы ловить любые из них." +notifyAntenna: "Уведомлять о новых постах" +withFileAntenna: "Только посты с вложениями" enableServiceworker: "Включить ServiceWorker" antennaUsersDescription: "Пишите каждое название аккаута на отдельной строке" caseSensitive: "С учётом регистра" withReplies: "Включая ответы" connectedTo: "Вы подключены к следующим аккаунтам" -notesAndReplies: "Заметки и ответы" -withFiles: "Заметки с файлами" +notesAndReplies: "Посты и ответы" +withFiles: "Посты с файлами" silence: "Заглушить" -silenceConfirm: " Заглушить этого пользователя? Уверены?" +silenceConfirm: "Вы уверены что хотите заглушить этого пользователя?" unsilence: "Снять глушение" unsilenceConfirm: "Снять глушение с этого пользователя? Уверены?" popularUsers: "Популярные пользователи" @@ -378,7 +403,7 @@ exploreFediverse: "Исследуйте Fediverse" popularTags: "Популярные теги" userList: "Списки" about: "Описание" -aboutMisskey: "О Misskey" +aboutMisskey: "О Calckey" administrator: "Администратор" token: "Токен" twoStepAuthentication: "Двухфакторная аутентификация" @@ -391,16 +416,16 @@ registerSecurityKey: "Зарегистрировать защитный ключ lastUsed: "Последнее использование" unregister: "Отписаться" passwordLessLogin: "Настроить вход без пароля" -resetPassword: "Сброс пароля:" -newPasswordIs: "Новый пароль — «{password}»." +resetPassword: "Сброс пароля" +newPasswordIs: "Новый пароль — «{password}»" reduceUiAnimation: "Уменьшить анимацию в пользовательском интерфейсе" share: "Поделиться" notFound: "Не найдено" -notFoundDescription: "Страница по указанной ссылке не найдена" +notFoundDescription: "Страница по указанной ссылке не найдена." uploadFolder: "Место загрузки по умолчанию" cacheClear: "Очистка кэша" markAsReadAllNotifications: "Отметить все уведомления как прочитанные" -markAsReadAllUnreadNotes: "Отметить все заметки как прочитанные" +markAsReadAllUnreadNotes: "Отметить все посты как прочитанные" markAsReadAllTalkMessages: "Отметить все реплики как прочитанные" help: "Помощь" inputMessageHere: "Введите сообщение здесь" @@ -431,10 +456,11 @@ onlyOneFileCanBeAttached: "К сообщению можно прикрепить signinRequired: "Пожалуйста, войдите" invitations: "Приглашения" invitationCode: "Код приглашения" -checking: "Проверка" +checking: "Проверка..." available: "Доступно" unavailable: "Не доступно" -usernameInvalidFormat: "Можно использовать только латинские буквы (A—Z, a—z), цифры (0—9) и знак подчёркивания (_)" +usernameInvalidFormat: "Можно использовать только латинские буквы (A—Z, a—z), цифры\ + \ (0—9) и знак подчёркивания (_)." tooShort: "Слишком короткий" tooLong: "Слишком длинный" weakPassword: "Слабый пароль" @@ -443,7 +469,8 @@ strongPassword: "Надёжный пароль" passwordMatched: "Совпали" passwordNotMatched: "Не совпадают" signinWith: "Использовать {x} для входа" -signinFailed: "Невозможно войти в систему. Введенное вами имя пользователя или пароль неверны." +signinFailed: "Невозможно войти в систему. Введенное вами имя пользователя или пароль\ + \ неверны." tapSecurityKey: "Нажмите на свой электронный ключ" or: "или" language: "Язык" @@ -453,11 +480,11 @@ aboutX: "Описание {x}" useOsNativeEmojis: "Использовать эмодзи операционной системы" disableDrawer: "Не использовать выдвижные меню" youHaveNoGroups: "У вас нет ни одной группы" -joinOrCreateGroup: "Получайте приглашения в группы или создавайте свои собственные" +joinOrCreateGroup: "Получайте приглашения в группы или создавайте свои собственные." noHistory: "История пока пуста" signinHistory: "Журнал посещений" disableAnimatedMfm: "Отключение анимированной разметки MFM" -doing: "В процессе" +doing: "В процессе..." category: "Категория" tags: "Метки" docSource: "Источник документа" @@ -480,28 +507,38 @@ promotion: "Продвинуто" promote: "Продвинуть" numberOfDays: "Количество дней" hideThisNote: "Спрятать эту запись" -showFeaturedNotesInTimeline: "Показывать в ленте заметки из «Горячего»" +showFeaturedNotesInTimeline: "Показывать в ленте посты из «Горячего»" objectStorage: "Хранилище" -useObjectStorage: "Занято в хранилище" +useObjectStorage: "Использовать объектное хранилище" objectStorageBaseUrl: "Базовый адрес" -objectStorageBaseUrlDesc: "Это начальная часть адреса, используемого CDN или прокси, например для S3: https://.s3.amazonaws.com, или дя GCS: 'https://storage.googleapis.com/'" +objectStorageBaseUrlDesc: "URL используемый для примера. Укажите URL-адрес вашего\ + \ CDN или прокси, если вы используете любой из них.\nДля S3 используйте 'https://.s3.amazonaws.com',\ + \ а для GCS и подобных сервисов используйте 'https://storage.googleapis.com/',\ + \ и т.п." objectStorageBucket: "Bucket" -objectStorageBucketDesc: "Укажите название контейнера (Bucket) который используется на выбранном сервисе." +objectStorageBucketDesc: "Укажите название контейнера (Bucket) который используется\ + \ на выбранном сервисе." objectStoragePrefix: "Префикс" -objectStoragePrefixDesc: "Файлы будут храниться в директории, соответствующей указанному здесь префиксу пути" +objectStoragePrefixDesc: "Файлы будут храниться в директории, соответствующей указанному\ + \ здесь префиксу пути." objectStorageEndpoint: "Конечная точка" -objectStorageEndpointDesc: "Если используете AWS S3, оставьте пустым. В остальных случаях укажите конечную точку (endpoint) в форме «» или «:», так, как это описано в руководстве той службы, которую собираетесь использовать." +objectStorageEndpointDesc: "Если используете AWS S3, оставьте пустым. В остальных\ + \ случаях укажите конечную точку (endpoint) в форме «» или «:»,\ + \ так, как это описано в руководстве той службы, которую собираетесь использовать." objectStorageRegion: "Регион" -objectStorageRegionDesc: "Укажите регион, например xx-east-1. Если ваша служба не различает регионы, оставьте поле пустым, или впишите us-east-1." +objectStorageRegionDesc: "Укажите регион, например xx-east-1. Если ваша служба не\ + \ различает регионы, оставьте поле пустым, или впишите us-east-1." objectStorageUseSSL: "Использовать SSL" -objectStorageUseSSLDesc: "Отключите, если не собираетесь использовать протокол HTTPS для обмена по API." +objectStorageUseSSLDesc: "Отключите, если не собираетесь использовать протокол HTTPS\ + \ для обмена по API" objectStorageUseProxy: "Использовать прокси" -objectStorageUseProxyDesc: "Отключите, если не будете испоьзовать прокси для соединений по протоколу ObjectStorage." +objectStorageUseProxyDesc: "Отключите, если не будете испоьзовать прокси для соединений\ + \ по протоколу ObjectStorage" objectStorageSetPublicRead: "Устанавливать public-read при загрузке на сервер" serverLogs: "Журнал сервера" deleteAll: "Удалить всё" -showFixedPostForm: "Показывать поле для ввода новой заметки наверху ленты" -newNoteRecived: "Появилась новая заметка" +showFixedPostForm: "Показывать поле для ввода нового поста наверху ленты" +newNoteRecived: "Появился новый пост" sounds: "Звуки" listen: "Слушать" none: "Ничего" @@ -524,7 +561,9 @@ sort: "Сортировать" ascendingOrder: "по возрастанию" descendingOrder: "По убыванию" scratchpad: "Когтеточка" -scratchpadDescription: "«Когтеточка» — это место для опытов с AiScript. Здесь можно писать программы, взаимодействующие с Misskey, запускать и смотреть что из этого получается." +scratchpadDescription: "«Когтеточка» — это место для опытов с AiScript. Здесь можно\ + \ писать программы, взаимодействующие с Calckey, запускать и смотреть что из этого\ + \ получается." output: "Выходы" script: "Скрипт" disablePagesScript: "Отключить скрипты на «Страницах»" @@ -532,11 +571,14 @@ updateRemoteUser: "Обновить данные пользователя с е deleteAllFiles: "Удалить все файлы" deleteAllFilesConfirm: "Вы хотите удалить все файлы?" removeAllFollowing: "Удалить всех подписчиков" -removeAllFollowingDescription: "Отменить все подписки с домена {host}? Пожалуйста, применяйте это действие, если инстанс больше не существует." -userSuspended: "Эта учётная запись заморожена" -userSilenced: "Этот пользователь был заглушен" +removeAllFollowingDescription: "Отменить все подписки с домена {host}? Пожалуйста,\ + \ применяйте это действие, если инстанс больше не существует." +userSuspended: "Эта учётная запись заморожена." +userSilenced: "Этот пользователь был заглушен." yourAccountSuspendedTitle: "Эта учетная запись заблокирована" -yourAccountSuspendedDescription: "Эта учетная запись была заблокирована из-за нарушения условий предоставления услуг сервера. Свяжитесь с администратором, если вы хотите узнать более подробную причину. Пожалуйста, не создавайте новую учетную запись." +yourAccountSuspendedDescription: "Эта учетная запись была заблокирована из-за нарушения\ + \ условий предоставления услуг сервера. Свяжитесь с администратором, если вы хотите\ + \ узнать более подробную причину. Пожалуйста, не создавайте новую учетную запись." menu: "Меню" divider: "Линия-разделитель" addItem: "Добавить элемент" @@ -545,7 +587,7 @@ addRelay: "Добавить ретранслятор" inboxUrl: "URL ящика входящих сообщений" addedRelays: "Добавленные ретрансляторы" serviceworkerInfo: "Нужно включить, чтобы работали push-уведомления." -deletedNote: "Удалённая заметка" +deletedNote: "Удалённый пост" invisibleNote: "Личное сообщение" enableInfiniteScroll: "Включить бесконечную прокрутку" visibility: "Видимость" @@ -577,12 +619,14 @@ permission: "Разрешения" enableAll: "Включить все" disableAll: "Выключить всё" tokenRequested: "Открыть доступ к учётной записи" -pluginTokenRequestedDescription: "Это расширение сможет пользоваться разрешениями, установленными здесь." +pluginTokenRequestedDescription: "Это расширение сможет пользоваться разрешениями,\ + \ установленными здесь." notificationType: "Тип уведомления" edit: "Изменить" emailServer: "Сервер электронной почты" enableEmail: "Включить обмен электронной почтой" -emailConfigInfo: "Используется для подтверждения адреса электронной почты и сброса пароля." +emailConfigInfo: "Используется для подтверждения адреса электронной почты и сброса\ + \ пароля" email: "Электронная почта" emailAddress: "Адрес электронной почты" smtpConfig: "Конфигурация SMTP-сервера" @@ -590,9 +634,10 @@ smtpHost: "Хост" smtpPort: "Порт" smtpUser: "Имя пользователя" smtpPass: "Пароль" -emptyToDisableSmtpAuth: "Не заполняйте имя пользователя и пароль, чтобы отключить аутентификацию в SMTP." +emptyToDisableSmtpAuth: "Не заполняйте имя пользователя и пароль, чтобы отключить\ + \ аутентификацию в SMTP" smtpSecure: "Использовать SSL/TLS для SMTP-соединений" -smtpSecureInfo: "Выключите при использовании STARTTLS." +smtpSecureInfo: "Выключите при использовании STARTTLS" testEmail: "Проверка доставки электронной почты" wordMute: "Скрытие слов" regexpError: "Ошибка в регулярном выражении" @@ -609,32 +654,38 @@ database: "База данных" channel: "Каналы" create: "Создать" notificationSetting: "Настройки уведомлений" -notificationSettingDesc: "Выберите тип уведомлений для отображения" +notificationSettingDesc: "Выберите тип уведомлений для отображения." useGlobalSetting: "Использовать глобальные настройки" -useGlobalSettingDesc: "Если включено, будут использоваться настройки учётной записи. Если включить, этот виджет можно будет настроить индивидуально." +useGlobalSettingDesc: "Если включено, будут использоваться настройки учётной записи.\ + \ Если включить, этот виджет можно будет настроить индивидуально." other: "Другие" regenerateLoginToken: "Создать новый токен для входа" -regenerateLoginTokenDescription: "Создаёт новый токен, используемый внутри программы во время входа. Обычно в этом нет необходимости. При создании все устройства будут отключены." -setMultipleBySeparatingWithSpace: "Можно написать несколько через пробел" +regenerateLoginTokenDescription: "Создаёт новый токен, используемый внутри программы\ + \ во время входа. Обычно в этом нет необходимости. При создании все устройства будут\ + \ отключены." +setMultipleBySeparatingWithSpace: "Можно написать несколько через пробел." fileIdOrUrl: "Идентификатор файла или ссылка" behavior: "Поведение" sample: "Пример" abuseReports: "Жалобы" reportAbuse: "Жалоба" reportAbuseOf: "Пожаловаться на пользователя {name}" -fillAbuseReportDescription: "Опишите, пожалуйста, причину жалобы подробнее. Если речь о конкретной заметке, будьте добры приложить ссылку на неё." +fillAbuseReportDescription: "Опишите, пожалуйста, причину жалобы подробнее. Если речь\ + \ о конкретном посте, будьте добры приложить ссылку на неё." abuseReported: "Жалоба отправлена. Большое спасибо за информацию." reporteeOrigin: "О ком сообщено" reporterOrigin: "Кто сообщил" -forwardReport: "Перенаправление отчета на инстант." -forwardReportIsAnonymous: "Удаленный инстант не сможет увидеть вашу информацию и будет отображаться как анонимная системная учетная запись." +forwardReport: "Перенаправление отчета на инстанс" +forwardReportIsAnonymous: "Удаленный инстант не сможет увидеть вашу информацию и будет\ + \ отображаться как анонимная системная учетная запись." send: "Отправить" abuseMarkAsResolved: "Отметить жалобу как решённую" openInNewTab: "Открыть в новой вкладке" openInSideView: "Открывать в боковой колонке" defaultNavigationBehaviour: "Поведение навигации по умолчанию" -editTheseSettingsMayBreakAccount: "От изменений в этих настройках ваша учётная запись может поломаться." -instanceTicker: "Строка с названием инстанса в заметках" +editTheseSettingsMayBreakAccount: "От изменений в этих настройках ваша учётная запись\ + \ может поломаться." +instanceTicker: "Строка с названием инстанса в постах" waitingFor: "Ждём, когда {x} ответит" random: "Случайные" system: "Система" @@ -645,18 +696,19 @@ createNew: "Новый документ" optional: "Необязательно" createNewClip: "Новая подборка" public: "Общедоступно" -i18nInfo: "Calckey переводят на разные языки добровольцы со всего света. Ваша помощь тоже пригодится здесь: {link}." +i18nInfo: "Calckey переводят на разные языки добровольцы со всего света. Ваша помощь\ + \ тоже пригодится здесь: {link}." manageAccessTokens: "Управление токенами доступа" accountInfo: "Сведения об учётной записи" -notesCount: "Количество заметок" +notesCount: "Количество постов" repliesCount: "Сколько раз пользователь кому-то ответил" -renotesCount: "Сколько раз пользователь делился заметками" +renotesCount: "Сколько раз пользователь делился постами" repliedCount: "Сколько раз ответили пользователю" -renotedCount: "Сколько раз делились заметками пользователя" +renotedCount: "Сколько раз делились постами пользователя" followingCount: "Количество подписок" followersCount: "Количество подписавшихся" sentReactionsCount: "Количество реакций пользователя" -receivedReactionsCount: "Количество реакций на заметки пользователя" +receivedReactionsCount: "Количество реакций на посты пользователя" pollVotesCount: "Сколько раз пользователь участвовал в опросах" pollVotedCount: "Сколько раз участвовали в опросах пользователя" yes: "Да" @@ -664,14 +716,17 @@ no: "Нет" driveFilesCount: "Количество файлов на диске" driveUsage: "Занято места на диске" noCrawle: "Запретить паукам индексировать сайт" -noCrawleDescription: "Просьба поисковым системам не ходить по вашему профилю, по заметкам, страницам и не индексировать их." -lockedAccountInfo: "Даже если вы вручную подтверждаете подписки, кто угодно может читать ваши заметки, если вы не отмечаете их «для подписчиков»." +noCrawleDescription: "Просьба поисковым системам не ходить по вашему профилю, по постам,\ + \ страницам и не индексировать их." +lockedAccountInfo: "Даже если вы вручную подтверждаете подписки, кто угодно может\ + \ читать ваши посты, если вы не отмечаете их «для подписчиков»." alwaysMarkSensitive: "Отмечать файлы как «содержимое не для всех» по умолчанию" loadRawImages: "Сразу показывать изображения в полном размере" disableShowingAnimatedImages: "Не проигрывать анимацию" -verificationEmailSent: "Вам отправлено письмо для подтверждения. Пройдите, пожалуйста, по ссылке из письма, чтобы завершить проверку." +verificationEmailSent: "Вам отправлено письмо для подтверждения. Пройдите, пожалуйста,\ + \ по ссылке из письма, чтобы завершить проверку." notSet: "Не настроено" -emailVerified: "Адрес электронной почты подтверждён." +emailVerified: "Адрес электронной почты подтверждён" noteFavoritesCount: "Количество добавленного в избранное" pageLikesCount: "Количество понравившихся страниц" pageLikedCount: "Количество страниц, понравившихся другим" @@ -680,23 +735,28 @@ useSystemFont: "Использовать шрифт, предлагаемый с clips: "Подборки" experimentalFeatures: "Экспериментальные функции" developer: "Разработчик" -makeExplorable: "Опубликовать профиль в «Обзоре»." -makeExplorableDescription: "Если выключить, ваш профиль не будет показан в разделе «Обзор»." -showGapBetweenNotesInTimeline: "Показывать разделитель между заметками в ленте" +makeExplorable: "Опубликовать профиль в «Обзоре»" +makeExplorableDescription: "Если выключить, ваш профиль не будет показан в разделе\ + \ «Обзор»." +showGapBetweenNotesInTimeline: "Показывать разделитель между постами в ленте" duplicate: "Дубликат" left: "Влево" center: "По центру" wide: "Толстый" narrow: "Тонкий" -reloadToApplySetting: "Это настройка вступает в силу при загрузке страницы. Перезагрузить сейчас?" +reloadToApplySetting: "Это настройка вступает в силу при загрузке страницы. Перезагрузить\ + \ сейчас?" needReloadToApply: "Изменения вступят в силу после перезагрузки страницы." showTitlebar: "Показать заголовок" clearCache: "Очистить кэш" onlineUsersCount: "Пользователей сейчас в сети: {n}" nUsers: "Пользователей: {n}" -nNotes: "Заметок: {n}" +nNotes: "Постов: {n}" sendErrorReports: "Посылать отчёты о сбоях" -sendErrorReportsDescription: "Если включено, когда возникнет какая-нибудь техническая проблема, подробные сведения об этом будут отправлены разработчикам Misskey. Это очень помогает делать программу лучше. В отчёты попадают тип и версия ОС, браузера, журнал действий (что привело к сбою) и тому подобное." +sendErrorReportsDescription: "Если включено, когда возникнет какая-нибудь техническая\ + \ проблема, подробные сведения об этом будут отправлены разработчикам Calckey.\n\ + Это очень помогает делать программу лучше. В отчёты попадают тип и версия ОС, браузера,\ + \ журнал действий (что привело к сбою) и тому подобное." myTheme: "Личная тема" backgroundColor: "Фон" accentColor: "Акцент" @@ -725,7 +785,7 @@ emailNotification: "Уведомления по электронной почт publish: "Опубликовать" inChannelSearch: "Поиск по каналу" useReactionPickerForContextMenu: "Открывать палитру реакций правой кнопкой" -typingUsers: "Стук клавиш. Это {users}…" +typingUsers: "{users} печатает" jumpToSpecifiedDate: "Перейти к заданной дате" showingPastTimeline: "Отображается старая лента" clear: "Очистить" @@ -735,14 +795,16 @@ unlikeConfirm: "В самом деле отменить «нравится»?" fullView: "Полный вид" quitFullView: "Закрыть полный вид" addDescription: "Добавить описание" -userPagePinTip: "Можно добавить сюда заметки, выбрав нужную, и включив в её меню пункт «Закрепить в профиле»." -notSpecifiedMentionWarning: "В этой заметке есть упоминание тех, кто не включён в адресаты" +userPagePinTip: "Можно добавить сюда посты, выбрав нужный, и включив в её меню пункт\ + \ «Закрепить в профиле»." +notSpecifiedMentionWarning: "В этом посте есть упоминание тех, кто не включён в адресаты" info: "Описание" userInfo: "Сведения о пользователе" unknown: "Неизвестно" onlineStatus: "Присутствие в сети" hideOnlineStatus: "Скрыть присутствие" -hideOnlineStatusDescription: "Сокрытие присутствия делает некоторые функции, такие как поиск, менее удобными." +hideOnlineStatusDescription: "Сокрытие присутствия делает некоторые функции, такие\ + \ как поиск, менее удобными." online: "В сети" active: "Действует" offline: "Не в сети" @@ -751,21 +813,21 @@ botProtection: "Ботозащита" instanceBlocking: "Блокировка инстансов" selectAccount: "Выберите учётную запись" switchAccount: "Сменить учётную запись" -enabled: "Вкл." -disabled: "Откл." +enabled: "Включено" +disabled: "Отключено" quickAction: "Быстрое действие" user: "Пользователи" administration: "Управление" accounts: "Учётные записи" switch: "Переключение" -noMaintainerInformationWarning: "Не заполнены сведения об администраторах" -noBotProtectionWarning: "Ботозащита не настроена" +noMaintainerInformationWarning: "Не заполнены сведения об администраторах." +noBotProtectionWarning: "Ботозащита не настроена." configure: "Настроить" postToGallery: "Опубликовать в галерею" gallery: "Галерея" recentPosts: "Недавние публикации" popularPosts: "Популярные публикации" -shareWithNote: "Поделиться заметкой" +shareWithNote: "Поделиться постом" ads: "Реклама" expiration: "Опрос длится" memo: "Памятка" @@ -773,11 +835,12 @@ priority: "Приоритет" high: "Высокий" middle: "Средне" low: "Низкий" -emailNotConfiguredWarning: "Не указан адрес электронной почты" +emailNotConfiguredWarning: "Не указан адрес электронной почты." ratio: "Соотношение" previewNoteText: "Предварительный просмотр" customCss: "Индивидуальный CSS" -customCssWarn: "Используйте эту настройку только если знаете, что делаете. Ошибки здесь чреваты тем, что сайт перестанет нормально работать у вас." +customCssWarn: "Используйте эту настройку только если знаете, что делаете. Ошибки\ + \ здесь чреваты тем, что сайт перестанет нормально работать у вас." global: "Всеобщая" squareAvatars: "Квадратные аватарки" sent: "Отправить" @@ -787,12 +850,14 @@ hashtags: "Хэштег" troubleshooting: "Разрешение проблем" useBlurEffect: "Размытие в интерфейсе" learnMore: "Подробнее" -misskeyUpdated: "Misskey обновился!" -whatIsNew: "Что новенького?" +misskeyUpdated: "Calckey обновился!" +whatIsNew: "Показать изменения" translate: "Перевод" translatedFrom: "Перевод. Язык оригинала — {x}" accountDeletionInProgress: "В настоящее время выполняется удаление учетной записи" -usernameInfo: "Имя, которое отличает вашу учетную запись от других на этом сервере. Вы можете использовать алфавит (a~z, A~Z), цифры (0~9) или символы подчеркивания (_). Имена пользователей не могут быть изменены позже." +usernameInfo: "Имя, которое отличает вашу учетную запись от других на этом сервере.\ + \ Вы можете использовать алфавит (a~z, A~Z), цифры (0~9) или символы подчеркивания\ + \ (_). Имена пользователей не могут быть изменены позже." aiChanMode: "ИИ режим" keepCw: "Сохраняйте Предупреждения о содержимом" pubSub: "Учётные записи Pub/Sub" @@ -808,12 +873,14 @@ filter: "Фильтры" controlPanel: "Панель управления" manageAccounts: "Управление аккаунтом" makeReactionsPublic: "Опубликовать список реакций" -makeReactionsPublicDescription: "Список сделанных вами реакций доступен для просмотра всем желающим." +makeReactionsPublicDescription: "Список сделанных вами реакций доступен для просмотра\ + \ всем желающим." classic: "Классика" muteThread: "Заглушить цепочку" unmuteThread: "Отменить глушение цепочки" ffVisibility: "Видимость подписок и подписчиков" -ffVisibilityDescription: "Здесь можно настроить, кто будет видеть ваши подписки и подписчиков." +ffVisibilityDescription: "Здесь можно настроить, кто будет видеть ваши подписки и\ + \ подписчиков." continueThread: "Показать следующие ответы" deleteAccountConfirm: "Учётная запись будет безвозвратно удалена. Подтверждаете?" incorrectPassword: "Пароль неверен." @@ -822,8 +889,9 @@ hide: "Спрятать" leaveGroup: "Покинуть группу" leaveGroupConfirm: "Покинуть группу «{name}»?" useDrawerReactionPickerForMobile: "Выдвижная палитра на мобильном устройстве" -welcomeBackWithName: "С возвращением, {name}!" -clickToFinishEmailVerification: "Пожалуйста, нажмите [{ok}], чтобы завершить подтверждение адреса электронной почты." +welcomeBackWithName: "С возвращением, {name}" +clickToFinishEmailVerification: "Пожалуйста, нажмите [{ok}], чтобы завершить подтверждение\ + \ адреса электронной почты." overridedDeviceKind: "Тип устройства" smartphone: "Смартфон" tablet: "Планшет" @@ -845,11 +913,23 @@ label: "Метка" localOnly: "Локально" beta: "Бета" enableAutoSensitive: "Автоматическое определение NSFW" -enableAutoSensitiveDescription: "Если доступно, используйте машинное обучение для автоматической установки флага NSFW на носителе. Даже если эта функция отключена, она может быть установлена ​​автоматически в зависимости от инстанта." +enableAutoSensitiveDescription: "Если доступно, используйте машинное обучение для\ + \ автоматической установки флага NSFW на носителе. Даже если эта функция отключена,\ + \ она может быть установлена автоматически в зависимости от инстанта." account: "Учётные записи" _sensitiveMediaDetection: - description: "Машинное обучение может быть использовано для автоматического обнаружения чувствительных медиа для модерации. Нагрузка на сервер увеличивается незначительно." + description: "Машинное обучение может быть использовано для автоматического обнаружения\ + \ чувствительных медиа для модерации. Нагрузка на сервер увеличивается незначительно." setSensitiveFlagAutomatically: "Установить флаг NSFW" + sensitivity: Чувствительность обнаружения + sensitivityDescription: Снижение чувствительности приведет к меньшему количеству + ошибочных обнаружений (ложноположительных результатов), в то время как ее увеличение + приведет к меньшему количеству пропущенных обнаружений (ложноотрицательных результатов). + setSensitiveFlagAutomaticallyDescription: Результаты внутреннего обнаружения будут + сохранены, даже если эта опция отключена. + analyzeVideos: Включить анализ видео + analyzeVideosDescription: Анализирует видео в дополнение к изображениям. Это немного + увеличит нагрузку на сервер. _emailUnavailable: used: "Уже используется" format: "Неверный формат" @@ -861,13 +941,16 @@ _ffVisibility: followers: "Показываются только подписчикам" private: "Показываются только вам" _signup: - almostThere: "Почти готово!" + almostThere: "Почти готово" emailAddressInfo: "Введите ваш адрес электронной почты." - emailSent: "На указанный вами адрес электронной почты ({email}) отправлено письмо. Перейдите по ссылке в письме, чтобы завершить регистрацию." + emailSent: "На указанный вами адрес электронной почты ({email}) отправлено письмо.\ + \ Перейдите по ссылке в письме, чтобы завершить регистрацию." _accountDelete: accountDelete: "Удалить свою учётную запись" - mayTakeTime: "Удаление учётной записи — ресурсозатратный процесс. Он может занять много времени, если вы много писали и загружали файлов." - sendEmail: "Когда ваша учетная запись будет удалена, мы сообщим на указанную вами электронную почту." + mayTakeTime: "Удаление учётной записи — ресурсозатратный процесс. Он может занять\ + \ много времени, если вы много писали и загружали файлов." + sendEmail: "Когда ваша учетная запись будет удалена, мы сообщим на указанную вами\ + \ электронную почту." requestAccountDelete: "Запросить удаление вашей учетной записи" started: "Процесс удаления начался." inProgress: "Удаление в процессе" @@ -875,19 +958,22 @@ _ad: back: "Выход" reduceFrequencyOfThisAd: "Реже показывать эту рекламу" _forgotPassword: - enterEmail: "Введите адрес электронной почты, который ввели при регистрации. На неё будет выслана ссылка для смены пароля." - ifNoEmail: "Если вы не ввели свой адрес электронной почты, свяжитесь с администратором ресурса, чтобы сменить пароль." - contactAdmin: "Здесь не используются адреса электронной почты, так что свяжитесь с администратором, чтобы поменять пароль." + enterEmail: "Введите адрес электронной почты, который ввели при регистрации. На\ + \ неё будет выслана ссылка для смены пароля." + ifNoEmail: "Если вы не ввели свой адрес электронной почты, свяжитесь с администратором\ + \ ресурса, чтобы сменить пароль." + contactAdmin: "Здесь не используются адреса электронной почты, так что свяжитесь\ + \ с администратором, чтобы поменять пароль." _gallery: my: "Личная" liked: "Понравившееся" - like: "Нравится!" + like: "Нравится" unlike: "Отменить «нравится»" _email: _follow: title: "Новый подписчик" _receiveFollowRequest: - title: "Новый запрос на подписку." + title: "Новый запрос на подписку" _plugin: install: "Установка расширений" installWarn: "Пожалуйста, не устанавливайте расширения, которым не доверяете." @@ -899,13 +985,15 @@ _registry: domain: "Домен" createKey: "Новый ключ" _aboutMisskey: - about: "Misskey — программа с открытым исходным кодом, которую разрабатывает syuilo с 2014 года." + about: "Calckey это форк Misskey, сделанный ThatOneCalculator, разработка которого\ + \ началась с 2022." contributors: "Основные соавторы" allContributors: "Все соавторы" source: "Исходный код" - translation: "Перевод Misskey" - donate: "Пожертвование на Misskey" - morePatrons: "Большое спасибо и многим другим, кто принял участие в этом проекте! 🥰" + translation: "Перевод Calckey" + donate: "Пожертвование на Calckey" + morePatrons: "Большое спасибо и многим другим, кто принял участие в этом проекте!\ + \ \U0001F970" patrons: "Материальная поддержка" _nsfw: respect: "Скрывать содержимое не для всех" @@ -913,10 +1001,13 @@ _nsfw: force: "Скрывать вообще все файлы" _mfm: cheatSheet: "Подсказка по разметке MFM" - intro: "MFM — язык оформления текста, который придуман специально для Misskey и готов для применения во многих местах. На этой странице собраны и кратко изложены способы его использовать." - dummy: "Misskey расширяет границы Федиверса." + intro: "MFM — язык оформления текста,используемый в Misskey, Calckey, Akkoma и готов\ + \ для применения во многих местах. На этой странице собраны и кратко изложены\ + \ способы его использовать." + dummy: "Calckey расширяет границы Федиверса" mention: "Упоминание" - mentionDescription: "При помощи знака «собака» перед именем можно упомянуть какого-нибудь пользователя." + mentionDescription: "При помощи знака «собака» перед именем можно упомянуть какого-нибудь\ + \ пользователя." hashtag: "Хэштег" hashtagDescription: "При помощи знака «решётка» перед словом задаётся хэштег." url: "Простая ссылка (URL)" @@ -932,11 +1023,13 @@ _mfm: inlineCode: "Программа (в тексте)" inlineCodeDescription: "Подсвечивает фрагмент программы внутри сплошного текста." blockCode: "Программа (блок)" - blockCodeDescription: "Оформляет текст программы в виде отдельного блокоа. Он может состоять из множества строк." + blockCodeDescription: "Оформляет текст программы в виде отдельного блокоа. Он может\ + \ состоять из множества строк." inlineMath: "Математическое выражение (в тексте)" - inlineMathDescription: "Позволяет вставлять математические выражения внутрь текста при помощи языка KaTeX." + inlineMathDescription: "Позволяет вставлять математические выражения внутрь текста\ + \ при помощи языка KaTeX" blockMath: "Математическое выражение (блок)" - blockMathDescription: "Оформляет математическое выражение (KaTeX) на отдельной строке." + blockMathDescription: "Оформляет математическое выражение (KaTeX) на отдельной строке" quote: "Цитата" quoteDescription: "Так можно процитировать чей-то текст." emoji: "Собственные эмодзи" @@ -948,7 +1041,7 @@ _mfm: jelly: "Анимация желе (шлёп-плёп)" jellyDescription: "Напоминает горку джема, дёргающуюся от шлепков." tada: "Анимация (та-дам!)" - tadaDescription: "Получается нечто выпрыгивающее, как бы крича: «а вот и я!»" + tadaDescription: "Получается нечто выпрыгивающее, как бы крича: «а вот и я!»." jump: "Анимация прыжков (прыг-скок)" jumpDescription: "Побуждает радостно подпрыгивать." bounce: "Анимация отскоков (бум-бум)" @@ -956,7 +1049,7 @@ _mfm: shake: "Анимация дрожи (б-р-р-р)" shakeDescription: "Такое дрожит, словно от холода. Или от страха." twitch: "Анимация тряски" - twitchDescription: "Заставляет трястись как одержимого" + twitchDescription: "Заставляет трястись как одержимого." spin: "Вращение" spinDescription: "Так можно крутить содержимое в разных направлениях." x2: "Крупный шрифт" @@ -966,7 +1059,8 @@ _mfm: x4: "Совсем крупно" x4Description: "Увеличивает содержимое совсем сильно." blur: "Размытие" - blurDescription: "Размывает текст до нечитаемости, будто его поместили за матовое стекло. Наведение указателя мыши на размытый текст возвращает чёткость." + blurDescription: "Размывает текст до нечитаемости, будто его поместили за матовое\ + \ стекло. Наведение указателя мыши на размытый текст возвращает чёткость." font: "Шрифт" fontDescription: "Так можно писать произвольным шрифтом." rainbow: "Радуга" @@ -975,6 +1069,8 @@ _mfm: sparkleDescription: "Добавляет эффект искрящихся частиц." rotate: "Повернуть" rotateDescription: "Поворачивает на заданный угол." + plain: Обычный текст + plainDescription: Деактивирует эффекты всех MFM, содержащихся в этом эффекте MFM. _instanceTicker: none: "Не показывать" remote: "Только для других сайтов" @@ -983,6 +1079,7 @@ _serverDisconnectedBehavior: reload: "Автоматическая перезагрузка" dialog: "Предупреждение" quiet: "Показать ненавязчивое предупреждение" + nothing: Ничего не делать _channel: create: "Создать канал" edit: "Редактировать канал" @@ -992,7 +1089,7 @@ _channel: owned: "Собственные" following: "Подписки" usersCount: "Участников: {n}" - notesCount: "Заметок: {n}" + notesCount: "Постов: {n}" _menuDisplay: sideFull: "Сторона" sideIcon: "Сторона (иконки)" @@ -1000,26 +1097,35 @@ _menuDisplay: hide: "Спрятать" _wordMute: muteWords: "Скрыть слово" - muteWordsDescription: "Пишите слова через пробел в одной строке, чтобы фильтровать их появление вместе; а если хотите фильтровать любое из них, пишите в отдельных строках." - muteWordsDescription2: "Здесь можно использовать регулярные выражения — просто заключите их между двумя дробными чертами (/)." - softDescription: "Соответствующие условиям заметки будут спрятаны из вашей ленты." - hardDescription: "Соответстующие условиям заметки вообще не будут попадать в вашу ленту. Даже если вы поменяете условия, отсеенные таким образом заметки уже не появятся." + muteWordsDescription: "Пишите слова через пробел в одной строке, чтобы фильтровать\ + \ их появление вместе; а если хотите фильтровать любое из них, пишите в отдельных\ + \ строках." + muteWordsDescription2: "Здесь можно использовать регулярные выражения — просто заключите\ + \ их между двумя дробными чертами (/)." + softDescription: "Соответствующие условиям посты будут спрятаны из вашей ленты." + hardDescription: "Соответстующие условиям посты вообще не будут попадать в вашу\ + \ ленту. Даже если вы поменяете условия, отсеенные таким образом посты уже не\ + \ появятся." soft: "Мягкий" hard: "Жёсткий" - mutedNotes: "Скрытые заметки" + mutedNotes: "Скрытые посты" _instanceMute: heading: "Список заглушенных инстансов" + instanceMuteDescription2: Разделить переносом строки + instanceMuteDescription: Это будет скрывать все посты/репосты с указанных инстансов, + включая ответы пользователю с заглушенного инстанса. + title: Скрывает посты с указанных инстансов. _theme: explore: "Обзор" install: "Установить тему" manage: "Менеджер тем" code: "Код темы" description: "Описание" - installed: "Тема «{name}» установлена." + installed: "Тема «{name}» установлена" installedThemes: "Установленные темы" builtinThemes: "Встроенные темы" - alreadyInstalled: "Тема уже установлена." - invalid: "Формат темы некорректный." + alreadyInstalled: "Тема уже установлена" + invalid: "Формат темы некорректный" make: "Создать тему" base: "Основа" addConstant: "Добавить константу" @@ -1036,8 +1142,9 @@ _theme: alpha: "Непрозрачность" darken: "Затемнение" lighten: "Осветление" - inputConstantName: "Введите имя для константы." - importInfo: "Если вы введете код темы здесь, вы можете импортировать его в редактор тем." + inputConstantName: "Введите имя для константы" + importInfo: "Если вы введете код темы здесь, вы можете импортировать его в редактор\ + \ тем" deleteConstantConfirm: "Вы действительно хотите удалить константу {const}?" keys: accent: "Акцент" @@ -1084,8 +1191,8 @@ _theme: accentLighten: "Фон (осветлённый)" fgHighlighted: "Подсвеченный текст" _sfx: - note: "Заметки" - noteMy: "Собственные заметки" + note: "Новый пост" + noteMy: "Собственные посты" notification: "Уведомления" chat: "Сообщения" chatBg: "Сообщения (фон)" @@ -1110,32 +1217,49 @@ _tutorial: title: "Как использовать Calckey" step1_1: "Добро пожаловать!" step1_2: "Давайте настроим вас. Вы будете работать в кратчайшие сроки!" - step2_1: "Сначала, пожалуйста, заполните свой профиль" - step2_2: "Предоставив некоторую информацию о себе, другим людям будет легче понять, хотят ли они видеть ваши записи или следить за вами." + step2_1: "Сначала, пожалуйста, заполните свой профиль." + step2_2: "Предоставив некоторую информацию о себе, другим людям будет легче понять,\ + \ хотят ли они видеть ваши записи или следить за вами." step3_1: "Теперь пора следить за некоторыми людьми!" - step3_2: "Ваша домашняя и социальная ленты основаны на том, за кем вы следите, поэтому для начала попробуйте следить за парой аккаунтов.\nНажмите на кружок с плюсом в правом верхнем углу профиля, чтобы следить за ним." - step4_1: "Давайте выйдем на вас" - step4_2: "Для своего первого сообщения некоторые люди любят делать {introduction} сообщение или простое \"Hello world!\"" + step3_2: "Ваша домашняя и социальная ленты основаны на том, за кем вы следите, поэтому\ + \ для начала попробуйте следить за парой аккаунтов.\nНажмите на кружок с плюсом\ + \ в правом верхнем углу профиля, чтобы следить за ним." + step4_1: "Давайте выйдем на вас." + step4_2: "Для своего первого сообщения некоторые люди любят делать {introduction}\ + \ сообщение или простое \"Hello world!\"" step5_1: "Временные рамки, везде временные рамки!" step5_2: "В вашем экземпляре включены {timelines} различных временных линий." - step5_3: "Главная {icon} временная шкала - это шкала, где вы можете видеть сообщения ваших подписчиков." - step5_4: "Местная {icon} временная шкала - это шкала, где вы можете видеть сообщения всех остальных пользователей данного экземпляра" - step5_5: "Временная шкала Рекомендуемые {icon} - это шкала, где вы можете видеть сообщения от инстанций, рекомендованных администраторами." - step5_6: "На временной шкале Social {icon} отображаются сообщения от друзей ваших подписчиков" - step5_7: "Глобальная {icon} временная шкала - это место, где вы можете видеть сообщения от всех других подключенных экземпляров" + step5_3: "Главная {icon} лента - это лента, где вы можете видеть сообщения ваших\ + \ подписок и других на этом инстансе. Если вы хотите чтобы главная лента показывала\ + \ только посты ваших подписок вы можете легко это изменить в настройках!" + step5_4: "Местная {icon} лента - это лента где вы можете видеть сообщения всех остальных\ + \ пользователей данного инстанса." + step5_5: "Лента Социальная {icon} - это лента, где вы можете видеть посты только\ + \ от аккаунтов, на которые вы подписаны." + step5_6: "Лента Рекомендованная {icon} это лента, где вы можете видеть посты с инстансов,\ + \ рекомендованных администраторами." + step5_7: "Глобальная {icon} лента - это место, где вы можете видеть сообщения от\ + \ всех других подключенных экземпляров." step6_1: "Итак, что это за место?" - step6_2: "Ну, вы не просто присоединились к Кальки. Вы присоединились к порталу в Fediverse, взаимосвязанной сети из тысяч серверов, называемых \"инстансами\"." - step6_3: "Каждый сервер работает по-своему, и не на всех серверах работает Calckey. Но этот работает! Это немного сложно, но вы быстро разберетесь" + step6_2: "Ну, вы не просто присоединились к Кальки. Вы присоединились к порталу\ + \ в Fediverse, взаимосвязанной сети из тысяч серверов, называемых \"инстансами\"\ + ." + step6_3: "Каждый сервер работает по-своему, и не на всех серверах работает Calckey.\ + \ Но этот работает! Это немного сложно, но вы быстро разберетесь." step6_4: "Теперь идите, изучайте и развлекайтесь!" _2fa: alreadyRegistered: "Двухфакторная аутентификация уже настроена." registerDevice: "Зарегистрируйте ваше устройство" registerKey: "Зарегистрировать ключ" - step1: "Прежде всего, установите на устройство приложение для аутентификации, например, {a} или {b}." + step1: "Прежде всего, установите на устройство приложение для аутентификации, например,\ + \ {a} или {b}." step2: "Далее отсканируйте отображаемый QR-код при помощи приложения." step3: "И наконец, введите код, который покажет приложение." - step4: "Теперь при каждом входе на сайт вам нужно будет вводить код из приложения аналогичным образом." - securityKeyInfo: "Вы можете настроить вход с помощью аппаратного ключа безопасности, поддерживающего FIDO2, или отпечатка пальца или PIN-кода на устройстве." + step4: "Теперь при каждом входе на сайт вам нужно будет вводить код из приложения\ + \ аналогичным образом." + securityKeyInfo: "Вы можете настроить вход с помощью аппаратного ключа безопасности,\ + \ поддерживающего FIDO2, или отпечатка пальца или PIN-кода на устройстве." + step2Url: 'Вы также можете ввести этот URL если используете программу на компьютере:' _permissions: "read:account": "Просматривать данные учётной записи" "write:account": "Изменять данные учётной записи" @@ -1151,7 +1275,7 @@ _permissions: "write:messaging": "Писать и удалять сообщения" "read:mutes": "Смотреть спискок скрытых пользователей" "write:mutes": "Изменять список скрытых пользователей" - "write:notes": "Писать и удалять заметки" + "write:notes": "Писать и удалять посты" "read:notifications": "Смотреть уведомления" "write:notifications": "Изменять уведомления" "read:reactions": "Смотреть реакции" @@ -1172,16 +1296,18 @@ _permissions: _auth: shareAccess: "Дать доступ для «{name}» к вашей учётной записи?" shareAccessAsk: "Уверены, что хотите дать приложению доступ к своей учётной записи?" - permissionAsk: "Приложение запрашивает следующие разрешения:" + permissionAsk: "Приложение запрашивает следующие разрешения" pleaseGoBack: "Вернитесь, пожалуйста, в приложение" callback: "Возврат в приложение" denied: "Доступ закрыт" + copyAsk: Пожалуйста, вставьте следующий код авторизации в приложение _antennaSources: - all: "Все заметки" - homeTimeline: "Заметки тех на которых вы подписаны" - users: "Заметки выбранных пользователей" - userList: "Заметки пользователей из выбранных списков" - userGroup: "Заметки от пользователей из заданной группы" + all: "Все посты" + homeTimeline: "Посты тех на которых вы подписаны" + users: "Посты выбранных пользователей" + userList: "Посты пользователей из выбранных списков" + userGroup: "Посты от пользователей из заданной группы" + instances: Посты от всех пользователей на инстансе _weekday: sunday: "Воскресенье" monday: "Понедельник" @@ -1210,20 +1336,26 @@ _widgets: serverMetric: "Показатели сервера" aiscript: "Консоль AiScript" aichan: "Ай" + rssTicker: RSS-тикер + unixClock: UNIX часы + instanceCloud: Облачко инстансов + userList: Список пользователей + _userList: + chooseList: Выберите список _cw: hide: "Спрятать" show: "Показать еще" chars: "знаков: {count}" files: "файлов: {count}" _poll: - noOnlyOneChoice: "Нужно хотя бы два варианта." + noOnlyOneChoice: "Нужно хотя бы два варианта" choiceN: "Выбор {n}" noMore: "Больше вариантов добавить нельзя" canMultipleVote: "Можно выбрать несколько вариантов" expiration: "Опрос длится" infinite: "вечно" - at: "до указанной даты" - after: "заданное время" + at: "Заканчивается..." + after: "Заканчивается после..." deadlineDate: "Дата окончания" deadlineTime: "Время" duration: "Длительность" @@ -1240,7 +1372,7 @@ _poll: _visibility: public: "Общедоступно" publicDescription: "Открыто для всех" - home: "Домашняя" + home: "Скрытый" homeDescription: "Не для общих лент" followers: "Для подписчиков" followersDescription: "Только вашим подписчикам" @@ -1249,21 +1381,21 @@ _visibility: localOnly: "Локально" localOnlyDescription: "Только для этого сайта" _postForm: - replyPlaceholder: "Ответ на заметку..." + replyPlaceholder: "Ответ на пост..." quotePlaceholder: "Пояснение к цитате..." - channelPlaceholder: "Отправить в канал" + channelPlaceholder: "Отправить в канал..." _placeholders: a: "Как дела?" b: "Что интересного вокруг?" c: "Что грызёт тебя, дружище?" - d: "Есть что сказать?.." + d: "Есть что сказать?" e: "Напишите что-нибудь…" f: "В ожидании, когда вы напишете…" _profile: name: "Имя" username: "Имя пользователя" description: "О себе" - youCanIncludeHashtags: "Можете использовать здесь хэштеги" + youCanIncludeHashtags: "Можете использовать здесь хэштеги." metadata: "Дополнительные сведения" metadataEdit: "Редактировать дополнительные сведения" metadataDescription: "Можно добавить до четырёх дополнительных граф в профиль." @@ -1271,8 +1403,10 @@ _profile: metadataContent: "Содержимое" changeAvatar: "Поменять аватар" changeBanner: "Поменять изображение в шапке" + locationDescription: Если вы сначала введете свой город, другим пользователям будет + показано ваше местное время. _exportOrImport: - allNotes: "Все записи\n" + allNotes: "Все посты" followingList: "Подписки" muteList: "Скрытые" blockingList: "Заблокированные" @@ -1285,10 +1419,10 @@ _charts: usersIncDec: "Изменение числа пользователей" usersTotal: "Количество пользователей" activeUsers: "Активные пользователи" - notesIncDec: "Изменение числа заметок" - localNotesIncDec: "Изменения числа локальных заметок" - remoteNotesIncDec: "Изменения числа заметок с других сайтов" - notesTotal: "Общее количество заметок" + notesIncDec: "Изменение числа постов" + localNotesIncDec: "Изменения числа локальных постов" + remoteNotesIncDec: "Изменения числа постов с других сайтов" + notesTotal: "Общее количество постов" filesIncDec: "Изменения числа файлов" filesTotal: "Суммарное количество файлов" storageUsageIncDec: "Изменения заполнения хранилища" @@ -1297,9 +1431,9 @@ _instanceCharts: requests: "Запросы" users: "Изменение числа пользователей" usersTotal: "Суммарное количество пользователей" - notes: "Изменение числа заметок" - notesTotal: "Суммарное количество заметок" - ff: "Изменения числа подписчиков" + notes: "Изменение числа постов" + notesTotal: "Суммарное количество постов" + ff: "Изменения числа подписчиков " ffTotal: "Суммарное количество подписчиков" cacheSize: "Изменения размера кэша" cacheSizeTotal: "Суммарный размер кэша" @@ -1310,17 +1444,18 @@ _timelines: local: "Местная" social: "Социальная" global: "Всеобщая" + recommended: Рекомендованная _pages: newPage: "Создать страницу" editPage: "Править страницу" readPage: "Читать страницу" - created: "Страница успешно создана." - updated: "Страница успешно обновлена." - deleted: "Страница успешно удалена." + created: "Страница успешно создана" + updated: "Страница успешно обновлена" + deleted: "Страница успешно удалена" pageSetting: "Настройки страницы" - nameAlreadyExists: "Указанный адрес страницы уже существует." - invalidNameTitle: "Указанный адрес страницы недопустим." - invalidNameText: "Проверьте, что не оставили поле пустым." + nameAlreadyExists: "Указанный адрес страницы уже существует" + invalidNameTitle: "Указанный адрес страницы недопустим" + invalidNameText: "Проверьте, что не оставили поле пустым" editThisPage: "Правка этой страницы" viewSource: "Просмотр исходника" viewPage: "Смотреть страницы" @@ -1359,7 +1494,7 @@ _pages: if: "Условный" _if: variable: "Переменная" - post: "Создание заметки" + post: "Создание поста" _post: text: "Текст" attachCanvasImage: "Прикрепить изображение с холста" @@ -1384,10 +1519,10 @@ _pages: id: "Метка холста" width: "Ширина" height: "Высота" - note: "Встроенная заметка" + note: "Встроенный пост" _note: - id: "Идентификатор заметки" - idDescription: "Можно также вставить ссылку на заметку." + id: "Идентификатор поста" + idDescription: "Можно также вставить ссылку на пост." detailed: "Подробный вид" switch: "Выключатель" _switch: @@ -1601,21 +1736,21 @@ _pages: argVariables: "Аргументы" _relayStatus: requesting: "В ожидании одобрения" - accepted: "Одобрено." - rejected: "Отказано." + accepted: "Одобрено" + rejected: "Отказано" _notification: - fileUploaded: "Файл успешно загружен." - youGotMention: "{name} упоминает вас." - youGotReply: "{name} отвечает вам." - youGotQuote: "{name} цитирует вас." - youRenoted: "{name} передаёт вашу заметку." - youGotPoll: "{name} участвует в вашем опросе." - youGotMessagingMessageFromUser: "{name} пишет вам." - youGotMessagingMessageFromGroup: "Новое сообщение в группе «{name}»." - youWereFollowed: "У вас новый подписчик." - youReceivedFollowRequest: "У вас новый запрос на подписку." - yourFollowRequestAccepted: "Ваш запрос на подписку одобрен." - youWereInvitedToGroup: "Вы приглашены в группу." + fileUploaded: "Файл успешно загружен" + youGotMention: "{name} упоминает вас" + youGotReply: "{name} отвечает вам" + youGotQuote: "{name} цитирует вас" + youRenoted: "{name} репостит ваш пост" + youGotPoll: "{name} участвует в вашем опросе" + youGotMessagingMessageFromUser: "{name} пишет вам" + youGotMessagingMessageFromGroup: "Новое сообщение в группе «{name}»" + youWereFollowed: "У вас новый подписчик" + youReceivedFollowRequest: "У вас новый запрос на подписку" + yourFollowRequestAccepted: "Ваш запрос на подписку одобрен" + youWereInvitedToGroup: "{userName} пригласил вас в группу" _types: all: "Все" follow: "Подписки" @@ -1629,9 +1764,13 @@ _notification: followRequestAccepted: "Запрос на подписку одобрен" groupInvited: "Приглашение в группы" app: "Уведомления из приложений" + pollEnded: Опрос закончен _actions: reply: "Ответить" renote: "Репост" + followBack: Подписался на вас обратно + emptyPushNotificationMessage: Пуш уведомления были обновлены + pollEnded: Результаты опроса стали доступны _deck: alwaysShowMainColumn: "Всегда показывать главную колонку" columnAlign: "Выравнивание колонок" @@ -1643,7 +1782,7 @@ _deck: swapDown: "Переставить ниже" stackLeft: "В столбик влево" popRight: "Из столбика вправо" - profile: "Профиль" + profile: "Воркспейс" _columns: main: "Основная" widgets: "Виджеты" @@ -1653,3 +1792,211 @@ _deck: list: "Списки" mentions: "Упоминания" direct: "Личное" + deleteProfile: Удалить воркспейс + introduction: Создайте идеальный интерфейс для себя, свободно расположив столбцы! + introduction2: Нажмите на + в правой части экрана, чтобы добавлять новые столбцы + в любое удобное для вас время. + widgetsIntroduction: Пожалуйста, выберите "Редактировать виджеты" в меню столбца + и добавьте виджет. + newProfile: Новый воркспейс + renameProfile: Переименовать воркспейс + nameAlreadyExists: Воркспейс с таким именем уже существует. +enableRecommendedTimeline: Включить рекомендованную ленту +regexpErrorDescription: 'Произошла ошибка в регулярном выражении на строке {line} + вашего {tab} списка скрытых слов:' +confirmToUnclipAlreadyClippedNote: Этот пост уже в подборке "{name}. Хотите ли вы + вместо этого удалить пост из подборки? +unclip: Удалить из подборки +secureMode: Безопасный Режим (Авторизованное Получение) +instanceSecurity: Безопасность инстанса +seperateRenoteQuote: Разделить кнопки репоста и цитаты +accountMoved: 'Пользователь переместился на новый аккаунт:' +manageGroups: Управлять группами +allowedInstancesDescription: Список хостов, разрешённых для федерации, каждый разделён + новой строкой(применяется только в приватном режиме). +noThankYou: Нет, спасибо +addInstance: Добавить инстанс +flagSpeakAsCat: Говорить как кот +flagSpeakAsCatDescription: Ваши будут посты няифицированы в режиме кота +selectInstance: Выбрать инстанс +antennaInstancesDescription: Список инстансов, каждый с новой строки +privateMode: Приватный режим +privateModeInfo: Когда включено только инстансы в белом списке могут федерировать + с вашим инстансов. Все посты будут скрыты. +allowedInstances: Белый список инстансов +userSaysSomethingReason: '{name} сказал {reason}' +renoteMute: Заглушить репосты +renoteUnmute: Разглушить репосты +hiddenTags: Скрытые хештеги +noInstances: Нет инстансов +secureModeInfo: При запросах с других инстансов не отправлять ответ без подтверждения. +instanceDefaultThemeDescription: Введите код темы в формате объекта. +tenMinutes: 10 минут +oneHour: Один час +thereIsUnresolvedAbuseReportWarning: Есть не рассмотренные жалобы. +cropImage: Обрезать изображение +requireAdminForView: Вы должны войти с аккаунта администратора что просмотреть это. +refreshInterval: 'Интервал обновления ' +slow: Медленно +fast: Быстро +sensitiveMediaDetection: Обнаружение NSFW медиа +remoteOnly: Только другие сайты +navbar: Панель навигации +customMOTD: Своё MOTD (сообщения на заставке) +customMOTDDescription: Пользовательские сообщения для MOTD (заставки), разделенные + разрывами строк, будут отображаться случайным образом каждый раз, когда пользователь + загружает / перезагружает страницу. +recommendedInstancesDescription: Рекомендуемые инстансы, разделенные разрывами строк, + должны отображаться на рекомендуемой ленте. НЕ добавляйте `https://`, ТОЛЬКО домен. +caption: Автоматическая подпись +splash: Заставка +updateAvailable: Возможно, доступно обновление! +move: Переместить +swipeOnDesktop: Разрешить свайпы в мобильном стиле на десктопе +showAds: Показывать рекламу +noEmailServerWarning: Почтовый сервер не настроен. +type: Тип +numberOfPageCacheDescription: Увеличение этого числа повысит удобство для пользователей, + но приведет к увеличению нагрузки на сервер, а также к использованию большего объема + памяти. +statusbar: Панель статуса +speed: Скорость +oneDay: Один день +oneWeek: Одна неделя +failedToFetchAccountInformation: Не удалось получить информацию о аккаунте +cropImageAsk: Желаете ли вы обрезать это изображение? +recentNHours: Последние {n} часов +recentNDays: Последние {n} дней +typeToConfirm: Введите {x} чтобы подтвердить +document: Документация +logoutConfirm: Действительно выйти? +failedToUpload: Не удалось загрузить +pushNotification: Пуш уведомления +subscribePushNotification: Включить пуш уведомления +unsubscribePushNotification: Отключить пуш уведомления +pushNotificationAlreadySubscribed: Пуш уведомления уже включены +sendPushNotificationReadMessage: Удалять пуш уведомления после того как соответствующие + уведомления или сообщения были прочитаны +customSplashIcons: Свои иконки для заставки (URL) +customSplashIconsDescription: URL-адреса для пользовательских значков заставки, разделенных + разрывами строк, будут отображаться случайным образом каждый раз, когда пользователь + загружает / перезагружает страницу. Пожалуйста, убедитесь, что изображения находятся + на статическом URL-адресе, предпочтительно все с размером 192x192. +logoImageUrl: URL изображения логотипа +showAdminUpdates: Указать, что доступна новая версия Calckey (только для администратора) +replayTutorial: Перезапустить туториал +migration: Миграция +showLocalPosts: 'Показать локальные посты в:' +homeTimeline: Домашняя лента +socialTimeline: Социальная лента +driveCapOverrideCaption: Сбросить до настроек по умолчанию введя значение 0 или меньше. +deleteAccount: Удалить аккаунт +numberOfPageCache: Число кэшируемых страниц +pushNotificationNotSupported: Ваш браузер или инстанс не поддерживает пуш уведомления +sendPushNotificationReadMessageCaption: Уведомление содержащее текст "{emptyPushNotificationMessage}" + будет показано на короткое время. Это может увеличить расход батареи вашего устройства, + если это применимо. +cannotUploadBecauseNoFreeSpace: Загрузка не удалась из-за нехватки места на Диске. +cannotUploadBecauseInappropriate: Этот файл не может быть загружен потому что его + части были обнаружены как потенциальное NSFW. +adminCustomCssWarn: Этот параметр следует использовать только в том случае, если вы + знаете, что он делает. Ввод неправильных значений может привести к тому, что ВСЕ + клиенты перестанут нормально функционировать. Пожалуйста, убедитесь, что ваш CSS + работает должным образом, протестировав его в настройках вашего пользователя. +showUpdates: Показывать всплывающее окно при обновлении Calckey +recommendedInstances: Рекомендованные инстансы +defaultReaction: Эмодзи реакция по умолчанию для выходящих и исходящих постов +license: Лицензия +indexPosts: Индексировать посты +indexFrom: Индексировать начиная с идентификатора поста и далее (оставьте пустым для + индексации каждого поста) +indexNotice: Теперь индексирование. Вероятно, это займет некоторое время, пожалуйста, + не перезагружайте свой сервер по крайней мере в течение часа. +customKaTeXMacro: Кастомные KaTex макросы +enableCustomKaTeXMacro: Включить кастомные KaTeX макросы +noteId: Идентификатор поста +_preferencesBackups: + inputName: Введите имя для этой резервной копии + list: Созданные резервные копии + loadFile: Загрузить из файла + apply: Применить для этого устройства + save: Сохранить изменения + saveNew: Сохранить новую резервную копию + applyConfirm: Вы действительно хотите применить резервную копию "{name}" на этом + устройстве? Существует настройки на этом устройстве будут перезаписаны. + renameConfirm: Переименовать резервную копию "{old}" в "{new}"? + saveConfirm: Сохранить резервную как {name}? + cannotSave: Сохранение не удалось + nameAlreadyExists: Резервная копия с именем "{name}" уже существующует. Выберите + другое имя. + deleteConfirm: Удалить резервную копию {name}? + noBackups: Нет резервных копий. Вы может сделать резервную копию настроек клиента + на этом сервере используя "Создать новую резервную копию". + createdAt: 'Создано: {date} {time}' + updatedAt: 'Обновлено: {date} {time}' + cannotLoad: Загрузка не удалась + invalidFile: Неправильный формат файла +enableEmojiReactions: Включить эмодзи реакции +_apps: + paid: Платные + lesskey: Lesskey + pwa: Установить PWA + free: Бесплатные + apps: Приложения + crossPlatform: Кроссплатформенные + mobile: Мобильные + firstParty: От разработчиков + firstClass: Первый класс + thirdClass: Третий класс + kaiteki: Kaiteki + milktea: Milktea + missLi: MissLi + mona: Mona + theDesk: TheDesk + secondClass: Второй класс +migrationConfirm: "Вы абсолютно уверены что хотите мигрировать ваш аккаунт на {account}?\ + \ Как только вы сделаете, вы не сможете отменить это и не сможете нормально использовать\ + \ аккаунт снова.\nТакже, пожалуйста, убедитесь, что вы установили эту текущую учетную\ + \ запись в качестве учетной записи, с которой вы переходите." +reporter: Автор жалобы +mutePeriod: Длительность глушения +reflectMayTakeTime: Это может занять некоторое время чтобы вступило в силу. +rateLimitExceeded: Превышен лимит +pleaseSelect: Выберите вариант +shuffle: Перемешать +moveFrom: Переместится на этот аккаунт с старого аккаунта +moveFromLabel: 'Аккаунт с которого перемещаетесь:' +moveAccountDescription: Этот процесс необратим. Убедитесь что вы сделали псевдоним + для этого аккаунта до перемещения. Пожалуйста введите аккаунт в формате @person@instance.com +moveTo: Переместить текущий аккаунт на новый аккаунт +_messaging: + groups: Группы + dms: Личные +isSystemAccount: Учетная запись, созданная системой и автоматически управляемая ею. +activeEmailValidationDescription: Включить более строгую проверки адресов электронной + почты,что включает в себя проверку наличия одноразовых адресов и того, действительно + ли с ними можно связаться. Если флажок снят, проверяется только формат адреса. +moveToLabel: 'Аккаунт на который вы перемещаетесь:' +lastActiveDate: Последний раз использовался в +enterSendsMessage: Нажать Return в Сообщениях чтобы отправить сообщение (если выключено, + то Ctrl + Return) +moveAccount: Переместить аккаунт! +breakFollowConfirm: Вы действительно хотите удалить подписчика? +showEmojisInReactionNotifications: Показывать эмодзи в уведомлениях о реакциях +hiddenTagsDescription: 'Список хештегов (без #), которые вы желаете скрыть из "актуальное" + и "обзор". Скрытые хэштеги по-прежнему можно обнаружить в других местах.' +moveFromDescription: Это установит псевдоним для старого аккаунта, так что вы сможете + переместить тот аккаунт на текущий. Делайте это ДО перемещения со старого аккаунта. + Пожалуйста введите аккаунт в формате @person@instance.com +customKaTeXMacroDescription: 'Настройте макросы чтобы легко писать математические + выражения! Обозначение соответствует определениям команд LaTeX и записывается как + \newcommand{\название}{содержание} или \newcommand{\название}[количество аргументов]{содержание}. + Для примера, \add{3}[2]{#1 + #2} будет раскрывать \add{3}{foo} до 3 + foo. Фигурные + скобки, окружающие имя макроса, можно заменить на круглые или квадратные скобки. + Это влияет на квадратные скобки, используемые для аргументов. Для каждой строки + может быть определен один (и только один) макрос, и вы не можете прерывать строку + в середине определения. Недопустимые строки просто игнорируются. Поддерживаются + только простые функции подстановки строк; расширенный синтаксис, такой как условное + ветвление, здесь использоваться не может.' +cannotUploadBecauseExceedsFileSizeLimit: Этот файл не может быть загружен так как + он превышает максимально разрешённый размер. diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index ced0d67b7e..3f8a4b7b9c 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -1174,27 +1174,6 @@ _time: minute: "min" hour: "hod" day: "dní" -_tutorial: - title: "How to use Calckey" - step1_1: "Welcome!" - step1_2: "Let's get you set up. You'll be up and running in no time!" - step2_1: "First, please fill out your profile." - step2_2: "Providing some information about who you are will make it easier for others to tell if they want to see your notes or follow you." - step3_1: "Now time to follow some people!" - step3_2: "Your home and social timelines are based off of who you follow, so try following a couple accounts to get started.\nClick the plus circle on the top right of a profile to follow them." - step4_1: "Let's get you out there." - step4_2: "For your first post, some people like to made a {introduction} post or a simple \"Hello world!\"" - step5_1: "Timelines, timelines everywhere!" - step5_2: "Your instance has {timelines} different timelines enabled." - step5_3: "The Home {icon} timeline is where you can see posts from your followers." - step5_4: "The Local {icon} timeline is where you can see posts from everyone else on this instance." - step5_5: "The Recommended {icon} timeline is where you can see posts from instances the admins recommend." - step5_6: "The Social {icon} timeline is where you can see posts from friends of your followers." - step5_7: "The Global {icon} timeline is where you can see posts from every other connected instance." - step6_1: "So, what is this place?" - step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse, an interconnected network of thousands of servers, called \"instances\"." - step6_3: "Each server works in different ways, and not all servers run Calckey. This one does though! It's a bit complicated, but you'll get the hang of it in no time." - step6_4: "Now go, explore, and have fun!" _2fa: alreadyRegistered: "Už ste zaregistrovali 2-faktorové autentifikačné zariadenie." registerDevice: "Registrovať nové zariadenie" diff --git a/locales/vi-VN.yml b/locales/vi-VN.yml index 4f38b80c84..48ef4e3234 100644 --- a/locales/vi-VN.yml +++ b/locales/vi-VN.yml @@ -1179,27 +1179,6 @@ _time: minute: "phút" hour: "giờ" day: "ngày" -_tutorial: - title: "How to use Calckey" - step1_1: "Welcome!" - step1_2: "Let's get you set up. You'll be up and running in no time!" - step2_1: "First, please fill out your profile." - step2_2: "Providing some information about who you are will make it easier for others to tell if they want to see your notes or follow you." - step3_1: "Now time to follow some people!" - step3_2: "Your home and social timelines are based off of who you follow, so try following a couple accounts to get started.\nClick the plus circle on the top right of a profile to follow them." - step4_1: "Let's get you out there." - step4_2: "For your first post, some people like to made a {introduction} post or a simple \"Hello world!\"" - step5_1: "Timelines, timelines everywhere!" - step5_2: "Your instance has {timelines} different timelines enabled." - step5_3: "The Home {icon} timeline is where you can see posts from your followers." - step5_4: "The Local {icon} timeline is where you can see posts from everyone else on this instance." - step5_5: "The Recommended {icon} timeline is where you can see posts from instances the admins recommend." - step5_6: "The Social {icon} timeline is where you can see posts from friends of your followers." - step5_7: "The Global {icon} timeline is where you can see posts from every other connected instance." - step6_1: "So, what is this place?" - step6_2: "Well, you didn't just join Calckey. You joined a portal to the Fediverse, an interconnected network of thousands of servers, called \"instances\"." - step6_3: "Each server works in different ways, and not all servers run Calckey. This one does though! It's a bit complicated, but you'll get the hang of it in no time." - step6_4: "Now go, explore, and have fun!" _2fa: alreadyRegistered: "Bạn đã đăng ký thiết bị xác minh 2 bước." registerDevice: "Đăng ký một thiết bị" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 310121c5ae..c652b52b7d 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1,5 +1,5 @@ --- -_lang_: "中文(简体)" +_lang_: "简体中文" headlineMisskey: "通过帖子连接在一起的网络" introMisskey: "欢迎!Misskey是一个开源的、去中心化的“微博客”服务。\n通过编写「帖文」来和大家分享你的以及你周围的事情吧!📡\n通过「回应」功能,可以让你快速地对大家的帖文表达反馈👍\n来探索新的世界吧!🚀" monthAndDay: "{month}月 {day}日" @@ -107,6 +107,8 @@ clickToShow: "点击以显示" sensitive: "敏感内容" add: "添加" reaction: "回应" +enableEmojiReaction: "启用表情符号回应" +showEmojisInReactionNotifications: "在回应通知中显示表情符号" reactionSetting: "在选择器中显示的回应" reactionSettingDescription2: "拖动重新排序,单击删除,点击 + 添加。" rememberNoteVisibility: "保存上次设置的可见性" @@ -116,6 +118,8 @@ unmarkAsSensitive: "取消标记为敏感内容" enterFileName: "请输入文件名" mute: "屏蔽" unmute: "解除屏蔽" +renoteMute: "屏蔽转帖" +renoteUnmute: "解除屏蔽转帖" block: "拉黑" unblock: "取消拉黑" suspend: "冻结" @@ -892,6 +896,9 @@ navbar: "导航栏" shuffle: "随机" account: "账户" move: "移动" +customKaTeXMacro: "自定义 KaTeX 宏" +customKaTeXMacroDescription: "使用宏来轻松的输入数学表达式吧!宏的用法与 LaTeX 中的命令定义相同。你可以使用 \\newcommand{\\name}{content} 或 \\newcommand{\\name}[number of arguments]{content} 来输入数学表达式。举个例子,\\newcommand{\\add}[2]{#1 + #2} 会将 \\add{3}{foo} 展开为 3 + foo。此外,宏名称外的花括号 {} 可以被替换为圆括号 () 和方括号 [],这会影响用于参数的括号。每行只能够定义一个宏,无法在中间换行,且无效的行将被忽略。只支持简单字符串替换功能,不支持高级语法,如条件分支等。" +enableCustomKaTeXMacro: "启用自定义 KaTeX 宏" _sensitiveMediaDetection: description: "可以使用机器学习技术自动检测敏感媒体,以便进行审核。服务器负载将略微增加。" sensitivity: "检测敏感度" @@ -1726,7 +1733,9 @@ _deck: popRight: "向右弹出" profile: "配置文件" newProfile: "新建配置文件" + renameProfile: "重命名配置文件" deleteProfile: "删除配置文件" + nameAlreadyExists: "该配置文件名已存在。" introduction: "将各列进行组合以创建您自己的界面!" introduction2: "您可以随时通过屏幕右侧的 + 来添加列" widgetsIntroduction: "从列菜单中,选择“小工具编辑”来添加小工具" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index e7528f9a2d..eb640b7dd4 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1,7 +1,7 @@ ---- _lang_: "繁體中文" headlineMisskey: "貼文連繫網路" -introMisskey: "歡迎! Misskey是一個開放原始碼且去中心化的社群網路。\n透過「貼文」分享周邊新鮮事,並告訴其他人您的想法!📡\n透過「反應」功能,對大家的貼文表達情感!👍\n一起來探索這個新的世界吧!🚀" +introMisskey: "歡迎! Misskey是一個開放原始碼且去中心化的社群網路。\n透過「貼文」分享周邊新鮮事,並告訴其他人您的想法!\U0001F4E1\ + \n透過「反應」功能,對大家的貼文表達情感!\U0001F44D\n一起來探索這個新的世界吧!\U0001F680" monthAndDay: "{month}月 {day}日" search: "搜尋" notifications: "通知" @@ -14,7 +14,7 @@ gotIt: "知道了" cancel: "取消" enterUsername: "輸入使用者名稱" renotedBy: "{user} 轉傳了" -noNotes: "無貼文。" +noNotes: "無貼文" noNotifications: "沒有通知" instance: "實例" settings: "設定" @@ -23,19 +23,19 @@ otherSettings: "其他設定" openInWindow: "在新視窗開啟" profile: "個人檔案" timeline: "時間軸" -noAccountDescription: "此用戶還沒有自我介紹" +noAccountDescription: "此用戶還沒有自我介紹。" login: "登入" loggingIn: "登入中" logout: "登出" signup: "註冊" -uploading: "上傳中" +uploading: "上傳中..." save: "儲存" users: "使用者" addUser: "新增使用者" favorite: "我的最愛" favorites: "我的最愛" unfavorite: "從我的最愛中移除" -favorited: "已添加至我的最愛" +favorited: "已添加至我的最愛。" alreadyFavorited: "我的最愛中已存在。" cantFavorite: "無法加入至我的最愛。" pin: "置頂" @@ -64,7 +64,7 @@ import: "匯入" export: "匯出" files: "檔案" download: "下載" -driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。\n" +driveFileDeleteConfirm: "確定要刪除檔案「{name}」嗎?使用此附件的貼文也會跟著消失。" unfollowConfirm: "確定要取消追隨{name}嗎?" exportRequested: "已請求匯出。這可能會花一點時間。結束後檔案將會被放到雲端裡。" importRequested: "已請求匯入。這可能會花一點時間" @@ -107,6 +107,8 @@ clickToShow: "按一下以顯示" sensitive: "敏感內容" add: "新增" reaction: "情感" +enableEmojiReaction: "啟用表情符號反應" +showEmojisInReactionNotifications: "在反應通知中顯示表情符號" reactionSetting: "在選擇器中顯示反應" reactionSettingDescription2: "拖動以重新列序,點擊以刪除,按下 + 添加。" rememberNoteVisibility: "記住貼文可見性" @@ -116,6 +118,8 @@ unmarkAsSensitive: "取消標記為敏感內容" enterFileName: "請輸入檔案名稱" mute: "靜音" unmute: "解除靜音" +renoteMute: "靜音轉發貼文" +renoteUnmute: "解除靜音轉發貼文" block: "封鎖" unblock: "解除封鎖" suspend: "凍結" @@ -139,7 +143,7 @@ settingGuide: "推薦設定" cacheRemoteFiles: "快取遠端檔案" cacheRemoteFilesDescription: "禁用此設定會停止遠端檔案的緩存,從而節省儲存空間,但資料會因直接連線從而產生額外連接數據。" flagAsBot: "此使用者是機器人" -flagAsBotDescription: "如果本帳戶是由程式控制,請啟用此選項。啟用後,會作為標示幫助其他開發者防止機器人之間產生無限互動的行為,並會調整Misskey內部系統將本帳戶識別為機器人" +flagAsBotDescription: "如果本帳戶是由程式控制,請啟用此選項。啟用後,會作為標示幫助其他開發者防止機器人之間產生無限互動的行為,並會調整Calckey內部系統將本帳戶識別為機器人" flagAsCat: "此使用者是貓" flagAsCatDescription: "如果想將本帳戶標示為一隻貓,請開啟此標示" flagShowTimelineReplies: "在時間軸上顯示貼文的回覆" @@ -199,7 +203,7 @@ noUsers: "沒有任何使用者" editProfile: "編輯個人檔案" noteDeleteConfirm: "確定刪除此貼文嗎?" pinLimitExceeded: "不能置頂更多貼文了" -intro: "Misskey 部署完成!請建立管理員帳戶。" +intro: "Calckey 部署完成!請建立管理員帳戶。" done: "完成" processing: "處理中" preview: "預覽" @@ -287,7 +291,7 @@ emptyDrive: "雲端硬碟為空" emptyFolder: "資料夾為空" unableToDelete: "無法刪除" inputNewFileName: "輸入檔案名稱" -inputNewDescription: "請輸入新標題 " +inputNewDescription: "請輸入新標題" inputNewFolderName: "輸入新資料夾的名稱" circularReferenceFolder: "目標文件夾是您要移動的文件夾的子文件夾。" hasChildFilesOrFolders: "此文件夾不是空的,無法刪除。" @@ -320,7 +324,7 @@ yearX: "{year}年" pages: "頁面" integration: "整合" connectService: "己連結" -disconnectService: "己斷開 " +disconnectService: "己斷開" enableLocalTimeline: "開啟本地時間軸" enableGlobalTimeline: "啟用公開時間軸" disablingTimelinesInfo: "即使您關閉了時間線功能,管理員和協調人仍可以繼續使用,以方便您。" @@ -332,7 +336,7 @@ driveCapacityPerRemoteAccount: "每個非本地用戶的雲端容量" inMb: "以Mbps為單位" iconUrl: "圖像URL" bannerUrl: "橫幅圖像URL" -backgroundImageUrl: "背景圖片的來源網址 " +backgroundImageUrl: "背景圖片的來源網址" basicInfo: "基本資訊" pinnedUsers: "置頂用戶" pinnedUsersDescription: "在「發現」頁面中使用換行標記想要置頂的使用者。" @@ -378,7 +382,7 @@ exploreFediverse: "探索聯邦世界" popularTags: "熱門標籤" userList: "清單" about: "資訊" -aboutMisskey: "關於 Misskey" +aboutMisskey: "關於 Calckey" administrator: "管理員" token: "權杖" twoStepAuthentication: "兩階段驗證" @@ -486,7 +490,7 @@ useObjectStorage: "使用Object Storage" objectStorageBaseUrl: "Base URL" objectStorageBaseUrlDesc: "引用時的URL。如果您使用的是CDN或反向代理,请指定其URL,例如S3:“https://.s3.amazonaws.com”,GCS:“https://storage.googleapis.com/”" objectStorageBucket: "儲存空間(Bucket)" -objectStorageBucketDesc: "請指定您正在使用的服務的存儲桶名稱。 " +objectStorageBucketDesc: "請指定您正在使用的服務的存儲桶名稱。" objectStoragePrefix: "前綴" objectStoragePrefixDesc: "它存儲在此前綴目錄下。" objectStorageEndpoint: "端點(Endpoint)" @@ -524,7 +528,7 @@ sort: "排序" ascendingOrder: "昇冪" descendingOrder: "降冪" scratchpad: "暫存記憶體" -scratchpadDescription: "AiScript控制台為AiScript提供了實驗環境。您可以在此編寫、執行和確認代碼與Misskey互動的结果。" +scratchpadDescription: "AiScript控制台為AiScript提供了實驗環境。您可以在此編寫、執行和確認代碼與Calckey互動的结果。" output: "輸出" script: "腳本" disablePagesScript: "停用頁面的AiScript腳本" @@ -556,8 +560,8 @@ disablePlayer: "關閉播放器" expandTweet: "展開推文" themeEditor: "主題編輯器" description: "描述" -describeFile: "添加標題 " -enterFileDescription: "輸入標題 " +describeFile: "添加標題" +enterFileDescription: "輸入標題" author: "作者" leaveConfirm: "有未保存的更改。要放棄嗎?" manage: "管理" @@ -640,7 +644,7 @@ instanceTicker: "貼文的實例來源" waitingFor: "等待{x}" random: "隨機" system: "系統" -switchUi: "切換界面" +switchUi: "界面" desktop: "桌面" clip: "摘錄" createNew: "新建" @@ -791,7 +795,7 @@ hashtags: "#tag" troubleshooting: "故障排除" useBlurEffect: "在 UI 上使用模糊效果" learnMore: "更多資訊" -misskeyUpdated: "Misskey 更新完成!" +misskeyUpdated: "Calckey 更新完成!" whatIsNew: "顯示更新資訊" translate: "翻譯" translatedFrom: "從 {x} 翻譯" @@ -861,7 +865,7 @@ driveCapOverrideLabel: "更改這個使用者的雲端硬碟容量上限" driveCapOverrideCaption: "如果指定0以下的值,就會被取消。" requireAdminForView: "必須以管理者帳號登入才可以檢視。" isSystemAccount: "由系統自動建立與管理的帳號。" -typeToConfirm: "要執行這項操作,請輸入 {x} " +typeToConfirm: "要執行這項操作,請輸入 {x}" deleteAccount: "刪除帳號" document: "文件" numberOfPageCache: "快取頁面數" @@ -872,7 +876,7 @@ statusbar: "狀態列" pleaseSelect: "請選擇" reverse: "翻轉" colored: "彩色" -refreshInterval: "更新間隔" +refreshInterval: "更新間隔 " label: "標籤" type: "類型" speed: "速度" @@ -891,7 +895,13 @@ activeEmailValidationDescription: "積極地驗證用戶的電子郵件地址, navbar: "導覽列" shuffle: "隨機" account: "帳戶" -move: "移動 " +move: "移動" +customKaTeXMacro: "自定義 KaTeX 宏" +customKaTeXMacroDescription: "使用宏來輕鬆的輸入數學表達式吧!宏的用法與 LaTeX 中的命令定義相同。你可以使用 \\newcommand{\\\ + name}{content} 或 \\newcommand{\\name}[number of arguments]{content} 來輸入數學表達式。舉個例子,\\\ + newcommand{\\add}[2]{#1 + #2} 會將 \\add{3}{foo} 展開為 3 + foo。此外,宏名稱外的花括號 {} 可以被替換為圓括號\ + \ () 和方括號 [],這會影響用於參數的括號。每行只能夠定義一個宏,無法在中間換行,且無效的行將被忽略。只支持簡單字符串替換功能,不支持高級語法,如條件分支等。" +enableCustomKaTeXMacro: "啟用自定義 KaTeX 宏" _sensitiveMediaDetection: description: "您可以使用機器學習自動檢測敏感媒體並將其用於審核。 伺服器的負荷會稍微增加。" sensitivity: "檢測敏感度" @@ -923,11 +933,11 @@ _accountDelete: inProgress: "正在刪除" _ad: back: "返回" - reduceFrequencyOfThisAd: "降低此廣告的頻率 " + reduceFrequencyOfThisAd: "降低此廣告的頻率" _forgotPassword: enterEmail: "請輸入您的帳戶註冊的電子郵件地址。 密碼重置連結將被發送到該電子郵件地址。" - ifNoEmail: "如果您還沒有註冊您的電子郵件地址,請聯繫管理員。 " - contactAdmin: "此實例不支持電子郵件,請聯繫您的管理員重置您的密碼。 " + ifNoEmail: "如果您還沒有註冊您的電子郵件地址,請聯繫管理員。" + contactAdmin: "此實例不支持電子郵件,請聯繫您的管理員重置您的密碼。" _gallery: my: "我的貼文" liked: "喜歡的貼文" @@ -967,13 +977,13 @@ _registry: domain: "域" createKey: "新增機碼" _aboutMisskey: - about: "Misskey是由syuilo自2014年起開發的開源軟體。" + about: "Calckey是由ThatOneCalculator自2022年起開發的Misskey分支。" contributors: "主要貢獻者" allContributors: "全體貢獻人員" source: "原始碼" - translation: "翻譯Misskey" - donate: "贊助Misskey" - morePatrons: "還有許許多多幫助我們的其他人,非常感謝你們。 🥰" + translation: "翻譯Calckey" + donate: "贊助Calckey" + morePatrons: "還有許許多多幫助我們的其他人,非常感謝你們。 \U0001F970" patrons: "贊助者" _nsfw: respect: "隱藏敏感內容" @@ -982,7 +992,7 @@ _nsfw: _mfm: cheatSheet: "MFM代碼小抄" intro: "MFM是Misskey專用的標記語言,可以在Misskey中的各個位置使用。 您可以這裏看到MFM可用語法列表。" - dummy: "Misskey拓展了Fediverse的世界" + dummy: "Calckey拓展了Fediverse的世界" mention: "提及" mentionDescription: "透過 @+用戶名 來標示特定使用者。" hashtag: "#tag" @@ -990,7 +1000,7 @@ _mfm: url: "URL" urlDescription: "可以展示URL位址。" link: "鏈接" - linkDescription: "您可以將特定範圍的文章與 URL 相關聯。 " + linkDescription: "您可以將特定範圍的文章與 URL 相關聯。" bold: "粗體" boldDescription: "可以將文字顯示为粗體来強調。" small: "縮小" @@ -1387,6 +1397,7 @@ _timelines: local: "本地" social: "社群" global: "公開" + recommended: 推薦 _pages: newPage: "建立頁面" editPage: "編輯頁面" @@ -1726,7 +1737,9 @@ _deck: popRight: "向右彈出" profile: "個人檔案" newProfile: "新建個人檔案" + renameProfile: "重新命名個人檔案" deleteProfile: "刪除個人檔案" + nameAlreadyExists: "該個人檔案名已經存在。" introduction: "組合欄位來製作屬於自己的介面吧!" introduction2: "您可以隨時透過按畫面右方的 + 來添加欄位。" widgetsIntroduction: "請從欄位的選單中,選擇「編輯小工具」來添加小工具" @@ -1739,3 +1752,59 @@ _deck: list: "清單" mentions: "提及" direct: "指定使用者" +secureMode: 安全模式(授權獲取) +instanceSecurity: 實例安全性 +privateMode: 私人模式 +allowedInstances: 列入白名單的實例 +secureModeInfo: 當從其他實例請求時,不要在沒有證據的情況下發回。 +_messaging: + dms: 私訊 + groups: 群組 +manageGroups: 管理群組 +replayTutorial: 重新播放教程 +moveFromLabel: '您想遷移的舊帳戶:' +customMOTDDescription: 每次用戶加載/重新加載頁面時,由換行符號分隔的 MOTD(啟動畫面)的自定信息將隨機顯示。 +privateModeInfo: 啟用後,只有列入白名單的實例才能與您的實例聯合。所有貼文都將對公眾隱藏。 +adminCustomCssWarn: 除非你知道它的作用,否則請不要使用此設定。 輸入不正確的值可能會導致每個人的客戶端無法正常運行。你可在你的的用戶設定中測試,確保你的 + CSS 正常工作。 +showUpdates: Calckey 更新時顯示彈出視窗 +recommendedInstances: 建議的實例 +caption: 自動字幕 +enterSendsMessage: 在 Messaging 中按 Return 發送消息 (如關閉則是 Ctrl + Return) +migrationConfirm: "您確定要將你的帳戶遷移到 {account} 嗎? 一旦這樣做,你將無法復原,而你將無法再次正常使用您的帳戶。\n另外,請確保你已將此當前帳戶設置為您要遷移的帳戶。" +customSplashIconsDescription: 每次用戶加載/重新加載頁面時,以換行符號分隔的自定啟動畫面圖標的網址將隨機顯示。請確保圖片位於靜態網址上,最好所有圖片解析度調整為 + 192x192。 +accountMoved: '該使用者已移至新帳戶:' +showAds: 顯示廣告 +noThankYou: 不用了,謝謝 +selectInstance: 選擇實例 +enableRecommendedTimeline: 啟用推薦時間軸 +antennaInstancesDescription: 分行列出一個實例 +moveTo: 遷移此帳戶到新帳戶 +moveToLabel: '請輸入你將會遷移到的帳戶:' +moveAccount: 遷移帳戶! +moveAccountDescription: '這個過程是不可逆的。 在遷移前,請確保您已在新帳戶上為此帳戶設置了別名(Alias)。 請輸入帳戶標籤 (格式: + @person@instance.com)' +moveFrom: 由舊帳戶移至此帳戶 +moveFromDescription: '這將為你的舊帳戶設置一個別名(Alias),以便你可以從該帳戶轉移到當前帳戶。 在你的舊帳戶移動之前請執行此操作。 請輸入帳戶標籤 + (格式: @person@instance.com)' +_apps: + crossPlatform: 跨平台 + free: 免費 + paid: 付費 +enableEmojiReactions: 啟用表情符號反應 +breakFollowConfirm: 您確定要移除該關注者嗎? +socialTimeline: 社交時間軸 +cannotUploadBecauseExceedsFileSizeLimit: 因檔案太大而無法上傳。 +customMOTD: 自定義MOTD (網頁載入時顯示的信息) +customSplashIcons: 啟動畫面圖標 (網址) +splash: 啟動畫面 +updateAvailable: 可能有可用的更新! +showAdminUpdates: 表明新的 Calckey 版本可用(只限管理員) +migration: 遷移 +homeTimeline: 主頁時間軸 +swipeOnDesktop: 允許在桌面上進行手機式滑動 +logoImageUrl: 圖標網址 +addInstance: 增加一個實例 +noInstances: 沒有實例 +flagSpeakAsCat: 像貓一樣地說話 diff --git a/package.json b/package.json index 34015128b4..a204a05fec 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "calckey", - "version": "13.2.0-dev4", + "version": "13.2.0-dev38", "codename": "aqua", "repository": { "type": "git", "url": "https://codeberg.org/calckey/calckey.git" }, - "packageManager": "pnpm@7.27.0", + "packageManager": "pnpm@8.3.1", "private": true, "scripts": { "rebuild": "pnpm run clean && pnpm -r run build && pnpm run gulp", @@ -27,7 +27,7 @@ "e2e": "start-server-and-test start:test http://localhost:61812 cy:run", "mocha": "pnpm --filter backend run mocha", "test": "pnpm run mocha", - "format": "gulp format", + "format": "pnpm rome format packages/**/* --write && pnpm --filter client run format", "clean": "pnpm node ./scripts/clean.js", "clean-all": "pnpm node ./scripts/clean-all.js", "cleanall": "pnpm run clean-all" @@ -38,12 +38,11 @@ "dependencies": { "@bull-board/api": "^4.10.2", "@bull-board/ui": "^4.10.2", + "@napi-rs/cli": "^2.15.0", "@tensorflow/tfjs": "^3.21.0", - "calckey-js": "^0.0.22", "focus-trap": "^7.2.0", "focus-trap-vue": "^4.0.1", "js-yaml": "4.1.0", - "phosphor-icons": "^1.4.2", "seedrandom": "^3.0.5" }, "devDependencies": { diff --git a/packages/backend/check_connect.js b/packages/backend/check_connect.js new file mode 100644 index 0000000000..7c1e716b3e --- /dev/null +++ b/packages/backend/check_connect.js @@ -0,0 +1,10 @@ +import { loadConfig } from "./built/config.js"; +import { createRedisConnection } from "./built/redis.js"; + +const config = loadConfig(); +const redis = createRedisConnection(config); + +redis.on("connect", () => redis.disconnect()); +redis.on("error", (e) => { + throw e; +}); diff --git a/packages/backend/migration/1000000000000-Init.js b/packages/backend/migration/1000000000000-Init.js index 1140be7e84..c07500e358 100644 --- a/packages/backend/migration/1000000000000-Init.js +++ b/packages/backend/migration/1000000000000-Init.js @@ -1,482 +1,1068 @@ - - export class Init1000000000000 { - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "log_level_enum" AS ENUM('error', 'warning', 'info', 'success', 'debug')`); - await queryRunner.query(`CREATE TABLE "log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "domain" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "level" "log_level_enum" NOT NULL, "worker" character varying(8) NOT NULL, "machine" character varying(128) NOT NULL, "message" character varying(1024) NOT NULL, "data" jsonb NOT NULL DEFAULT '{}', CONSTRAINT "PK_350604cbdf991d5930d9e618fbd" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_8e4eb51a35d81b64dda28eed0a" ON "log" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_8cb40cfc8f3c28261e6f887b03" ON "log" ("domain") `); - await queryRunner.query(`CREATE INDEX "IDX_584b536b49e53ac81beb39a177" ON "log" ("level") `); - await queryRunner.query(`CREATE TABLE "drive_folder" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(128) NOT NULL, "userId" character varying(32), "parentId" character varying(32), CONSTRAINT "PK_7a0c089191f5ebdc214e0af808a" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_02878d441ceae15ce060b73daf" ON "drive_folder" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_f4fc06e49c0171c85f1c48060d" ON "drive_folder" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_00ceffb0cdc238b3233294f08f" ON "drive_folder" ("parentId") `); - await queryRunner.query(`CREATE TABLE "drive_file" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32), "userHost" character varying(128), "md5" character varying(32) NOT NULL, "name" character varying(256) NOT NULL, "type" character varying(128) NOT NULL, "size" integer NOT NULL, "comment" character varying(512), "properties" jsonb NOT NULL DEFAULT '{}', "storedInternal" boolean NOT NULL, "url" character varying(512) NOT NULL, "thumbnailUrl" character varying(512), "webpublicUrl" character varying(512), "accessKey" character varying(256), "thumbnailAccessKey" character varying(256), "webpublicAccessKey" character varying(256), "uri" character varying(512), "src" character varying(512), "folderId" character varying(32), "isSensitive" boolean NOT NULL DEFAULT false, "isLink" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_43ddaaaf18c9e68029b7cbb032e" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_c8dfad3b72196dd1d6b5db168a" ON "drive_file" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_860fa6f6c7df5bb887249fba22" ON "drive_file" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_92779627994ac79277f070c91e" ON "drive_file" ("userHost") `); - await queryRunner.query(`CREATE INDEX "IDX_37bb9a1b4585f8a3beb24c62d6" ON "drive_file" ("md5") `); - await queryRunner.query(`CREATE INDEX "IDX_a40b8df8c989d7db937ea27cf6" ON "drive_file" ("type") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d85a184c2540d2deba33daf642" ON "drive_file" ("accessKey") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e74022ce9a074b3866f70e0d27" ON "drive_file" ("thumbnailAccessKey") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_c55b2b7c284d9fef98026fc88e" ON "drive_file" ("webpublicAccessKey") `); - await queryRunner.query(`CREATE INDEX "IDX_e5848eac4940934e23dbc17581" ON "drive_file" ("uri") `); - await queryRunner.query(`CREATE INDEX "IDX_bb90d1956dafc4068c28aa7560" ON "drive_file" ("folderId") `); - await queryRunner.query(`CREATE TABLE "user" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE, "lastFetchedAt" TIMESTAMP WITH TIME ZONE, "username" character varying(128) NOT NULL, "usernameLower" character varying(128) NOT NULL, "name" character varying(128), "followersCount" integer NOT NULL DEFAULT 0, "followingCount" integer NOT NULL DEFAULT 0, "notesCount" integer NOT NULL DEFAULT 0, "avatarId" character varying(32), "bannerId" character varying(32), "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "avatarUrl" character varying(512), "bannerUrl" character varying(512), "avatarColor" character varying(32), "bannerColor" character varying(32), "isSuspended" boolean NOT NULL DEFAULT false, "isSilenced" boolean NOT NULL DEFAULT false, "isLocked" boolean NOT NULL DEFAULT false, "isBot" boolean NOT NULL DEFAULT false, "isCat" boolean NOT NULL DEFAULT false, "isAdmin" boolean NOT NULL DEFAULT false, "isModerator" boolean NOT NULL DEFAULT false, "isVerified" boolean NOT NULL DEFAULT false, "emojis" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "host" character varying(128), "inbox" character varying(512), "sharedInbox" character varying(512), "featured" character varying(512), "uri" character varying(512), "token" character(16), CONSTRAINT "UQ_a854e557b1b14814750c7c7b0c9" UNIQUE ("token"), CONSTRAINT "REL_58f5c71eaab331645112cf8cfa" UNIQUE ("avatarId"), CONSTRAINT "REL_afc64b53f8db3707ceb34eb28e" UNIQUE ("bannerId"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_e11e649824a45d8ed01d597fd9" ON "user" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_80ca6e6ef65fb9ef34ea8c90f4" ON "user" ("updatedAt") `); - await queryRunner.query(`CREATE INDEX "IDX_a27b942a0d6dcff90e3ee9b5e8" ON "user" ("usernameLower") `); - await queryRunner.query(`CREATE INDEX "IDX_fa99d777623947a5b05f394cae" ON "user" ("tags") `); - await queryRunner.query(`CREATE INDEX "IDX_3252a5df8d5bbd16b281f7799e" ON "user" ("host") `); - await queryRunner.query(`CREATE INDEX "IDX_be623adaa4c566baf5d29ce0c8" ON "user" ("uri") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a854e557b1b14814750c7c7b0c" ON "user" ("token") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5deb01ae162d1d70b80d064c27" ON "user" ("usernameLower", "host") `); - await queryRunner.query(`CREATE TABLE "app" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32), "secret" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(512) NOT NULL, "permission" character varying(64) array NOT NULL, "callbackUrl" character varying(512), CONSTRAINT "PK_9478629fc093d229df09e560aea" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_048a757923ed8b157e9895da53" ON "app" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_3f5b0899ef90527a3462d7c2cb" ON "app" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_f49922d511d666848f250663c4" ON "app" ("secret") `); - await queryRunner.query(`CREATE TABLE "access_token" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(128) NOT NULL, "hash" character varying(128) NOT NULL, "userId" character varying(32) NOT NULL, "appId" character varying(32) NOT NULL, CONSTRAINT "PK_f20f028607b2603deabd8182d12" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_70ba8f6af34bc924fc9e12adb8" ON "access_token" ("token") `); - await queryRunner.query(`CREATE INDEX "IDX_64c327441248bae40f7d92f34f" ON "access_token" ("hash") `); - await queryRunner.query(`CREATE INDEX "IDX_9949557d0e1b2c19e5344c171e" ON "access_token" ("userId") `); - await queryRunner.query(`CREATE TYPE "note_visibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`); - await queryRunner.query(`CREATE TABLE "note" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "replyId" character varying(32), "renoteId" character varying(32), "text" text, "name" character varying(256), "cw" character varying(512), "appId" character varying(32), "userId" character varying(32) NOT NULL, "viaMobile" boolean NOT NULL DEFAULT false, "localOnly" boolean NOT NULL DEFAULT false, "renoteCount" smallint NOT NULL DEFAULT 0, "repliesCount" smallint NOT NULL DEFAULT 0, "reactions" jsonb NOT NULL DEFAULT '{}', "visibility" "note_visibility_enum" NOT NULL, "uri" character varying(512), "score" integer NOT NULL DEFAULT 0, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "attachedFileTypes" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "visibleUserIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "mentions" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "mentionedRemoteUsers" text NOT NULL DEFAULT '[]', "emojis" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "hasPoll" boolean NOT NULL DEFAULT false, "geo" jsonb DEFAULT null, "userHost" character varying(128), "replyUserId" character varying(32), "replyUserHost" character varying(128), "renoteUserId" character varying(32), "renoteUserHost" character varying(128), CONSTRAINT "PK_96d0c172a4fba276b1bbed43058" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_e7c0567f5261063592f022e9b5" ON "note" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_17cb3553c700a4985dff5a30ff" ON "note" ("replyId") `); - await queryRunner.query(`CREATE INDEX "IDX_52ccc804d7c69037d558bac4c9" ON "note" ("renoteId") `); - await queryRunner.query(`CREATE INDEX "IDX_5b87d9d19127bd5d92026017a7" ON "note" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_153536c67d05e9adb24e99fc2b" ON "note" ("uri") `); - await queryRunner.query(`CREATE INDEX "IDX_51c063b6a133a9cb87145450f5" ON "note" ("fileIds") `); - await queryRunner.query(`CREATE INDEX "IDX_25dfc71b0369b003a4cd434d0b" ON "note" ("attachedFileTypes") `); - await queryRunner.query(`CREATE INDEX "IDX_796a8c03959361f97dc2be1d5c" ON "note" ("visibleUserIds") `); - await queryRunner.query(`CREATE INDEX "IDX_54ebcb6d27222913b908d56fd8" ON "note" ("mentions") `); - await queryRunner.query(`CREATE INDEX "IDX_88937d94d7443d9a99a76fa5c0" ON "note" ("tags") `); - await queryRunner.query(`CREATE INDEX "IDX_7125a826ab192eb27e11d358a5" ON "note" ("userHost") `); - await queryRunner.query(`CREATE TABLE "poll_vote" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "choice" integer NOT NULL, CONSTRAINT "PK_fd002d371201c472490ba89c6a0" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_0fb627e1c2f753262a74f0562d" ON "poll_vote" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_66d2bd2ee31d14bcc23069a89f" ON "poll_vote" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_aecfbd5ef60374918e63ee95fa" ON "poll_vote" ("noteId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_50bd7164c5b78f1f4a42c4d21f" ON "poll_vote" ("userId", "noteId", "choice") `); - await queryRunner.query(`CREATE TABLE "note_reaction" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "reaction" character varying(128) NOT NULL, CONSTRAINT "PK_767ec729b108799b587a3fcc9cf" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_01f4581f114e0ebd2bbb876f0b" ON "note_reaction" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_13761f64257f40c5636d0ff95e" ON "note_reaction" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_45145e4953780f3cd5656f0ea6" ON "note_reaction" ("noteId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_ad0c221b25672daf2df320a817" ON "note_reaction" ("userId", "noteId") `); - await queryRunner.query(`CREATE TABLE "note_watching" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "noteUserId" character varying(32) NOT NULL, CONSTRAINT "PK_49286fdb23725945a74aa27d757" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_318cdf42a9cfc11f479bd802bb" ON "note_watching" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_b0134ec406e8d09a540f818288" ON "note_watching" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_03e7028ab8388a3f5e3ce2a861" ON "note_watching" ("noteId") `); - await queryRunner.query(`CREATE INDEX "IDX_44499765eec6b5489d72c4253b" ON "note_watching" ("noteUserId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a42c93c69989ce1d09959df4cf" ON "note_watching" ("userId", "noteId") `); - await queryRunner.query(`CREATE TABLE "note_unread" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "noteUserId" character varying(32) NOT NULL, "isSpecified" boolean NOT NULL, CONSTRAINT "PK_1904eda61a784f57e6e51fa9c1f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_56b0166d34ddae49d8ef7610bb" ON "note_unread" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_e637cba4dc4410218c4251260e" ON "note_unread" ("noteId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d908433a4953cc13216cd9c274" ON "note_unread" ("userId", "noteId") `); - await queryRunner.query(`CREATE TABLE "notification" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "notifieeId" character varying(32) NOT NULL, "notifierId" character varying(32) NOT NULL, "type" character varying(32) NOT NULL, "isRead" boolean NOT NULL DEFAULT false, "noteId" character varying(32), "reaction" character varying(128), "choice" integer, CONSTRAINT "PK_705b6c7cdf9b2c2ff7ac7872cb7" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b11a5e627c41d4dc3170f1d370" ON "notification" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_3c601b70a1066d2c8b517094cb" ON "notification" ("notifieeId") `); - await queryRunner.query(`CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/assets/ai.png', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT 'https://xn--931a.moe/aiart/yubitun.png', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT true, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TABLE "following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_c76c6e044bdf76ecf8bfb82a645" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_582f8fab771a9040a12961f3e7" ON "following" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_24e0042143a18157b234df186c" ON "following" ("followeeId") `); - await queryRunner.query(`CREATE INDEX "IDX_6516c5a6f3c015b4eed39978be" ON "following" ("followerId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_307be5f1d1252e0388662acb96" ON "following" ("followerId", "followeeId") `); - await queryRunner.query(`CREATE TABLE "instance" ("id" character varying(32) NOT NULL, "caughtAt" TIMESTAMP WITH TIME ZONE NOT NULL, "host" character varying(128) NOT NULL, "system" character varying(64), "usersCount" integer NOT NULL DEFAULT 0, "notesCount" integer NOT NULL DEFAULT 0, "followingCount" integer NOT NULL DEFAULT 0, "followersCount" integer NOT NULL DEFAULT 0, "driveUsage" integer NOT NULL DEFAULT 0, "driveFiles" integer NOT NULL DEFAULT 0, "latestRequestSentAt" TIMESTAMP WITH TIME ZONE, "latestStatus" integer, "latestRequestReceivedAt" TIMESTAMP WITH TIME ZONE, "lastCommunicatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "isNotResponding" boolean NOT NULL DEFAULT false, "isMarkedAsClosed" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_eaf60e4a0c399c9935413e06474" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_2cd3b2a6b4cf0b910b260afe08" ON "instance" ("caughtAt") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8d5afc98982185799b160e10eb" ON "instance" ("host") `); - await queryRunner.query(`CREATE TABLE "muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "muteeId" character varying(32) NOT NULL, "muterId" character varying(32) NOT NULL, CONSTRAINT "PK_2e92d06c8b5c602eeb27ca9ba48" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_f86d57fbca33c7a4e6897490cc" ON "muting" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_ec96b4fed9dae517e0dbbe0675" ON "muting" ("muteeId") `); - await queryRunner.query(`CREATE INDEX "IDX_93060675b4a79a577f31d260c6" ON "muting" ("muterId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_1eb9d9824a630321a29fd3b290" ON "muting" ("muterId", "muteeId") `); - await queryRunner.query(`CREATE TABLE "sw_subscription" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "endpoint" character varying(512) NOT NULL, "auth" character varying(256) NOT NULL, "publickey" character varying(128) NOT NULL, CONSTRAINT "PK_e8f763631530051b95eb6279b91" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_97754ca6f2baff9b4abb7f853d" ON "sw_subscription" ("userId") `); - await queryRunner.query(`CREATE TABLE "blocking" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "blockeeId" character varying(32) NOT NULL, "blockerId" character varying(32) NOT NULL, CONSTRAINT "PK_e5d9a541cc1965ee7e048ea09dd" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b9a354f7941c1e779f3b33aea6" ON "blocking" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_2cd4a2743a99671308f5417759" ON "blocking" ("blockeeId") `); - await queryRunner.query(`CREATE INDEX "IDX_0627125f1a8a42c9a1929edb55" ON "blocking" ("blockerId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_98a1bc5cb30dfd159de056549f" ON "blocking" ("blockerId", "blockeeId") `); - await queryRunner.query(`CREATE TABLE "user_list" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, CONSTRAINT "PK_87bab75775fd9b1ff822b656402" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b7fcefbdd1c18dce86687531f9" ON "user_list" ("userId") `); - await queryRunner.query(`CREATE TABLE "user_list_joining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userListId" character varying(32) NOT NULL, CONSTRAINT "PK_11abb3768da1c5f8de101c9df45" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_d844bfc6f3f523a05189076efa" ON "user_list_joining" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_605472305f26818cc93d1baaa7" ON "user_list_joining" ("userListId") `); - await queryRunner.query(`CREATE TABLE "hashtag" ("id" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "mentionedUserIds" character varying(32) array NOT NULL, "mentionedUsersCount" integer NOT NULL DEFAULT 0, "mentionedLocalUserIds" character varying(32) array NOT NULL, "mentionedLocalUsersCount" integer NOT NULL DEFAULT 0, "mentionedRemoteUserIds" character varying(32) array NOT NULL, "mentionedRemoteUsersCount" integer NOT NULL DEFAULT 0, "attachedUserIds" character varying(32) array NOT NULL, "attachedUsersCount" integer NOT NULL DEFAULT 0, "attachedLocalUserIds" character varying(32) array NOT NULL, "attachedLocalUsersCount" integer NOT NULL DEFAULT 0, "attachedRemoteUserIds" character varying(32) array NOT NULL, "attachedRemoteUsersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_cb36eb8af8412bfa978f1165d78" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_347fec870eafea7b26c8a73bac" ON "hashtag" ("name") `); - await queryRunner.query(`CREATE INDEX "IDX_2710a55f826ee236ea1a62698f" ON "hashtag" ("mentionedUsersCount") `); - await queryRunner.query(`CREATE INDEX "IDX_0e206cec573f1edff4a3062923" ON "hashtag" ("mentionedLocalUsersCount") `); - await queryRunner.query(`CREATE INDEX "IDX_4c02d38a976c3ae132228c6fce" ON "hashtag" ("mentionedRemoteUsersCount") `); - await queryRunner.query(`CREATE INDEX "IDX_d57f9030cd3af7f63ffb1c267c" ON "hashtag" ("attachedUsersCount") `); - await queryRunner.query(`CREATE INDEX "IDX_0c44bf4f680964145f2a68a341" ON "hashtag" ("attachedLocalUsersCount") `); - await queryRunner.query(`CREATE INDEX "IDX_0b03cbcd7e6a7ce068efa8ecc2" ON "hashtag" ("attachedRemoteUsersCount") `); - await queryRunner.query(`CREATE TABLE "note_favorite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_af0da35a60b9fa4463a62082b36" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_47f4b1892f5d6ba8efb3057d81" ON "note_favorite" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0f4fb9ad355f3effff221ef245" ON "note_favorite" ("userId", "noteId") `); - await queryRunner.query(`CREATE TABLE "abuse_user_report" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "reporterId" character varying(32) NOT NULL, "comment" character varying(512) NOT NULL, CONSTRAINT "PK_87873f5f5cc5c321a1306b2d18c" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_db2098070b2b5a523c58181f74" ON "abuse_user_report" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_d049123c413e68ca52abe73420" ON "abuse_user_report" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_04cc96756f89d0b7f9473e8cdf" ON "abuse_user_report" ("reporterId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5cd442c3b2e74fdd99dae20243" ON "abuse_user_report" ("userId", "reporterId") `); - await queryRunner.query(`CREATE TABLE "registration_ticket" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "code" character varying(64) NOT NULL, CONSTRAINT "PK_f11696b6fafcf3662d4292734f8" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0ff69e8dfa9fe31bb4a4660f59" ON "registration_ticket" ("code") `); - await queryRunner.query(`CREATE TABLE "messaging_message" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "recipientId" character varying(32) NOT NULL, "text" character varying(4096), "isRead" boolean NOT NULL DEFAULT false, "fileId" character varying(32), CONSTRAINT "PK_db398fd79dc95d0eb8c30456eaa" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_e21cd3646e52ef9c94aaf17c2e" ON "messaging_message" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_5377c307783fce2b6d352e1203" ON "messaging_message" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_cac14a4e3944454a5ce7daa514" ON "messaging_message" ("recipientId") `); - await queryRunner.query(`CREATE TABLE "signin" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "ip" character varying(128) NOT NULL, "headers" jsonb NOT NULL, "success" boolean NOT NULL, CONSTRAINT "PK_9e96ddc025712616fc492b3b588" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_2c308dbdc50d94dc625670055f" ON "signin" ("userId") `); - await queryRunner.query(`CREATE TABLE "auth_session" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(128) NOT NULL, "userId" character varying(32), "appId" character varying(32) NOT NULL, CONSTRAINT "PK_19354ed146424a728c1112a8cbf" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_62cb09e1129f6ec024ef66e183" ON "auth_session" ("token") `); - await queryRunner.query(`CREATE TABLE "follow_request" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "requestId" character varying(128), "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_53a9aa3725f7a3deb150b39dbfc" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_12c01c0d1a79f77d9f6c15fadd" ON "follow_request" ("followeeId") `); - await queryRunner.query(`CREATE INDEX "IDX_a7fd92dd6dc519e6fb435dd108" ON "follow_request" ("followerId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d54a512b822fac7ed52800f6b4" ON "follow_request" ("followerId", "followeeId") `); - await queryRunner.query(`CREATE TABLE "emoji" ("id" character varying(32) NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE, "name" character varying(128) NOT NULL, "host" character varying(128), "url" character varying(512) NOT NULL, "uri" character varying(512), "type" character varying(64), "aliases" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_df74ce05e24999ee01ea0bc50a3" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b37dafc86e9af007e3295c2781" ON "emoji" ("name") `); - await queryRunner.query(`CREATE INDEX "IDX_5900e907bb46516ddf2871327c" ON "emoji" ("host") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_4f4d35e1256c84ae3d1f0eab10" ON "emoji" ("name", "host") `); - await queryRunner.query(`CREATE TABLE "reversi_game" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "startedAt" TIMESTAMP WITH TIME ZONE, "user1Id" character varying(32) NOT NULL, "user2Id" character varying(32) NOT NULL, "user1Accepted" boolean NOT NULL DEFAULT false, "user2Accepted" boolean NOT NULL DEFAULT false, "black" integer, "isStarted" boolean NOT NULL DEFAULT false, "isEnded" boolean NOT NULL DEFAULT false, "winnerId" character varying(32), "surrendered" character varying(32), "logs" jsonb NOT NULL DEFAULT '[]', "map" character varying(64) array NOT NULL, "bw" character varying(32) NOT NULL, "isLlotheo" boolean NOT NULL DEFAULT false, "canPutEverywhere" boolean NOT NULL DEFAULT false, "loopedBoard" boolean NOT NULL DEFAULT false, "form1" jsonb DEFAULT null, "form2" jsonb DEFAULT null, "crc32" character varying(32), CONSTRAINT "PK_76b30eeba71b1193ad7c5311c3f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b46ec40746efceac604142be1c" ON "reversi_game" ("createdAt") `); - await queryRunner.query(`CREATE TABLE "reversi_matching" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "parentId" character varying(32) NOT NULL, "childId" character varying(32) NOT NULL, CONSTRAINT "PK_880bd0afbab232f21c8b9d146cf" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_b604d92d6c7aec38627f6eaf16" ON "reversi_matching" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_3b25402709dd9882048c2bbade" ON "reversi_matching" ("parentId") `); - await queryRunner.query(`CREATE INDEX "IDX_e247b23a3c9b45f89ec1299d06" ON "reversi_matching" ("childId") `); - await queryRunner.query(`CREATE TABLE "user_note_pining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_a6a2dad4ae000abce2ea9d9b103" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_bfbc6f79ba4007b4ce5097f08d" ON "user_note_pining" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_410cd649884b501c02d6e72738" ON "user_note_pining" ("userId", "noteId") `); - await queryRunner.query(`CREATE TYPE "poll_notevisibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`); - await queryRunner.query(`CREATE TABLE "poll" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE, "multiple" boolean NOT NULL, "choices" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "votes" integer array NOT NULL, "noteVisibility" "poll_notevisibility_enum" NOT NULL, "userId" character varying(32) NOT NULL, "userHost" character varying(128), CONSTRAINT "REL_da851e06d0dfe2ef397d8b1bf1" UNIQUE ("noteId"), CONSTRAINT "PK_da851e06d0dfe2ef397d8b1bf1b" PRIMARY KEY ("noteId"))`); - await queryRunner.query(`CREATE INDEX "IDX_0610ebcfcfb4a18441a9bcdab2" ON "poll" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_7fa20a12319c7f6dc3aed98c0a" ON "poll" ("userHost") `); - await queryRunner.query(`CREATE TABLE "user_keypair" ("userId" character varying(32) NOT NULL, "publicKey" character varying(4096) NOT NULL, "privateKey" character varying(4096) NOT NULL, CONSTRAINT "REL_f4853eb41ab722fe05f81cedeb" UNIQUE ("userId"), CONSTRAINT "PK_f4853eb41ab722fe05f81cedeb6" PRIMARY KEY ("userId"))`); - await queryRunner.query(`CREATE TABLE "user_publickey" ("userId" character varying(32) NOT NULL, "keyId" character varying(256) NOT NULL, "keyPem" character varying(4096) NOT NULL, CONSTRAINT "REL_10c146e4b39b443ede016f6736" UNIQUE ("userId"), CONSTRAINT "PK_10c146e4b39b443ede016f6736d" PRIMARY KEY ("userId"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_171e64971c780ebd23fae140bb" ON "user_publickey" ("keyId") `); - await queryRunner.query(`CREATE TABLE "user_profile" ("userId" character varying(32) NOT NULL, "location" character varying(128), "birthday" character(10), "description" character varying(1024), "fields" jsonb NOT NULL DEFAULT '[]', "url" character varying(512), "email" character varying(128), "emailVerifyCode" character varying(128), "emailVerified" boolean NOT NULL DEFAULT false, "twoFactorTempSecret" character varying(128), "twoFactorSecret" character varying(128), "twoFactorEnabled" boolean NOT NULL DEFAULT false, "password" character varying(128), "clientData" jsonb NOT NULL DEFAULT '{}', "autoWatch" boolean NOT NULL DEFAULT false, "autoAcceptFollowed" boolean NOT NULL DEFAULT false, "alwaysMarkNsfw" boolean NOT NULL DEFAULT false, "carefulBot" boolean NOT NULL DEFAULT false, "twitter" boolean NOT NULL DEFAULT false, "twitterAccessToken" character varying(64) DEFAULT null, "twitterAccessTokenSecret" character varying(64) DEFAULT null, "twitterUserId" character varying(64) DEFAULT null, "twitterScreenName" character varying(64) DEFAULT null, "github" boolean NOT NULL DEFAULT false, "githubAccessToken" character varying(64) DEFAULT null, "githubId" integer DEFAULT null, "githubLogin" character varying(64) DEFAULT null, "discord" boolean NOT NULL DEFAULT false, "discordAccessToken" character varying(64) DEFAULT null, "discordRefreshToken" character varying(64) DEFAULT null, "discordExpiresDate" integer DEFAULT null, "discordId" character varying(64) DEFAULT null, "discordUsername" character varying(64) DEFAULT null, "discordDiscriminator" character varying(64) DEFAULT null, "userHost" character varying(128), CONSTRAINT "REL_51cb79b5555effaf7d69ba1cff" UNIQUE ("userId"), CONSTRAINT "PK_51cb79b5555effaf7d69ba1cff9" PRIMARY KEY ("userId"))`); - await queryRunner.query(`CREATE INDEX "IDX_dce530b98e454793dac5ec2f5a" ON "user_profile" ("userHost") `); - await queryRunner.query(`CREATE TYPE "__chart__active_users_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__active_users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__active_users_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_317237a9f733b970604a11e314f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__drive_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__drive_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_totalCount" bigint NOT NULL, "___local_totalSize" bigint NOT NULL, "___local_incCount" bigint NOT NULL, "___local_incSize" bigint NOT NULL, "___local_decCount" bigint NOT NULL, "___local_decSize" bigint NOT NULL, "___remote_totalCount" bigint NOT NULL, "___remote_totalSize" bigint NOT NULL, "___remote_incCount" bigint NOT NULL, "___remote_incSize" bigint NOT NULL, "___remote_decCount" bigint NOT NULL, "___remote_decSize" bigint NOT NULL, CONSTRAINT "PK_f96bc548a765cd4b3b354221ce7" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__federation_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__federation" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__federation_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___instance_total" bigint NOT NULL, "___instance_inc" bigint NOT NULL, "___instance_dec" bigint NOT NULL, CONSTRAINT "PK_b39dcd31a0fe1a7757e348e85fd" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__hashtag_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__hashtag" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__hashtag_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_c32f1ea2b44a5d2f7881e37f8f9" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__instance_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__instance" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__instance_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___requests_failed" bigint NOT NULL, "___requests_succeeded" bigint NOT NULL, "___requests_received" bigint NOT NULL, "___notes_total" bigint NOT NULL, "___notes_inc" bigint NOT NULL, "___notes_dec" bigint NOT NULL, "___notes_diffs_normal" bigint NOT NULL, "___notes_diffs_reply" bigint NOT NULL, "___notes_diffs_renote" bigint NOT NULL, "___users_total" bigint NOT NULL, "___users_inc" bigint NOT NULL, "___users_dec" bigint NOT NULL, "___following_total" bigint NOT NULL, "___following_inc" bigint NOT NULL, "___following_dec" bigint NOT NULL, "___followers_total" bigint NOT NULL, "___followers_inc" bigint NOT NULL, "___followers_dec" bigint NOT NULL, "___drive_totalFiles" bigint NOT NULL, "___drive_totalUsage" bigint NOT NULL, "___drive_incFiles" bigint NOT NULL, "___drive_incUsage" bigint NOT NULL, "___drive_decFiles" bigint NOT NULL, "___drive_decUsage" bigint NOT NULL, CONSTRAINT "PK_1267c67c7c2d47b4903975f2c00" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__network_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__network" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__network_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___incomingRequests" bigint NOT NULL, "___outgoingRequests" bigint NOT NULL, "___totalTime" bigint NOT NULL, "___incomingBytes" bigint NOT NULL, "___outgoingBytes" bigint NOT NULL, CONSTRAINT "PK_bc4290c2e27fad14ef0c1ca93f3" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__notes_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__notes_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___local_diffs_normal" bigint NOT NULL, "___local_diffs_reply" bigint NOT NULL, "___local_diffs_renote" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, "___remote_diffs_normal" bigint NOT NULL, "___remote_diffs_reply" bigint NOT NULL, "___remote_diffs_renote" bigint NOT NULL, CONSTRAINT "PK_0aec823fa85c7f901bdb3863b14" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__per_user_drive_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__per_user_drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_drive_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___totalCount" bigint NOT NULL, "___totalSize" bigint NOT NULL, "___incCount" bigint NOT NULL, "___incSize" bigint NOT NULL, "___decCount" bigint NOT NULL, "___decSize" bigint NOT NULL, CONSTRAINT "PK_d0ef23d24d666e1a44a0cd3d208" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__per_user_following_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__per_user_following" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_following_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_followings_total" bigint NOT NULL, "___local_followings_inc" bigint NOT NULL, "___local_followings_dec" bigint NOT NULL, "___local_followers_total" bigint NOT NULL, "___local_followers_inc" bigint NOT NULL, "___local_followers_dec" bigint NOT NULL, "___remote_followings_total" bigint NOT NULL, "___remote_followings_inc" bigint NOT NULL, "___remote_followings_dec" bigint NOT NULL, "___remote_followers_total" bigint NOT NULL, "___remote_followers_inc" bigint NOT NULL, "___remote_followers_dec" bigint NOT NULL, CONSTRAINT "PK_85bb1b540363a29c2fec83bd907" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__per_user_notes_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__per_user_notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_notes_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___total" bigint NOT NULL, "___inc" bigint NOT NULL, "___dec" bigint NOT NULL, "___diffs_normal" bigint NOT NULL, "___diffs_reply" bigint NOT NULL, "___diffs_renote" bigint NOT NULL, CONSTRAINT "PK_334acf6e915af2f29edc11b8e50" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__per_user_reaction_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__per_user_reaction" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_reaction_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_984f54dae441e65b633e8d27a7f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__test_grouped_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__test_grouped" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_grouped_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo_total" bigint NOT NULL, "___foo_inc" bigint NOT NULL, "___foo_dec" bigint NOT NULL, CONSTRAINT "PK_f4a2b175d308695af30d4293272" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__test_unique_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__test_unique" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_unique_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo" bigint NOT NULL, CONSTRAINT "PK_409bac9c97cc612d8500012319d" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__test_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__test" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo_total" bigint NOT NULL, "___foo_inc" bigint NOT NULL, "___foo_dec" bigint NOT NULL, CONSTRAINT "PK_b4bc31dffbd1b785276a3ecfc1e" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE TYPE "__chart__users_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`CREATE TABLE "__chart__users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__users_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, CONSTRAINT "PK_4dfcf2c78d03524b9eb2c99d328" PRIMARY KEY ("id"))`); - await queryRunner.query(`ALTER TABLE "drive_folder" ADD CONSTRAINT "FK_f4fc06e49c0171c85f1c48060d2" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "drive_folder" ADD CONSTRAINT "FK_00ceffb0cdc238b3233294f08f2" FOREIGN KEY ("parentId") REFERENCES "drive_folder"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD CONSTRAINT "FK_bb90d1956dafc4068c28aa7560a" FOREIGN KEY ("folderId") REFERENCES "drive_folder"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "FK_58f5c71eaab331645112cf8cfa5" FOREIGN KEY ("avatarId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "FK_afc64b53f8db3707ceb34eb28e2" FOREIGN KEY ("bannerId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "app" ADD CONSTRAINT "FK_3f5b0899ef90527a3462d7c2cb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_9949557d0e1b2c19e5344c171e9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5" FOREIGN KEY ("replyId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_52ccc804d7c69037d558bac4c96" FOREIGN KEY ("renoteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_ec5c201576192ba8904c345c5cc" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_5b87d9d19127bd5d92026017a7b" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "poll_vote" ADD CONSTRAINT "FK_66d2bd2ee31d14bcc23069a89f8" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "poll_vote" ADD CONSTRAINT "FK_aecfbd5ef60374918e63ee95fa7" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_reaction" ADD CONSTRAINT "FK_13761f64257f40c5636d0ff95ee" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_reaction" ADD CONSTRAINT "FK_45145e4953780f3cd5656f0ea6a" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_watching" ADD CONSTRAINT "FK_b0134ec406e8d09a540f8182888" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_watching" ADD CONSTRAINT "FK_03e7028ab8388a3f5e3ce2a8619" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_unread" ADD CONSTRAINT "FK_56b0166d34ddae49d8ef7610bb9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_unread" ADD CONSTRAINT "FK_e637cba4dc4410218c4251260e4" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3c601b70a1066d2c8b517094cb9" FOREIGN KEY ("notifieeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_769cb6b73a1efe22ddf733ac453" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "following" ADD CONSTRAINT "FK_24e0042143a18157b234df186c3" FOREIGN KEY ("followeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "following" ADD CONSTRAINT "FK_6516c5a6f3c015b4eed39978be5" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "muting" ADD CONSTRAINT "FK_ec96b4fed9dae517e0dbbe0675c" FOREIGN KEY ("muteeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "muting" ADD CONSTRAINT "FK_93060675b4a79a577f31d260c67" FOREIGN KEY ("muterId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "sw_subscription" ADD CONSTRAINT "FK_97754ca6f2baff9b4abb7f853dd" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "blocking" ADD CONSTRAINT "FK_2cd4a2743a99671308f5417759e" FOREIGN KEY ("blockeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "blocking" ADD CONSTRAINT "FK_0627125f1a8a42c9a1929edb552" FOREIGN KEY ("blockerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_list" ADD CONSTRAINT "FK_b7fcefbdd1c18dce86687531f99" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_list_joining" ADD CONSTRAINT "FK_d844bfc6f3f523a05189076efaa" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_list_joining" ADD CONSTRAINT "FK_605472305f26818cc93d1baaa74" FOREIGN KEY ("userListId") REFERENCES "user_list"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_favorite" ADD CONSTRAINT "FK_47f4b1892f5d6ba8efb3057d81a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note_favorite" ADD CONSTRAINT "FK_0e00498f180193423c992bc4370" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_d049123c413e68ca52abe734203" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_04cc96756f89d0b7f9473e8cdf3" FOREIGN KEY ("reporterId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_5377c307783fce2b6d352e1203b" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_cac14a4e3944454a5ce7daa5142" FOREIGN KEY ("recipientId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_535def119223ac05ad3fa9ef64b" FOREIGN KEY ("fileId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "signin" ADD CONSTRAINT "FK_2c308dbdc50d94dc625670055f7" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "auth_session" ADD CONSTRAINT "FK_c072b729d71697f959bde66ade0" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "auth_session" ADD CONSTRAINT "FK_dbe037d4bddd17b03a1dc778dee" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "follow_request" ADD CONSTRAINT "FK_12c01c0d1a79f77d9f6c15fadd2" FOREIGN KEY ("followeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "follow_request" ADD CONSTRAINT "FK_a7fd92dd6dc519e6fb435dd108f" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "reversi_game" ADD CONSTRAINT "FK_f7467510c60a45ce5aca6292743" FOREIGN KEY ("user1Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "reversi_game" ADD CONSTRAINT "FK_6649a4e8c5d5cf32fb03b5da9f6" FOREIGN KEY ("user2Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "reversi_matching" ADD CONSTRAINT "FK_3b25402709dd9882048c2bbade0" FOREIGN KEY ("parentId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "reversi_matching" ADD CONSTRAINT "FK_e247b23a3c9b45f89ec1299d066" FOREIGN KEY ("childId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_note_pining" ADD CONSTRAINT "FK_bfbc6f79ba4007b4ce5097f08d6" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_note_pining" ADD CONSTRAINT "FK_68881008f7c3588ad7ecae471cf" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "poll" ADD CONSTRAINT "FK_da851e06d0dfe2ef397d8b1bf1b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "FK_f4853eb41ab722fe05f81cedeb6" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_publickey" ADD CONSTRAINT "FK_10c146e4b39b443ede016f6736d" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9"`); - await queryRunner.query(`ALTER TABLE "user_publickey" DROP CONSTRAINT "FK_10c146e4b39b443ede016f6736d"`); - await queryRunner.query(`ALTER TABLE "user_keypair" DROP CONSTRAINT "FK_f4853eb41ab722fe05f81cedeb6"`); - await queryRunner.query(`ALTER TABLE "poll" DROP CONSTRAINT "FK_da851e06d0dfe2ef397d8b1bf1b"`); - await queryRunner.query(`ALTER TABLE "user_note_pining" DROP CONSTRAINT "FK_68881008f7c3588ad7ecae471cf"`); - await queryRunner.query(`ALTER TABLE "user_note_pining" DROP CONSTRAINT "FK_bfbc6f79ba4007b4ce5097f08d6"`); - await queryRunner.query(`ALTER TABLE "reversi_matching" DROP CONSTRAINT "FK_e247b23a3c9b45f89ec1299d066"`); - await queryRunner.query(`ALTER TABLE "reversi_matching" DROP CONSTRAINT "FK_3b25402709dd9882048c2bbade0"`); - await queryRunner.query(`ALTER TABLE "reversi_game" DROP CONSTRAINT "FK_6649a4e8c5d5cf32fb03b5da9f6"`); - await queryRunner.query(`ALTER TABLE "reversi_game" DROP CONSTRAINT "FK_f7467510c60a45ce5aca6292743"`); - await queryRunner.query(`ALTER TABLE "follow_request" DROP CONSTRAINT "FK_a7fd92dd6dc519e6fb435dd108f"`); - await queryRunner.query(`ALTER TABLE "follow_request" DROP CONSTRAINT "FK_12c01c0d1a79f77d9f6c15fadd2"`); - await queryRunner.query(`ALTER TABLE "auth_session" DROP CONSTRAINT "FK_dbe037d4bddd17b03a1dc778dee"`); - await queryRunner.query(`ALTER TABLE "auth_session" DROP CONSTRAINT "FK_c072b729d71697f959bde66ade0"`); - await queryRunner.query(`ALTER TABLE "signin" DROP CONSTRAINT "FK_2c308dbdc50d94dc625670055f7"`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_535def119223ac05ad3fa9ef64b"`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_cac14a4e3944454a5ce7daa5142"`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_5377c307783fce2b6d352e1203b"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_04cc96756f89d0b7f9473e8cdf3"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`); - await queryRunner.query(`ALTER TABLE "note_favorite" DROP CONSTRAINT "FK_0e00498f180193423c992bc4370"`); - await queryRunner.query(`ALTER TABLE "note_favorite" DROP CONSTRAINT "FK_47f4b1892f5d6ba8efb3057d81a"`); - await queryRunner.query(`ALTER TABLE "user_list_joining" DROP CONSTRAINT "FK_605472305f26818cc93d1baaa74"`); - await queryRunner.query(`ALTER TABLE "user_list_joining" DROP CONSTRAINT "FK_d844bfc6f3f523a05189076efaa"`); - await queryRunner.query(`ALTER TABLE "user_list" DROP CONSTRAINT "FK_b7fcefbdd1c18dce86687531f99"`); - await queryRunner.query(`ALTER TABLE "blocking" DROP CONSTRAINT "FK_0627125f1a8a42c9a1929edb552"`); - await queryRunner.query(`ALTER TABLE "blocking" DROP CONSTRAINT "FK_2cd4a2743a99671308f5417759e"`); - await queryRunner.query(`ALTER TABLE "sw_subscription" DROP CONSTRAINT "FK_97754ca6f2baff9b4abb7f853dd"`); - await queryRunner.query(`ALTER TABLE "muting" DROP CONSTRAINT "FK_93060675b4a79a577f31d260c67"`); - await queryRunner.query(`ALTER TABLE "muting" DROP CONSTRAINT "FK_ec96b4fed9dae517e0dbbe0675c"`); - await queryRunner.query(`ALTER TABLE "following" DROP CONSTRAINT "FK_6516c5a6f3c015b4eed39978be5"`); - await queryRunner.query(`ALTER TABLE "following" DROP CONSTRAINT "FK_24e0042143a18157b234df186c3"`); - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_769cb6b73a1efe22ddf733ac453"`); - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`); - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3c601b70a1066d2c8b517094cb9"`); - await queryRunner.query(`ALTER TABLE "note_unread" DROP CONSTRAINT "FK_e637cba4dc4410218c4251260e4"`); - await queryRunner.query(`ALTER TABLE "note_unread" DROP CONSTRAINT "FK_56b0166d34ddae49d8ef7610bb9"`); - await queryRunner.query(`ALTER TABLE "note_watching" DROP CONSTRAINT "FK_03e7028ab8388a3f5e3ce2a8619"`); - await queryRunner.query(`ALTER TABLE "note_watching" DROP CONSTRAINT "FK_b0134ec406e8d09a540f8182888"`); - await queryRunner.query(`ALTER TABLE "note_reaction" DROP CONSTRAINT "FK_45145e4953780f3cd5656f0ea6a"`); - await queryRunner.query(`ALTER TABLE "note_reaction" DROP CONSTRAINT "FK_13761f64257f40c5636d0ff95ee"`); - await queryRunner.query(`ALTER TABLE "poll_vote" DROP CONSTRAINT "FK_aecfbd5ef60374918e63ee95fa7"`); - await queryRunner.query(`ALTER TABLE "poll_vote" DROP CONSTRAINT "FK_66d2bd2ee31d14bcc23069a89f8"`); - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_5b87d9d19127bd5d92026017a7b"`); - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`); - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_52ccc804d7c69037d558bac4c96"`); - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5"`); - await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`); - await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_9949557d0e1b2c19e5344c171e9"`); - await queryRunner.query(`ALTER TABLE "app" DROP CONSTRAINT "FK_3f5b0899ef90527a3462d7c2cb3"`); - await queryRunner.query(`ALTER TABLE "user" DROP CONSTRAINT "FK_afc64b53f8db3707ceb34eb28e2"`); - await queryRunner.query(`ALTER TABLE "user" DROP CONSTRAINT "FK_58f5c71eaab331645112cf8cfa5"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP CONSTRAINT "FK_bb90d1956dafc4068c28aa7560a"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e"`); - await queryRunner.query(`ALTER TABLE "drive_folder" DROP CONSTRAINT "FK_00ceffb0cdc238b3233294f08f2"`); - await queryRunner.query(`ALTER TABLE "drive_folder" DROP CONSTRAINT "FK_f4fc06e49c0171c85f1c48060d2"`); - await queryRunner.query(`DROP TABLE "__chart__users"`); - await queryRunner.query(`DROP TYPE "__chart__users_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__test"`); - await queryRunner.query(`DROP TYPE "__chart__test_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__test_unique"`); - await queryRunner.query(`DROP TYPE "__chart__test_unique_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__test_grouped"`); - await queryRunner.query(`DROP TYPE "__chart__test_grouped_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__per_user_reaction"`); - await queryRunner.query(`DROP TYPE "__chart__per_user_reaction_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__per_user_notes"`); - await queryRunner.query(`DROP TYPE "__chart__per_user_notes_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__per_user_following"`); - await queryRunner.query(`DROP TYPE "__chart__per_user_following_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__per_user_drive"`); - await queryRunner.query(`DROP TYPE "__chart__per_user_drive_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__notes"`); - await queryRunner.query(`DROP TYPE "__chart__notes_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__network"`); - await queryRunner.query(`DROP TYPE "__chart__network_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__instance"`); - await queryRunner.query(`DROP TYPE "__chart__instance_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__hashtag"`); - await queryRunner.query(`DROP TYPE "__chart__hashtag_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__federation"`); - await queryRunner.query(`DROP TYPE "__chart__federation_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__drive"`); - await queryRunner.query(`DROP TYPE "__chart__drive_span_enum"`); - await queryRunner.query(`DROP TABLE "__chart__active_users"`); - await queryRunner.query(`DROP TYPE "__chart__active_users_span_enum"`); - await queryRunner.query(`DROP INDEX "IDX_dce530b98e454793dac5ec2f5a"`); - await queryRunner.query(`DROP TABLE "user_profile"`); - await queryRunner.query(`DROP INDEX "IDX_171e64971c780ebd23fae140bb"`); - await queryRunner.query(`DROP TABLE "user_publickey"`); - await queryRunner.query(`DROP TABLE "user_keypair"`); - await queryRunner.query(`DROP INDEX "IDX_7fa20a12319c7f6dc3aed98c0a"`); - await queryRunner.query(`DROP INDEX "IDX_0610ebcfcfb4a18441a9bcdab2"`); - await queryRunner.query(`DROP TABLE "poll"`); - await queryRunner.query(`DROP TYPE "poll_notevisibility_enum"`); - await queryRunner.query(`DROP INDEX "IDX_410cd649884b501c02d6e72738"`); - await queryRunner.query(`DROP INDEX "IDX_bfbc6f79ba4007b4ce5097f08d"`); - await queryRunner.query(`DROP TABLE "user_note_pining"`); - await queryRunner.query(`DROP INDEX "IDX_e247b23a3c9b45f89ec1299d06"`); - await queryRunner.query(`DROP INDEX "IDX_3b25402709dd9882048c2bbade"`); - await queryRunner.query(`DROP INDEX "IDX_b604d92d6c7aec38627f6eaf16"`); - await queryRunner.query(`DROP TABLE "reversi_matching"`); - await queryRunner.query(`DROP INDEX "IDX_b46ec40746efceac604142be1c"`); - await queryRunner.query(`DROP TABLE "reversi_game"`); - await queryRunner.query(`DROP INDEX "IDX_4f4d35e1256c84ae3d1f0eab10"`); - await queryRunner.query(`DROP INDEX "IDX_5900e907bb46516ddf2871327c"`); - await queryRunner.query(`DROP INDEX "IDX_b37dafc86e9af007e3295c2781"`); - await queryRunner.query(`DROP TABLE "emoji"`); - await queryRunner.query(`DROP INDEX "IDX_d54a512b822fac7ed52800f6b4"`); - await queryRunner.query(`DROP INDEX "IDX_a7fd92dd6dc519e6fb435dd108"`); - await queryRunner.query(`DROP INDEX "IDX_12c01c0d1a79f77d9f6c15fadd"`); - await queryRunner.query(`DROP TABLE "follow_request"`); - await queryRunner.query(`DROP INDEX "IDX_62cb09e1129f6ec024ef66e183"`); - await queryRunner.query(`DROP TABLE "auth_session"`); - await queryRunner.query(`DROP INDEX "IDX_2c308dbdc50d94dc625670055f"`); - await queryRunner.query(`DROP TABLE "signin"`); - await queryRunner.query(`DROP INDEX "IDX_cac14a4e3944454a5ce7daa514"`); - await queryRunner.query(`DROP INDEX "IDX_5377c307783fce2b6d352e1203"`); - await queryRunner.query(`DROP INDEX "IDX_e21cd3646e52ef9c94aaf17c2e"`); - await queryRunner.query(`DROP TABLE "messaging_message"`); - await queryRunner.query(`DROP INDEX "IDX_0ff69e8dfa9fe31bb4a4660f59"`); - await queryRunner.query(`DROP TABLE "registration_ticket"`); - await queryRunner.query(`DROP INDEX "IDX_5cd442c3b2e74fdd99dae20243"`); - await queryRunner.query(`DROP INDEX "IDX_04cc96756f89d0b7f9473e8cdf"`); - await queryRunner.query(`DROP INDEX "IDX_d049123c413e68ca52abe73420"`); - await queryRunner.query(`DROP INDEX "IDX_db2098070b2b5a523c58181f74"`); - await queryRunner.query(`DROP TABLE "abuse_user_report"`); - await queryRunner.query(`DROP INDEX "IDX_0f4fb9ad355f3effff221ef245"`); - await queryRunner.query(`DROP INDEX "IDX_47f4b1892f5d6ba8efb3057d81"`); - await queryRunner.query(`DROP TABLE "note_favorite"`); - await queryRunner.query(`DROP INDEX "IDX_0b03cbcd7e6a7ce068efa8ecc2"`); - await queryRunner.query(`DROP INDEX "IDX_0c44bf4f680964145f2a68a341"`); - await queryRunner.query(`DROP INDEX "IDX_d57f9030cd3af7f63ffb1c267c"`); - await queryRunner.query(`DROP INDEX "IDX_4c02d38a976c3ae132228c6fce"`); - await queryRunner.query(`DROP INDEX "IDX_0e206cec573f1edff4a3062923"`); - await queryRunner.query(`DROP INDEX "IDX_2710a55f826ee236ea1a62698f"`); - await queryRunner.query(`DROP INDEX "IDX_347fec870eafea7b26c8a73bac"`); - await queryRunner.query(`DROP TABLE "hashtag"`); - await queryRunner.query(`DROP INDEX "IDX_605472305f26818cc93d1baaa7"`); - await queryRunner.query(`DROP INDEX "IDX_d844bfc6f3f523a05189076efa"`); - await queryRunner.query(`DROP TABLE "user_list_joining"`); - await queryRunner.query(`DROP INDEX "IDX_b7fcefbdd1c18dce86687531f9"`); - await queryRunner.query(`DROP TABLE "user_list"`); - await queryRunner.query(`DROP INDEX "IDX_98a1bc5cb30dfd159de056549f"`); - await queryRunner.query(`DROP INDEX "IDX_0627125f1a8a42c9a1929edb55"`); - await queryRunner.query(`DROP INDEX "IDX_2cd4a2743a99671308f5417759"`); - await queryRunner.query(`DROP INDEX "IDX_b9a354f7941c1e779f3b33aea6"`); - await queryRunner.query(`DROP TABLE "blocking"`); - await queryRunner.query(`DROP INDEX "IDX_97754ca6f2baff9b4abb7f853d"`); - await queryRunner.query(`DROP TABLE "sw_subscription"`); - await queryRunner.query(`DROP INDEX "IDX_1eb9d9824a630321a29fd3b290"`); - await queryRunner.query(`DROP INDEX "IDX_93060675b4a79a577f31d260c6"`); - await queryRunner.query(`DROP INDEX "IDX_ec96b4fed9dae517e0dbbe0675"`); - await queryRunner.query(`DROP INDEX "IDX_f86d57fbca33c7a4e6897490cc"`); - await queryRunner.query(`DROP TABLE "muting"`); - await queryRunner.query(`DROP INDEX "IDX_8d5afc98982185799b160e10eb"`); - await queryRunner.query(`DROP INDEX "IDX_2cd3b2a6b4cf0b910b260afe08"`); - await queryRunner.query(`DROP TABLE "instance"`); - await queryRunner.query(`DROP INDEX "IDX_307be5f1d1252e0388662acb96"`); - await queryRunner.query(`DROP INDEX "IDX_6516c5a6f3c015b4eed39978be"`); - await queryRunner.query(`DROP INDEX "IDX_24e0042143a18157b234df186c"`); - await queryRunner.query(`DROP INDEX "IDX_582f8fab771a9040a12961f3e7"`); - await queryRunner.query(`DROP TABLE "following"`); - await queryRunner.query(`DROP TABLE "meta"`); - await queryRunner.query(`DROP INDEX "IDX_3c601b70a1066d2c8b517094cb"`); - await queryRunner.query(`DROP INDEX "IDX_b11a5e627c41d4dc3170f1d370"`); - await queryRunner.query(`DROP TABLE "notification"`); - await queryRunner.query(`DROP INDEX "IDX_d908433a4953cc13216cd9c274"`); - await queryRunner.query(`DROP INDEX "IDX_e637cba4dc4410218c4251260e"`); - await queryRunner.query(`DROP INDEX "IDX_56b0166d34ddae49d8ef7610bb"`); - await queryRunner.query(`DROP TABLE "note_unread"`); - await queryRunner.query(`DROP INDEX "IDX_a42c93c69989ce1d09959df4cf"`); - await queryRunner.query(`DROP INDEX "IDX_44499765eec6b5489d72c4253b"`); - await queryRunner.query(`DROP INDEX "IDX_03e7028ab8388a3f5e3ce2a861"`); - await queryRunner.query(`DROP INDEX "IDX_b0134ec406e8d09a540f818288"`); - await queryRunner.query(`DROP INDEX "IDX_318cdf42a9cfc11f479bd802bb"`); - await queryRunner.query(`DROP TABLE "note_watching"`); - await queryRunner.query(`DROP INDEX "IDX_ad0c221b25672daf2df320a817"`); - await queryRunner.query(`DROP INDEX "IDX_45145e4953780f3cd5656f0ea6"`); - await queryRunner.query(`DROP INDEX "IDX_13761f64257f40c5636d0ff95e"`); - await queryRunner.query(`DROP INDEX "IDX_01f4581f114e0ebd2bbb876f0b"`); - await queryRunner.query(`DROP TABLE "note_reaction"`); - await queryRunner.query(`DROP INDEX "IDX_50bd7164c5b78f1f4a42c4d21f"`); - await queryRunner.query(`DROP INDEX "IDX_aecfbd5ef60374918e63ee95fa"`); - await queryRunner.query(`DROP INDEX "IDX_66d2bd2ee31d14bcc23069a89f"`); - await queryRunner.query(`DROP INDEX "IDX_0fb627e1c2f753262a74f0562d"`); - await queryRunner.query(`DROP TABLE "poll_vote"`); - await queryRunner.query(`DROP INDEX "IDX_7125a826ab192eb27e11d358a5"`); - await queryRunner.query(`DROP INDEX "IDX_88937d94d7443d9a99a76fa5c0"`); - await queryRunner.query(`DROP INDEX "IDX_54ebcb6d27222913b908d56fd8"`); - await queryRunner.query(`DROP INDEX "IDX_796a8c03959361f97dc2be1d5c"`); - await queryRunner.query(`DROP INDEX "IDX_25dfc71b0369b003a4cd434d0b"`); - await queryRunner.query(`DROP INDEX "IDX_51c063b6a133a9cb87145450f5"`); - await queryRunner.query(`DROP INDEX "IDX_153536c67d05e9adb24e99fc2b"`); - await queryRunner.query(`DROP INDEX "IDX_5b87d9d19127bd5d92026017a7"`); - await queryRunner.query(`DROP INDEX "IDX_52ccc804d7c69037d558bac4c9"`); - await queryRunner.query(`DROP INDEX "IDX_17cb3553c700a4985dff5a30ff"`); - await queryRunner.query(`DROP INDEX "IDX_e7c0567f5261063592f022e9b5"`); - await queryRunner.query(`DROP TABLE "note"`); - await queryRunner.query(`DROP TYPE "note_visibility_enum"`); - await queryRunner.query(`DROP INDEX "IDX_9949557d0e1b2c19e5344c171e"`); - await queryRunner.query(`DROP INDEX "IDX_64c327441248bae40f7d92f34f"`); - await queryRunner.query(`DROP INDEX "IDX_70ba8f6af34bc924fc9e12adb8"`); - await queryRunner.query(`DROP TABLE "access_token"`); - await queryRunner.query(`DROP INDEX "IDX_f49922d511d666848f250663c4"`); - await queryRunner.query(`DROP INDEX "IDX_3f5b0899ef90527a3462d7c2cb"`); - await queryRunner.query(`DROP INDEX "IDX_048a757923ed8b157e9895da53"`); - await queryRunner.query(`DROP TABLE "app"`); - await queryRunner.query(`DROP INDEX "IDX_5deb01ae162d1d70b80d064c27"`); - await queryRunner.query(`DROP INDEX "IDX_a854e557b1b14814750c7c7b0c"`); - await queryRunner.query(`DROP INDEX "IDX_be623adaa4c566baf5d29ce0c8"`); - await queryRunner.query(`DROP INDEX "IDX_3252a5df8d5bbd16b281f7799e"`); - await queryRunner.query(`DROP INDEX "IDX_fa99d777623947a5b05f394cae"`); - await queryRunner.query(`DROP INDEX "IDX_a27b942a0d6dcff90e3ee9b5e8"`); - await queryRunner.query(`DROP INDEX "IDX_80ca6e6ef65fb9ef34ea8c90f4"`); - await queryRunner.query(`DROP INDEX "IDX_e11e649824a45d8ed01d597fd9"`); - await queryRunner.query(`DROP TABLE "user"`); - await queryRunner.query(`DROP INDEX "IDX_bb90d1956dafc4068c28aa7560"`); - await queryRunner.query(`DROP INDEX "IDX_e5848eac4940934e23dbc17581"`); - await queryRunner.query(`DROP INDEX "IDX_c55b2b7c284d9fef98026fc88e"`); - await queryRunner.query(`DROP INDEX "IDX_e74022ce9a074b3866f70e0d27"`); - await queryRunner.query(`DROP INDEX "IDX_d85a184c2540d2deba33daf642"`); - await queryRunner.query(`DROP INDEX "IDX_a40b8df8c989d7db937ea27cf6"`); - await queryRunner.query(`DROP INDEX "IDX_37bb9a1b4585f8a3beb24c62d6"`); - await queryRunner.query(`DROP INDEX "IDX_92779627994ac79277f070c91e"`); - await queryRunner.query(`DROP INDEX "IDX_860fa6f6c7df5bb887249fba22"`); - await queryRunner.query(`DROP INDEX "IDX_c8dfad3b72196dd1d6b5db168a"`); - await queryRunner.query(`DROP TABLE "drive_file"`); - await queryRunner.query(`DROP INDEX "IDX_00ceffb0cdc238b3233294f08f"`); - await queryRunner.query(`DROP INDEX "IDX_f4fc06e49c0171c85f1c48060d"`); - await queryRunner.query(`DROP INDEX "IDX_02878d441ceae15ce060b73daf"`); - await queryRunner.query(`DROP TABLE "drive_folder"`); - await queryRunner.query(`DROP INDEX "IDX_584b536b49e53ac81beb39a177"`); - await queryRunner.query(`DROP INDEX "IDX_8cb40cfc8f3c28261e6f887b03"`); - await queryRunner.query(`DROP INDEX "IDX_8e4eb51a35d81b64dda28eed0a"`); - await queryRunner.query(`DROP TABLE "log"`); - await queryRunner.query(`DROP TYPE "log_level_enum"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "log_level_enum" AS ENUM('error', 'warning', 'info', 'success', 'debug')`, + ); + await queryRunner.query( + `CREATE TABLE "log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "domain" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "level" "log_level_enum" NOT NULL, "worker" character varying(8) NOT NULL, "machine" character varying(128) NOT NULL, "message" character varying(1024) NOT NULL, "data" jsonb NOT NULL DEFAULT '{}', CONSTRAINT "PK_350604cbdf991d5930d9e618fbd" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8e4eb51a35d81b64dda28eed0a" ON "log" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8cb40cfc8f3c28261e6f887b03" ON "log" ("domain") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_584b536b49e53ac81beb39a177" ON "log" ("level") `, + ); + await queryRunner.query( + `CREATE TABLE "drive_folder" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(128) NOT NULL, "userId" character varying(32), "parentId" character varying(32), CONSTRAINT "PK_7a0c089191f5ebdc214e0af808a" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_02878d441ceae15ce060b73daf" ON "drive_folder" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f4fc06e49c0171c85f1c48060d" ON "drive_folder" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_00ceffb0cdc238b3233294f08f" ON "drive_folder" ("parentId") `, + ); + await queryRunner.query( + `CREATE TABLE "drive_file" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32), "userHost" character varying(128), "md5" character varying(32) NOT NULL, "name" character varying(256) NOT NULL, "type" character varying(128) NOT NULL, "size" integer NOT NULL, "comment" character varying(512), "properties" jsonb NOT NULL DEFAULT '{}', "storedInternal" boolean NOT NULL, "url" character varying(512) NOT NULL, "thumbnailUrl" character varying(512), "webpublicUrl" character varying(512), "accessKey" character varying(256), "thumbnailAccessKey" character varying(256), "webpublicAccessKey" character varying(256), "uri" character varying(512), "src" character varying(512), "folderId" character varying(32), "isSensitive" boolean NOT NULL DEFAULT false, "isLink" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_43ddaaaf18c9e68029b7cbb032e" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c8dfad3b72196dd1d6b5db168a" ON "drive_file" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_860fa6f6c7df5bb887249fba22" ON "drive_file" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_92779627994ac79277f070c91e" ON "drive_file" ("userHost") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_37bb9a1b4585f8a3beb24c62d6" ON "drive_file" ("md5") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a40b8df8c989d7db937ea27cf6" ON "drive_file" ("type") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d85a184c2540d2deba33daf642" ON "drive_file" ("accessKey") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e74022ce9a074b3866f70e0d27" ON "drive_file" ("thumbnailAccessKey") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_c55b2b7c284d9fef98026fc88e" ON "drive_file" ("webpublicAccessKey") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e5848eac4940934e23dbc17581" ON "drive_file" ("uri") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bb90d1956dafc4068c28aa7560" ON "drive_file" ("folderId") `, + ); + await queryRunner.query( + `CREATE TABLE "user" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE, "lastFetchedAt" TIMESTAMP WITH TIME ZONE, "username" character varying(128) NOT NULL, "usernameLower" character varying(128) NOT NULL, "name" character varying(128), "followersCount" integer NOT NULL DEFAULT 0, "followingCount" integer NOT NULL DEFAULT 0, "notesCount" integer NOT NULL DEFAULT 0, "avatarId" character varying(32), "bannerId" character varying(32), "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "avatarUrl" character varying(512), "bannerUrl" character varying(512), "avatarColor" character varying(32), "bannerColor" character varying(32), "isSuspended" boolean NOT NULL DEFAULT false, "isSilenced" boolean NOT NULL DEFAULT false, "isLocked" boolean NOT NULL DEFAULT false, "isBot" boolean NOT NULL DEFAULT false, "isCat" boolean NOT NULL DEFAULT false, "isAdmin" boolean NOT NULL DEFAULT false, "isModerator" boolean NOT NULL DEFAULT false, "isVerified" boolean NOT NULL DEFAULT false, "emojis" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "host" character varying(128), "inbox" character varying(512), "sharedInbox" character varying(512), "featured" character varying(512), "uri" character varying(512), "token" character(16), CONSTRAINT "UQ_a854e557b1b14814750c7c7b0c9" UNIQUE ("token"), CONSTRAINT "REL_58f5c71eaab331645112cf8cfa" UNIQUE ("avatarId"), CONSTRAINT "REL_afc64b53f8db3707ceb34eb28e" UNIQUE ("bannerId"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e11e649824a45d8ed01d597fd9" ON "user" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_80ca6e6ef65fb9ef34ea8c90f4" ON "user" ("updatedAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a27b942a0d6dcff90e3ee9b5e8" ON "user" ("usernameLower") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fa99d777623947a5b05f394cae" ON "user" ("tags") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3252a5df8d5bbd16b281f7799e" ON "user" ("host") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_be623adaa4c566baf5d29ce0c8" ON "user" ("uri") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a854e557b1b14814750c7c7b0c" ON "user" ("token") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5deb01ae162d1d70b80d064c27" ON "user" ("usernameLower", "host") `, + ); + await queryRunner.query( + `CREATE TABLE "app" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32), "secret" character varying(64) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(512) NOT NULL, "permission" character varying(64) array NOT NULL, "callbackUrl" character varying(512), CONSTRAINT "PK_9478629fc093d229df09e560aea" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_048a757923ed8b157e9895da53" ON "app" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3f5b0899ef90527a3462d7c2cb" ON "app" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f49922d511d666848f250663c4" ON "app" ("secret") `, + ); + await queryRunner.query( + `CREATE TABLE "access_token" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(128) NOT NULL, "hash" character varying(128) NOT NULL, "userId" character varying(32) NOT NULL, "appId" character varying(32) NOT NULL, CONSTRAINT "PK_f20f028607b2603deabd8182d12" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_70ba8f6af34bc924fc9e12adb8" ON "access_token" ("token") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_64c327441248bae40f7d92f34f" ON "access_token" ("hash") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9949557d0e1b2c19e5344c171e" ON "access_token" ("userId") `, + ); + await queryRunner.query( + `CREATE TYPE "note_visibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`, + ); + await queryRunner.query( + `CREATE TABLE "note" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "replyId" character varying(32), "renoteId" character varying(32), "text" text, "name" character varying(256), "cw" character varying(512), "appId" character varying(32), "userId" character varying(32) NOT NULL, "viaMobile" boolean NOT NULL DEFAULT false, "localOnly" boolean NOT NULL DEFAULT false, "renoteCount" smallint NOT NULL DEFAULT 0, "repliesCount" smallint NOT NULL DEFAULT 0, "reactions" jsonb NOT NULL DEFAULT '{}', "visibility" "note_visibility_enum" NOT NULL, "uri" character varying(512), "score" integer NOT NULL DEFAULT 0, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "attachedFileTypes" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "visibleUserIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "mentions" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "mentionedRemoteUsers" text NOT NULL DEFAULT '[]', "emojis" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "hasPoll" boolean NOT NULL DEFAULT false, "geo" jsonb DEFAULT null, "userHost" character varying(128), "replyUserId" character varying(32), "replyUserHost" character varying(128), "renoteUserId" character varying(32), "renoteUserHost" character varying(128), CONSTRAINT "PK_96d0c172a4fba276b1bbed43058" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e7c0567f5261063592f022e9b5" ON "note" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_17cb3553c700a4985dff5a30ff" ON "note" ("replyId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_52ccc804d7c69037d558bac4c9" ON "note" ("renoteId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5b87d9d19127bd5d92026017a7" ON "note" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_153536c67d05e9adb24e99fc2b" ON "note" ("uri") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_51c063b6a133a9cb87145450f5" ON "note" ("fileIds") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_25dfc71b0369b003a4cd434d0b" ON "note" ("attachedFileTypes") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_796a8c03959361f97dc2be1d5c" ON "note" ("visibleUserIds") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_54ebcb6d27222913b908d56fd8" ON "note" ("mentions") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_88937d94d7443d9a99a76fa5c0" ON "note" ("tags") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7125a826ab192eb27e11d358a5" ON "note" ("userHost") `, + ); + await queryRunner.query( + `CREATE TABLE "poll_vote" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "choice" integer NOT NULL, CONSTRAINT "PK_fd002d371201c472490ba89c6a0" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0fb627e1c2f753262a74f0562d" ON "poll_vote" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_66d2bd2ee31d14bcc23069a89f" ON "poll_vote" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_aecfbd5ef60374918e63ee95fa" ON "poll_vote" ("noteId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_50bd7164c5b78f1f4a42c4d21f" ON "poll_vote" ("userId", "noteId", "choice") `, + ); + await queryRunner.query( + `CREATE TABLE "note_reaction" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "reaction" character varying(128) NOT NULL, CONSTRAINT "PK_767ec729b108799b587a3fcc9cf" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_01f4581f114e0ebd2bbb876f0b" ON "note_reaction" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_13761f64257f40c5636d0ff95e" ON "note_reaction" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_45145e4953780f3cd5656f0ea6" ON "note_reaction" ("noteId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_ad0c221b25672daf2df320a817" ON "note_reaction" ("userId", "noteId") `, + ); + await queryRunner.query( + `CREATE TABLE "note_watching" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "noteUserId" character varying(32) NOT NULL, CONSTRAINT "PK_49286fdb23725945a74aa27d757" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_318cdf42a9cfc11f479bd802bb" ON "note_watching" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b0134ec406e8d09a540f818288" ON "note_watching" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_03e7028ab8388a3f5e3ce2a861" ON "note_watching" ("noteId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_44499765eec6b5489d72c4253b" ON "note_watching" ("noteUserId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a42c93c69989ce1d09959df4cf" ON "note_watching" ("userId", "noteId") `, + ); + await queryRunner.query( + `CREATE TABLE "note_unread" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "noteUserId" character varying(32) NOT NULL, "isSpecified" boolean NOT NULL, CONSTRAINT "PK_1904eda61a784f57e6e51fa9c1f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_56b0166d34ddae49d8ef7610bb" ON "note_unread" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e637cba4dc4410218c4251260e" ON "note_unread" ("noteId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d908433a4953cc13216cd9c274" ON "note_unread" ("userId", "noteId") `, + ); + await queryRunner.query( + `CREATE TABLE "notification" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "notifieeId" character varying(32) NOT NULL, "notifierId" character varying(32) NOT NULL, "type" character varying(32) NOT NULL, "isRead" boolean NOT NULL DEFAULT false, "noteId" character varying(32), "reaction" character varying(128), "choice" integer, CONSTRAINT "PK_705b6c7cdf9b2c2ff7ac7872cb7" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b11a5e627c41d4dc3170f1d370" ON "notification" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3c601b70a1066d2c8b517094cb" ON "notification" ("notifieeId") `, + ); + await queryRunner.query( + `CREATE TABLE "meta" ("id" character varying(32) NOT NULL, "name" character varying(128), "description" character varying(1024), "maintainerName" character varying(128), "maintainerEmail" character varying(128), "announcements" jsonb NOT NULL DEFAULT '[]', "disableRegistration" boolean NOT NULL DEFAULT false, "disableLocalTimeline" boolean NOT NULL DEFAULT false, "disableGlobalTimeline" boolean NOT NULL DEFAULT false, "enableEmojiReaction" boolean NOT NULL DEFAULT true, "useStarForReactionFallback" boolean NOT NULL DEFAULT false, "langs" character varying(64) array NOT NULL DEFAULT '{}'::varchar[], "hiddenTags" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "blockedHosts" character varying(256) array NOT NULL DEFAULT '{}'::varchar[], "mascotImageUrl" character varying(512) DEFAULT '/assets/ai.png', "bannerUrl" character varying(512), "errorImageUrl" character varying(512) DEFAULT 'https://xn--931a.moe/aiart/yubitun.png', "iconUrl" character varying(512), "cacheRemoteFiles" boolean NOT NULL DEFAULT true, "proxyAccount" character varying(128), "enableRecaptcha" boolean NOT NULL DEFAULT false, "recaptchaSiteKey" character varying(64), "recaptchaSecretKey" character varying(64), "localDriveCapacityMb" integer NOT NULL DEFAULT 1024, "remoteDriveCapacityMb" integer NOT NULL DEFAULT 32, "maxNoteTextLength" integer NOT NULL DEFAULT 500, "summalyProxy" character varying(128), "enableEmail" boolean NOT NULL DEFAULT false, "email" character varying(128), "smtpSecure" boolean NOT NULL DEFAULT false, "smtpHost" character varying(128), "smtpPort" integer, "smtpUser" character varying(128), "smtpPass" character varying(128), "enableServiceWorker" boolean NOT NULL DEFAULT false, "swPublicKey" character varying(128), "swPrivateKey" character varying(128), "enableTwitterIntegration" boolean NOT NULL DEFAULT false, "twitterConsumerKey" character varying(128), "twitterConsumerSecret" character varying(128), "enableGithubIntegration" boolean NOT NULL DEFAULT false, "githubClientId" character varying(128), "githubClientSecret" character varying(128), "enableDiscordIntegration" boolean NOT NULL DEFAULT false, "discordClientId" character varying(128), "discordClientSecret" character varying(128), CONSTRAINT "PK_c4c17a6c2bd7651338b60fc590b" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TABLE "following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_c76c6e044bdf76ecf8bfb82a645" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_582f8fab771a9040a12961f3e7" ON "following" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_24e0042143a18157b234df186c" ON "following" ("followeeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6516c5a6f3c015b4eed39978be" ON "following" ("followerId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_307be5f1d1252e0388662acb96" ON "following" ("followerId", "followeeId") `, + ); + await queryRunner.query( + `CREATE TABLE "instance" ("id" character varying(32) NOT NULL, "caughtAt" TIMESTAMP WITH TIME ZONE NOT NULL, "host" character varying(128) NOT NULL, "system" character varying(64), "usersCount" integer NOT NULL DEFAULT 0, "notesCount" integer NOT NULL DEFAULT 0, "followingCount" integer NOT NULL DEFAULT 0, "followersCount" integer NOT NULL DEFAULT 0, "driveUsage" integer NOT NULL DEFAULT 0, "driveFiles" integer NOT NULL DEFAULT 0, "latestRequestSentAt" TIMESTAMP WITH TIME ZONE, "latestStatus" integer, "latestRequestReceivedAt" TIMESTAMP WITH TIME ZONE, "lastCommunicatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "isNotResponding" boolean NOT NULL DEFAULT false, "isMarkedAsClosed" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_eaf60e4a0c399c9935413e06474" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2cd3b2a6b4cf0b910b260afe08" ON "instance" ("caughtAt") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_8d5afc98982185799b160e10eb" ON "instance" ("host") `, + ); + await queryRunner.query( + `CREATE TABLE "muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "muteeId" character varying(32) NOT NULL, "muterId" character varying(32) NOT NULL, CONSTRAINT "PK_2e92d06c8b5c602eeb27ca9ba48" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f86d57fbca33c7a4e6897490cc" ON "muting" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ec96b4fed9dae517e0dbbe0675" ON "muting" ("muteeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_93060675b4a79a577f31d260c6" ON "muting" ("muterId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_1eb9d9824a630321a29fd3b290" ON "muting" ("muterId", "muteeId") `, + ); + await queryRunner.query( + `CREATE TABLE "sw_subscription" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "endpoint" character varying(512) NOT NULL, "auth" character varying(256) NOT NULL, "publickey" character varying(128) NOT NULL, CONSTRAINT "PK_e8f763631530051b95eb6279b91" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_97754ca6f2baff9b4abb7f853d" ON "sw_subscription" ("userId") `, + ); + await queryRunner.query( + `CREATE TABLE "blocking" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "blockeeId" character varying(32) NOT NULL, "blockerId" character varying(32) NOT NULL, CONSTRAINT "PK_e5d9a541cc1965ee7e048ea09dd" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b9a354f7941c1e779f3b33aea6" ON "blocking" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2cd4a2743a99671308f5417759" ON "blocking" ("blockeeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0627125f1a8a42c9a1929edb55" ON "blocking" ("blockerId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_98a1bc5cb30dfd159de056549f" ON "blocking" ("blockerId", "blockeeId") `, + ); + await queryRunner.query( + `CREATE TABLE "user_list" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, CONSTRAINT "PK_87bab75775fd9b1ff822b656402" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b7fcefbdd1c18dce86687531f9" ON "user_list" ("userId") `, + ); + await queryRunner.query( + `CREATE TABLE "user_list_joining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userListId" character varying(32) NOT NULL, CONSTRAINT "PK_11abb3768da1c5f8de101c9df45" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d844bfc6f3f523a05189076efa" ON "user_list_joining" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_605472305f26818cc93d1baaa7" ON "user_list_joining" ("userListId") `, + ); + await queryRunner.query( + `CREATE TABLE "hashtag" ("id" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "mentionedUserIds" character varying(32) array NOT NULL, "mentionedUsersCount" integer NOT NULL DEFAULT 0, "mentionedLocalUserIds" character varying(32) array NOT NULL, "mentionedLocalUsersCount" integer NOT NULL DEFAULT 0, "mentionedRemoteUserIds" character varying(32) array NOT NULL, "mentionedRemoteUsersCount" integer NOT NULL DEFAULT 0, "attachedUserIds" character varying(32) array NOT NULL, "attachedUsersCount" integer NOT NULL DEFAULT 0, "attachedLocalUserIds" character varying(32) array NOT NULL, "attachedLocalUsersCount" integer NOT NULL DEFAULT 0, "attachedRemoteUserIds" character varying(32) array NOT NULL, "attachedRemoteUsersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_cb36eb8af8412bfa978f1165d78" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_347fec870eafea7b26c8a73bac" ON "hashtag" ("name") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2710a55f826ee236ea1a62698f" ON "hashtag" ("mentionedUsersCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0e206cec573f1edff4a3062923" ON "hashtag" ("mentionedLocalUsersCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4c02d38a976c3ae132228c6fce" ON "hashtag" ("mentionedRemoteUsersCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d57f9030cd3af7f63ffb1c267c" ON "hashtag" ("attachedUsersCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0c44bf4f680964145f2a68a341" ON "hashtag" ("attachedLocalUsersCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0b03cbcd7e6a7ce068efa8ecc2" ON "hashtag" ("attachedRemoteUsersCount") `, + ); + await queryRunner.query( + `CREATE TABLE "note_favorite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_af0da35a60b9fa4463a62082b36" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_47f4b1892f5d6ba8efb3057d81" ON "note_favorite" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0f4fb9ad355f3effff221ef245" ON "note_favorite" ("userId", "noteId") `, + ); + await queryRunner.query( + `CREATE TABLE "abuse_user_report" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "reporterId" character varying(32) NOT NULL, "comment" character varying(512) NOT NULL, CONSTRAINT "PK_87873f5f5cc5c321a1306b2d18c" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_db2098070b2b5a523c58181f74" ON "abuse_user_report" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d049123c413e68ca52abe73420" ON "abuse_user_report" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_04cc96756f89d0b7f9473e8cdf" ON "abuse_user_report" ("reporterId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5cd442c3b2e74fdd99dae20243" ON "abuse_user_report" ("userId", "reporterId") `, + ); + await queryRunner.query( + `CREATE TABLE "registration_ticket" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "code" character varying(64) NOT NULL, CONSTRAINT "PK_f11696b6fafcf3662d4292734f8" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0ff69e8dfa9fe31bb4a4660f59" ON "registration_ticket" ("code") `, + ); + await queryRunner.query( + `CREATE TABLE "messaging_message" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "recipientId" character varying(32) NOT NULL, "text" character varying(4096), "isRead" boolean NOT NULL DEFAULT false, "fileId" character varying(32), CONSTRAINT "PK_db398fd79dc95d0eb8c30456eaa" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e21cd3646e52ef9c94aaf17c2e" ON "messaging_message" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5377c307783fce2b6d352e1203" ON "messaging_message" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_cac14a4e3944454a5ce7daa514" ON "messaging_message" ("recipientId") `, + ); + await queryRunner.query( + `CREATE TABLE "signin" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "ip" character varying(128) NOT NULL, "headers" jsonb NOT NULL, "success" boolean NOT NULL, CONSTRAINT "PK_9e96ddc025712616fc492b3b588" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2c308dbdc50d94dc625670055f" ON "signin" ("userId") `, + ); + await queryRunner.query( + `CREATE TABLE "auth_session" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(128) NOT NULL, "userId" character varying(32), "appId" character varying(32) NOT NULL, CONSTRAINT "PK_19354ed146424a728c1112a8cbf" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_62cb09e1129f6ec024ef66e183" ON "auth_session" ("token") `, + ); + await queryRunner.query( + `CREATE TABLE "follow_request" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, "requestId" character varying(128), "followerHost" character varying(128), "followerInbox" character varying(512), "followerSharedInbox" character varying(512), "followeeHost" character varying(128), "followeeInbox" character varying(512), "followeeSharedInbox" character varying(512), CONSTRAINT "PK_53a9aa3725f7a3deb150b39dbfc" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_12c01c0d1a79f77d9f6c15fadd" ON "follow_request" ("followeeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a7fd92dd6dc519e6fb435dd108" ON "follow_request" ("followerId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d54a512b822fac7ed52800f6b4" ON "follow_request" ("followerId", "followeeId") `, + ); + await queryRunner.query( + `CREATE TABLE "emoji" ("id" character varying(32) NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE, "name" character varying(128) NOT NULL, "host" character varying(128), "url" character varying(512) NOT NULL, "uri" character varying(512), "type" character varying(64), "aliases" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_df74ce05e24999ee01ea0bc50a3" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b37dafc86e9af007e3295c2781" ON "emoji" ("name") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5900e907bb46516ddf2871327c" ON "emoji" ("host") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_4f4d35e1256c84ae3d1f0eab10" ON "emoji" ("name", "host") `, + ); + await queryRunner.query( + `CREATE TABLE "reversi_game" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "startedAt" TIMESTAMP WITH TIME ZONE, "user1Id" character varying(32) NOT NULL, "user2Id" character varying(32) NOT NULL, "user1Accepted" boolean NOT NULL DEFAULT false, "user2Accepted" boolean NOT NULL DEFAULT false, "black" integer, "isStarted" boolean NOT NULL DEFAULT false, "isEnded" boolean NOT NULL DEFAULT false, "winnerId" character varying(32), "surrendered" character varying(32), "logs" jsonb NOT NULL DEFAULT '[]', "map" character varying(64) array NOT NULL, "bw" character varying(32) NOT NULL, "isLlotheo" boolean NOT NULL DEFAULT false, "canPutEverywhere" boolean NOT NULL DEFAULT false, "loopedBoard" boolean NOT NULL DEFAULT false, "form1" jsonb DEFAULT null, "form2" jsonb DEFAULT null, "crc32" character varying(32), CONSTRAINT "PK_76b30eeba71b1193ad7c5311c3f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b46ec40746efceac604142be1c" ON "reversi_game" ("createdAt") `, + ); + await queryRunner.query( + `CREATE TABLE "reversi_matching" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "parentId" character varying(32) NOT NULL, "childId" character varying(32) NOT NULL, CONSTRAINT "PK_880bd0afbab232f21c8b9d146cf" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b604d92d6c7aec38627f6eaf16" ON "reversi_matching" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3b25402709dd9882048c2bbade" ON "reversi_matching" ("parentId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e247b23a3c9b45f89ec1299d06" ON "reversi_matching" ("childId") `, + ); + await queryRunner.query( + `CREATE TABLE "user_note_pining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_a6a2dad4ae000abce2ea9d9b103" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bfbc6f79ba4007b4ce5097f08d" ON "user_note_pining" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_410cd649884b501c02d6e72738" ON "user_note_pining" ("userId", "noteId") `, + ); + await queryRunner.query( + `CREATE TYPE "poll_notevisibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`, + ); + await queryRunner.query( + `CREATE TABLE "poll" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE, "multiple" boolean NOT NULL, "choices" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], "votes" integer array NOT NULL, "noteVisibility" "poll_notevisibility_enum" NOT NULL, "userId" character varying(32) NOT NULL, "userHost" character varying(128), CONSTRAINT "REL_da851e06d0dfe2ef397d8b1bf1" UNIQUE ("noteId"), CONSTRAINT "PK_da851e06d0dfe2ef397d8b1bf1b" PRIMARY KEY ("noteId"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0610ebcfcfb4a18441a9bcdab2" ON "poll" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7fa20a12319c7f6dc3aed98c0a" ON "poll" ("userHost") `, + ); + await queryRunner.query( + `CREATE TABLE "user_keypair" ("userId" character varying(32) NOT NULL, "publicKey" character varying(4096) NOT NULL, "privateKey" character varying(4096) NOT NULL, CONSTRAINT "REL_f4853eb41ab722fe05f81cedeb" UNIQUE ("userId"), CONSTRAINT "PK_f4853eb41ab722fe05f81cedeb6" PRIMARY KEY ("userId"))`, + ); + await queryRunner.query( + `CREATE TABLE "user_publickey" ("userId" character varying(32) NOT NULL, "keyId" character varying(256) NOT NULL, "keyPem" character varying(4096) NOT NULL, CONSTRAINT "REL_10c146e4b39b443ede016f6736" UNIQUE ("userId"), CONSTRAINT "PK_10c146e4b39b443ede016f6736d" PRIMARY KEY ("userId"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_171e64971c780ebd23fae140bb" ON "user_publickey" ("keyId") `, + ); + await queryRunner.query( + `CREATE TABLE "user_profile" ("userId" character varying(32) NOT NULL, "location" character varying(128), "birthday" character(10), "description" character varying(1024), "fields" jsonb NOT NULL DEFAULT '[]', "url" character varying(512), "email" character varying(128), "emailVerifyCode" character varying(128), "emailVerified" boolean NOT NULL DEFAULT false, "twoFactorTempSecret" character varying(128), "twoFactorSecret" character varying(128), "twoFactorEnabled" boolean NOT NULL DEFAULT false, "password" character varying(128), "clientData" jsonb NOT NULL DEFAULT '{}', "autoWatch" boolean NOT NULL DEFAULT false, "autoAcceptFollowed" boolean NOT NULL DEFAULT false, "alwaysMarkNsfw" boolean NOT NULL DEFAULT false, "carefulBot" boolean NOT NULL DEFAULT false, "twitter" boolean NOT NULL DEFAULT false, "twitterAccessToken" character varying(64) DEFAULT null, "twitterAccessTokenSecret" character varying(64) DEFAULT null, "twitterUserId" character varying(64) DEFAULT null, "twitterScreenName" character varying(64) DEFAULT null, "github" boolean NOT NULL DEFAULT false, "githubAccessToken" character varying(64) DEFAULT null, "githubId" integer DEFAULT null, "githubLogin" character varying(64) DEFAULT null, "discord" boolean NOT NULL DEFAULT false, "discordAccessToken" character varying(64) DEFAULT null, "discordRefreshToken" character varying(64) DEFAULT null, "discordExpiresDate" integer DEFAULT null, "discordId" character varying(64) DEFAULT null, "discordUsername" character varying(64) DEFAULT null, "discordDiscriminator" character varying(64) DEFAULT null, "userHost" character varying(128), CONSTRAINT "REL_51cb79b5555effaf7d69ba1cff" UNIQUE ("userId"), CONSTRAINT "PK_51cb79b5555effaf7d69ba1cff9" PRIMARY KEY ("userId"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_dce530b98e454793dac5ec2f5a" ON "user_profile" ("userHost") `, + ); + await queryRunner.query( + `CREATE TYPE "__chart__active_users_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__active_users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__active_users_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_317237a9f733b970604a11e314f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__drive_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__drive_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_totalCount" bigint NOT NULL, "___local_totalSize" bigint NOT NULL, "___local_incCount" bigint NOT NULL, "___local_incSize" bigint NOT NULL, "___local_decCount" bigint NOT NULL, "___local_decSize" bigint NOT NULL, "___remote_totalCount" bigint NOT NULL, "___remote_totalSize" bigint NOT NULL, "___remote_incCount" bigint NOT NULL, "___remote_incSize" bigint NOT NULL, "___remote_decCount" bigint NOT NULL, "___remote_decSize" bigint NOT NULL, CONSTRAINT "PK_f96bc548a765cd4b3b354221ce7" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__federation_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__federation" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__federation_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___instance_total" bigint NOT NULL, "___instance_inc" bigint NOT NULL, "___instance_dec" bigint NOT NULL, CONSTRAINT "PK_b39dcd31a0fe1a7757e348e85fd" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__hashtag_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__hashtag" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__hashtag_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_c32f1ea2b44a5d2f7881e37f8f9" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__instance_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__instance" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__instance_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___requests_failed" bigint NOT NULL, "___requests_succeeded" bigint NOT NULL, "___requests_received" bigint NOT NULL, "___notes_total" bigint NOT NULL, "___notes_inc" bigint NOT NULL, "___notes_dec" bigint NOT NULL, "___notes_diffs_normal" bigint NOT NULL, "___notes_diffs_reply" bigint NOT NULL, "___notes_diffs_renote" bigint NOT NULL, "___users_total" bigint NOT NULL, "___users_inc" bigint NOT NULL, "___users_dec" bigint NOT NULL, "___following_total" bigint NOT NULL, "___following_inc" bigint NOT NULL, "___following_dec" bigint NOT NULL, "___followers_total" bigint NOT NULL, "___followers_inc" bigint NOT NULL, "___followers_dec" bigint NOT NULL, "___drive_totalFiles" bigint NOT NULL, "___drive_totalUsage" bigint NOT NULL, "___drive_incFiles" bigint NOT NULL, "___drive_incUsage" bigint NOT NULL, "___drive_decFiles" bigint NOT NULL, "___drive_decUsage" bigint NOT NULL, CONSTRAINT "PK_1267c67c7c2d47b4903975f2c00" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__network_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__network" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__network_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___incomingRequests" bigint NOT NULL, "___outgoingRequests" bigint NOT NULL, "___totalTime" bigint NOT NULL, "___incomingBytes" bigint NOT NULL, "___outgoingBytes" bigint NOT NULL, CONSTRAINT "PK_bc4290c2e27fad14ef0c1ca93f3" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__notes_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__notes_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___local_diffs_normal" bigint NOT NULL, "___local_diffs_reply" bigint NOT NULL, "___local_diffs_renote" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, "___remote_diffs_normal" bigint NOT NULL, "___remote_diffs_reply" bigint NOT NULL, "___remote_diffs_renote" bigint NOT NULL, CONSTRAINT "PK_0aec823fa85c7f901bdb3863b14" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__per_user_drive_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__per_user_drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_drive_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___totalCount" bigint NOT NULL, "___totalSize" bigint NOT NULL, "___incCount" bigint NOT NULL, "___incSize" bigint NOT NULL, "___decCount" bigint NOT NULL, "___decSize" bigint NOT NULL, CONSTRAINT "PK_d0ef23d24d666e1a44a0cd3d208" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__per_user_following_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__per_user_following" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_following_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_followings_total" bigint NOT NULL, "___local_followings_inc" bigint NOT NULL, "___local_followings_dec" bigint NOT NULL, "___local_followers_total" bigint NOT NULL, "___local_followers_inc" bigint NOT NULL, "___local_followers_dec" bigint NOT NULL, "___remote_followings_total" bigint NOT NULL, "___remote_followings_inc" bigint NOT NULL, "___remote_followings_dec" bigint NOT NULL, "___remote_followers_total" bigint NOT NULL, "___remote_followers_inc" bigint NOT NULL, "___remote_followers_dec" bigint NOT NULL, CONSTRAINT "PK_85bb1b540363a29c2fec83bd907" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__per_user_notes_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__per_user_notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_notes_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___total" bigint NOT NULL, "___inc" bigint NOT NULL, "___dec" bigint NOT NULL, "___diffs_normal" bigint NOT NULL, "___diffs_reply" bigint NOT NULL, "___diffs_renote" bigint NOT NULL, CONSTRAINT "PK_334acf6e915af2f29edc11b8e50" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__per_user_reaction_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__per_user_reaction" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__per_user_reaction_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "PK_984f54dae441e65b633e8d27a7f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__test_grouped_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__test_grouped" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_grouped_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo_total" bigint NOT NULL, "___foo_inc" bigint NOT NULL, "___foo_dec" bigint NOT NULL, CONSTRAINT "PK_f4a2b175d308695af30d4293272" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__test_unique_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__test_unique" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_unique_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo" bigint NOT NULL, CONSTRAINT "PK_409bac9c97cc612d8500012319d" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__test_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__test" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__test_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___foo_total" bigint NOT NULL, "___foo_inc" bigint NOT NULL, "___foo_dec" bigint NOT NULL, CONSTRAINT "PK_b4bc31dffbd1b785276a3ecfc1e" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE TYPE "__chart__users_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `CREATE TABLE "__chart__users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128), "span" "__chart__users_span_enum" NOT NULL, "unique" jsonb NOT NULL DEFAULT '{}', "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, CONSTRAINT "PK_4dfcf2c78d03524b9eb2c99d328" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" ADD CONSTRAINT "FK_f4fc06e49c0171c85f1c48060d2" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" ADD CONSTRAINT "FK_00ceffb0cdc238b3233294f08f2" FOREIGN KEY ("parentId") REFERENCES "drive_folder"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD CONSTRAINT "FK_bb90d1956dafc4068c28aa7560a" FOREIGN KEY ("folderId") REFERENCES "drive_folder"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user" ADD CONSTRAINT "FK_58f5c71eaab331645112cf8cfa5" FOREIGN KEY ("avatarId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user" ADD CONSTRAINT "FK_afc64b53f8db3707ceb34eb28e2" FOREIGN KEY ("bannerId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "app" ADD CONSTRAINT "FK_3f5b0899ef90527a3462d7c2cb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD CONSTRAINT "FK_9949557d0e1b2c19e5344c171e9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5" FOREIGN KEY ("replyId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_52ccc804d7c69037d558bac4c96" FOREIGN KEY ("renoteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_ec5c201576192ba8904c345c5cc" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_5b87d9d19127bd5d92026017a7b" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" ADD CONSTRAINT "FK_66d2bd2ee31d14bcc23069a89f8" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" ADD CONSTRAINT "FK_aecfbd5ef60374918e63ee95fa7" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" ADD CONSTRAINT "FK_13761f64257f40c5636d0ff95ee" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" ADD CONSTRAINT "FK_45145e4953780f3cd5656f0ea6a" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" ADD CONSTRAINT "FK_b0134ec406e8d09a540f8182888" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" ADD CONSTRAINT "FK_03e7028ab8388a3f5e3ce2a8619" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" ADD CONSTRAINT "FK_56b0166d34ddae49d8ef7610bb9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" ADD CONSTRAINT "FK_e637cba4dc4410218c4251260e4" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_3c601b70a1066d2c8b517094cb9" FOREIGN KEY ("notifieeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_769cb6b73a1efe22ddf733ac453" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "following" ADD CONSTRAINT "FK_24e0042143a18157b234df186c3" FOREIGN KEY ("followeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "following" ADD CONSTRAINT "FK_6516c5a6f3c015b4eed39978be5" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ADD CONSTRAINT "FK_ec96b4fed9dae517e0dbbe0675c" FOREIGN KEY ("muteeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ADD CONSTRAINT "FK_93060675b4a79a577f31d260c67" FOREIGN KEY ("muterId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "sw_subscription" ADD CONSTRAINT "FK_97754ca6f2baff9b4abb7f853dd" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" ADD CONSTRAINT "FK_2cd4a2743a99671308f5417759e" FOREIGN KEY ("blockeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" ADD CONSTRAINT "FK_0627125f1a8a42c9a1929edb552" FOREIGN KEY ("blockerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_list" ADD CONSTRAINT "FK_b7fcefbdd1c18dce86687531f99" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" ADD CONSTRAINT "FK_d844bfc6f3f523a05189076efaa" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" ADD CONSTRAINT "FK_605472305f26818cc93d1baaa74" FOREIGN KEY ("userListId") REFERENCES "user_list"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" ADD CONSTRAINT "FK_47f4b1892f5d6ba8efb3057d81a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" ADD CONSTRAINT "FK_0e00498f180193423c992bc4370" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_d049123c413e68ca52abe734203" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_04cc96756f89d0b7f9473e8cdf3" FOREIGN KEY ("reporterId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_5377c307783fce2b6d352e1203b" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_cac14a4e3944454a5ce7daa5142" FOREIGN KEY ("recipientId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_535def119223ac05ad3fa9ef64b" FOREIGN KEY ("fileId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "signin" ADD CONSTRAINT "FK_2c308dbdc50d94dc625670055f7" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" ADD CONSTRAINT "FK_c072b729d71697f959bde66ade0" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" ADD CONSTRAINT "FK_dbe037d4bddd17b03a1dc778dee" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" ADD CONSTRAINT "FK_12c01c0d1a79f77d9f6c15fadd2" FOREIGN KEY ("followeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" ADD CONSTRAINT "FK_a7fd92dd6dc519e6fb435dd108f" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" ADD CONSTRAINT "FK_f7467510c60a45ce5aca6292743" FOREIGN KEY ("user1Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" ADD CONSTRAINT "FK_6649a4e8c5d5cf32fb03b5da9f6" FOREIGN KEY ("user2Id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" ADD CONSTRAINT "FK_3b25402709dd9882048c2bbade0" FOREIGN KEY ("parentId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" ADD CONSTRAINT "FK_e247b23a3c9b45f89ec1299d066" FOREIGN KEY ("childId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" ADD CONSTRAINT "FK_bfbc6f79ba4007b4ce5097f08d6" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" ADD CONSTRAINT "FK_68881008f7c3588ad7ecae471cf" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "poll" ADD CONSTRAINT "FK_da851e06d0dfe2ef397d8b1bf1b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_keypair" ADD CONSTRAINT "FK_f4853eb41ab722fe05f81cedeb6" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_publickey" ADD CONSTRAINT "FK_10c146e4b39b443ede016f6736d" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP CONSTRAINT "FK_51cb79b5555effaf7d69ba1cff9"`, + ); + await queryRunner.query( + `ALTER TABLE "user_publickey" DROP CONSTRAINT "FK_10c146e4b39b443ede016f6736d"`, + ); + await queryRunner.query( + `ALTER TABLE "user_keypair" DROP CONSTRAINT "FK_f4853eb41ab722fe05f81cedeb6"`, + ); + await queryRunner.query( + `ALTER TABLE "poll" DROP CONSTRAINT "FK_da851e06d0dfe2ef397d8b1bf1b"`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" DROP CONSTRAINT "FK_68881008f7c3588ad7ecae471cf"`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" DROP CONSTRAINT "FK_bfbc6f79ba4007b4ce5097f08d6"`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" DROP CONSTRAINT "FK_e247b23a3c9b45f89ec1299d066"`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_matching" DROP CONSTRAINT "FK_3b25402709dd9882048c2bbade0"`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" DROP CONSTRAINT "FK_6649a4e8c5d5cf32fb03b5da9f6"`, + ); + await queryRunner.query( + `ALTER TABLE "reversi_game" DROP CONSTRAINT "FK_f7467510c60a45ce5aca6292743"`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" DROP CONSTRAINT "FK_a7fd92dd6dc519e6fb435dd108f"`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" DROP CONSTRAINT "FK_12c01c0d1a79f77d9f6c15fadd2"`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" DROP CONSTRAINT "FK_dbe037d4bddd17b03a1dc778dee"`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" DROP CONSTRAINT "FK_c072b729d71697f959bde66ade0"`, + ); + await queryRunner.query( + `ALTER TABLE "signin" DROP CONSTRAINT "FK_2c308dbdc50d94dc625670055f7"`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_535def119223ac05ad3fa9ef64b"`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_cac14a4e3944454a5ce7daa5142"`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_5377c307783fce2b6d352e1203b"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_04cc96756f89d0b7f9473e8cdf3"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" DROP CONSTRAINT "FK_0e00498f180193423c992bc4370"`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" DROP CONSTRAINT "FK_47f4b1892f5d6ba8efb3057d81a"`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" DROP CONSTRAINT "FK_605472305f26818cc93d1baaa74"`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" DROP CONSTRAINT "FK_d844bfc6f3f523a05189076efaa"`, + ); + await queryRunner.query( + `ALTER TABLE "user_list" DROP CONSTRAINT "FK_b7fcefbdd1c18dce86687531f99"`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" DROP CONSTRAINT "FK_0627125f1a8a42c9a1929edb552"`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" DROP CONSTRAINT "FK_2cd4a2743a99671308f5417759e"`, + ); + await queryRunner.query( + `ALTER TABLE "sw_subscription" DROP CONSTRAINT "FK_97754ca6f2baff9b4abb7f853dd"`, + ); + await queryRunner.query( + `ALTER TABLE "muting" DROP CONSTRAINT "FK_93060675b4a79a577f31d260c67"`, + ); + await queryRunner.query( + `ALTER TABLE "muting" DROP CONSTRAINT "FK_ec96b4fed9dae517e0dbbe0675c"`, + ); + await queryRunner.query( + `ALTER TABLE "following" DROP CONSTRAINT "FK_6516c5a6f3c015b4eed39978be5"`, + ); + await queryRunner.query( + `ALTER TABLE "following" DROP CONSTRAINT "FK_24e0042143a18157b234df186c3"`, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_769cb6b73a1efe22ddf733ac453"`, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_3c601b70a1066d2c8b517094cb9"`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" DROP CONSTRAINT "FK_e637cba4dc4410218c4251260e4"`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" DROP CONSTRAINT "FK_56b0166d34ddae49d8ef7610bb9"`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" DROP CONSTRAINT "FK_03e7028ab8388a3f5e3ce2a8619"`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" DROP CONSTRAINT "FK_b0134ec406e8d09a540f8182888"`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" DROP CONSTRAINT "FK_45145e4953780f3cd5656f0ea6a"`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" DROP CONSTRAINT "FK_13761f64257f40c5636d0ff95ee"`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" DROP CONSTRAINT "FK_aecfbd5ef60374918e63ee95fa7"`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" DROP CONSTRAINT "FK_66d2bd2ee31d14bcc23069a89f8"`, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_5b87d9d19127bd5d92026017a7b"`, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_52ccc804d7c69037d558bac4c96"`, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5"`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP CONSTRAINT "FK_9949557d0e1b2c19e5344c171e9"`, + ); + await queryRunner.query( + `ALTER TABLE "app" DROP CONSTRAINT "FK_3f5b0899ef90527a3462d7c2cb3"`, + ); + await queryRunner.query( + `ALTER TABLE "user" DROP CONSTRAINT "FK_afc64b53f8db3707ceb34eb28e2"`, + ); + await queryRunner.query( + `ALTER TABLE "user" DROP CONSTRAINT "FK_58f5c71eaab331645112cf8cfa5"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP CONSTRAINT "FK_bb90d1956dafc4068c28aa7560a"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" DROP CONSTRAINT "FK_00ceffb0cdc238b3233294f08f2"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" DROP CONSTRAINT "FK_f4fc06e49c0171c85f1c48060d2"`, + ); + await queryRunner.query(`DROP TABLE "__chart__users"`); + await queryRunner.query(`DROP TYPE "__chart__users_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__test"`); + await queryRunner.query(`DROP TYPE "__chart__test_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__test_unique"`); + await queryRunner.query(`DROP TYPE "__chart__test_unique_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__test_grouped"`); + await queryRunner.query(`DROP TYPE "__chart__test_grouped_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__per_user_reaction"`); + await queryRunner.query(`DROP TYPE "__chart__per_user_reaction_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__per_user_notes"`); + await queryRunner.query(`DROP TYPE "__chart__per_user_notes_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__per_user_following"`); + await queryRunner.query( + `DROP TYPE "__chart__per_user_following_span_enum"`, + ); + await queryRunner.query(`DROP TABLE "__chart__per_user_drive"`); + await queryRunner.query(`DROP TYPE "__chart__per_user_drive_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__notes"`); + await queryRunner.query(`DROP TYPE "__chart__notes_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__network"`); + await queryRunner.query(`DROP TYPE "__chart__network_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__instance"`); + await queryRunner.query(`DROP TYPE "__chart__instance_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__hashtag"`); + await queryRunner.query(`DROP TYPE "__chart__hashtag_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__federation"`); + await queryRunner.query(`DROP TYPE "__chart__federation_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__drive"`); + await queryRunner.query(`DROP TYPE "__chart__drive_span_enum"`); + await queryRunner.query(`DROP TABLE "__chart__active_users"`); + await queryRunner.query(`DROP TYPE "__chart__active_users_span_enum"`); + await queryRunner.query(`DROP INDEX "IDX_dce530b98e454793dac5ec2f5a"`); + await queryRunner.query(`DROP TABLE "user_profile"`); + await queryRunner.query(`DROP INDEX "IDX_171e64971c780ebd23fae140bb"`); + await queryRunner.query(`DROP TABLE "user_publickey"`); + await queryRunner.query(`DROP TABLE "user_keypair"`); + await queryRunner.query(`DROP INDEX "IDX_7fa20a12319c7f6dc3aed98c0a"`); + await queryRunner.query(`DROP INDEX "IDX_0610ebcfcfb4a18441a9bcdab2"`); + await queryRunner.query(`DROP TABLE "poll"`); + await queryRunner.query(`DROP TYPE "poll_notevisibility_enum"`); + await queryRunner.query(`DROP INDEX "IDX_410cd649884b501c02d6e72738"`); + await queryRunner.query(`DROP INDEX "IDX_bfbc6f79ba4007b4ce5097f08d"`); + await queryRunner.query(`DROP TABLE "user_note_pining"`); + await queryRunner.query(`DROP INDEX "IDX_e247b23a3c9b45f89ec1299d06"`); + await queryRunner.query(`DROP INDEX "IDX_3b25402709dd9882048c2bbade"`); + await queryRunner.query(`DROP INDEX "IDX_b604d92d6c7aec38627f6eaf16"`); + await queryRunner.query(`DROP TABLE "reversi_matching"`); + await queryRunner.query(`DROP INDEX "IDX_b46ec40746efceac604142be1c"`); + await queryRunner.query(`DROP TABLE "reversi_game"`); + await queryRunner.query(`DROP INDEX "IDX_4f4d35e1256c84ae3d1f0eab10"`); + await queryRunner.query(`DROP INDEX "IDX_5900e907bb46516ddf2871327c"`); + await queryRunner.query(`DROP INDEX "IDX_b37dafc86e9af007e3295c2781"`); + await queryRunner.query(`DROP TABLE "emoji"`); + await queryRunner.query(`DROP INDEX "IDX_d54a512b822fac7ed52800f6b4"`); + await queryRunner.query(`DROP INDEX "IDX_a7fd92dd6dc519e6fb435dd108"`); + await queryRunner.query(`DROP INDEX "IDX_12c01c0d1a79f77d9f6c15fadd"`); + await queryRunner.query(`DROP TABLE "follow_request"`); + await queryRunner.query(`DROP INDEX "IDX_62cb09e1129f6ec024ef66e183"`); + await queryRunner.query(`DROP TABLE "auth_session"`); + await queryRunner.query(`DROP INDEX "IDX_2c308dbdc50d94dc625670055f"`); + await queryRunner.query(`DROP TABLE "signin"`); + await queryRunner.query(`DROP INDEX "IDX_cac14a4e3944454a5ce7daa514"`); + await queryRunner.query(`DROP INDEX "IDX_5377c307783fce2b6d352e1203"`); + await queryRunner.query(`DROP INDEX "IDX_e21cd3646e52ef9c94aaf17c2e"`); + await queryRunner.query(`DROP TABLE "messaging_message"`); + await queryRunner.query(`DROP INDEX "IDX_0ff69e8dfa9fe31bb4a4660f59"`); + await queryRunner.query(`DROP TABLE "registration_ticket"`); + await queryRunner.query(`DROP INDEX "IDX_5cd442c3b2e74fdd99dae20243"`); + await queryRunner.query(`DROP INDEX "IDX_04cc96756f89d0b7f9473e8cdf"`); + await queryRunner.query(`DROP INDEX "IDX_d049123c413e68ca52abe73420"`); + await queryRunner.query(`DROP INDEX "IDX_db2098070b2b5a523c58181f74"`); + await queryRunner.query(`DROP TABLE "abuse_user_report"`); + await queryRunner.query(`DROP INDEX "IDX_0f4fb9ad355f3effff221ef245"`); + await queryRunner.query(`DROP INDEX "IDX_47f4b1892f5d6ba8efb3057d81"`); + await queryRunner.query(`DROP TABLE "note_favorite"`); + await queryRunner.query(`DROP INDEX "IDX_0b03cbcd7e6a7ce068efa8ecc2"`); + await queryRunner.query(`DROP INDEX "IDX_0c44bf4f680964145f2a68a341"`); + await queryRunner.query(`DROP INDEX "IDX_d57f9030cd3af7f63ffb1c267c"`); + await queryRunner.query(`DROP INDEX "IDX_4c02d38a976c3ae132228c6fce"`); + await queryRunner.query(`DROP INDEX "IDX_0e206cec573f1edff4a3062923"`); + await queryRunner.query(`DROP INDEX "IDX_2710a55f826ee236ea1a62698f"`); + await queryRunner.query(`DROP INDEX "IDX_347fec870eafea7b26c8a73bac"`); + await queryRunner.query(`DROP TABLE "hashtag"`); + await queryRunner.query(`DROP INDEX "IDX_605472305f26818cc93d1baaa7"`); + await queryRunner.query(`DROP INDEX "IDX_d844bfc6f3f523a05189076efa"`); + await queryRunner.query(`DROP TABLE "user_list_joining"`); + await queryRunner.query(`DROP INDEX "IDX_b7fcefbdd1c18dce86687531f9"`); + await queryRunner.query(`DROP TABLE "user_list"`); + await queryRunner.query(`DROP INDEX "IDX_98a1bc5cb30dfd159de056549f"`); + await queryRunner.query(`DROP INDEX "IDX_0627125f1a8a42c9a1929edb55"`); + await queryRunner.query(`DROP INDEX "IDX_2cd4a2743a99671308f5417759"`); + await queryRunner.query(`DROP INDEX "IDX_b9a354f7941c1e779f3b33aea6"`); + await queryRunner.query(`DROP TABLE "blocking"`); + await queryRunner.query(`DROP INDEX "IDX_97754ca6f2baff9b4abb7f853d"`); + await queryRunner.query(`DROP TABLE "sw_subscription"`); + await queryRunner.query(`DROP INDEX "IDX_1eb9d9824a630321a29fd3b290"`); + await queryRunner.query(`DROP INDEX "IDX_93060675b4a79a577f31d260c6"`); + await queryRunner.query(`DROP INDEX "IDX_ec96b4fed9dae517e0dbbe0675"`); + await queryRunner.query(`DROP INDEX "IDX_f86d57fbca33c7a4e6897490cc"`); + await queryRunner.query(`DROP TABLE "muting"`); + await queryRunner.query(`DROP INDEX "IDX_8d5afc98982185799b160e10eb"`); + await queryRunner.query(`DROP INDEX "IDX_2cd3b2a6b4cf0b910b260afe08"`); + await queryRunner.query(`DROP TABLE "instance"`); + await queryRunner.query(`DROP INDEX "IDX_307be5f1d1252e0388662acb96"`); + await queryRunner.query(`DROP INDEX "IDX_6516c5a6f3c015b4eed39978be"`); + await queryRunner.query(`DROP INDEX "IDX_24e0042143a18157b234df186c"`); + await queryRunner.query(`DROP INDEX "IDX_582f8fab771a9040a12961f3e7"`); + await queryRunner.query(`DROP TABLE "following"`); + await queryRunner.query(`DROP TABLE "meta"`); + await queryRunner.query(`DROP INDEX "IDX_3c601b70a1066d2c8b517094cb"`); + await queryRunner.query(`DROP INDEX "IDX_b11a5e627c41d4dc3170f1d370"`); + await queryRunner.query(`DROP TABLE "notification"`); + await queryRunner.query(`DROP INDEX "IDX_d908433a4953cc13216cd9c274"`); + await queryRunner.query(`DROP INDEX "IDX_e637cba4dc4410218c4251260e"`); + await queryRunner.query(`DROP INDEX "IDX_56b0166d34ddae49d8ef7610bb"`); + await queryRunner.query(`DROP TABLE "note_unread"`); + await queryRunner.query(`DROP INDEX "IDX_a42c93c69989ce1d09959df4cf"`); + await queryRunner.query(`DROP INDEX "IDX_44499765eec6b5489d72c4253b"`); + await queryRunner.query(`DROP INDEX "IDX_03e7028ab8388a3f5e3ce2a861"`); + await queryRunner.query(`DROP INDEX "IDX_b0134ec406e8d09a540f818288"`); + await queryRunner.query(`DROP INDEX "IDX_318cdf42a9cfc11f479bd802bb"`); + await queryRunner.query(`DROP TABLE "note_watching"`); + await queryRunner.query(`DROP INDEX "IDX_ad0c221b25672daf2df320a817"`); + await queryRunner.query(`DROP INDEX "IDX_45145e4953780f3cd5656f0ea6"`); + await queryRunner.query(`DROP INDEX "IDX_13761f64257f40c5636d0ff95e"`); + await queryRunner.query(`DROP INDEX "IDX_01f4581f114e0ebd2bbb876f0b"`); + await queryRunner.query(`DROP TABLE "note_reaction"`); + await queryRunner.query(`DROP INDEX "IDX_50bd7164c5b78f1f4a42c4d21f"`); + await queryRunner.query(`DROP INDEX "IDX_aecfbd5ef60374918e63ee95fa"`); + await queryRunner.query(`DROP INDEX "IDX_66d2bd2ee31d14bcc23069a89f"`); + await queryRunner.query(`DROP INDEX "IDX_0fb627e1c2f753262a74f0562d"`); + await queryRunner.query(`DROP TABLE "poll_vote"`); + await queryRunner.query(`DROP INDEX "IDX_7125a826ab192eb27e11d358a5"`); + await queryRunner.query(`DROP INDEX "IDX_88937d94d7443d9a99a76fa5c0"`); + await queryRunner.query(`DROP INDEX "IDX_54ebcb6d27222913b908d56fd8"`); + await queryRunner.query(`DROP INDEX "IDX_796a8c03959361f97dc2be1d5c"`); + await queryRunner.query(`DROP INDEX "IDX_25dfc71b0369b003a4cd434d0b"`); + await queryRunner.query(`DROP INDEX "IDX_51c063b6a133a9cb87145450f5"`); + await queryRunner.query(`DROP INDEX "IDX_153536c67d05e9adb24e99fc2b"`); + await queryRunner.query(`DROP INDEX "IDX_5b87d9d19127bd5d92026017a7"`); + await queryRunner.query(`DROP INDEX "IDX_52ccc804d7c69037d558bac4c9"`); + await queryRunner.query(`DROP INDEX "IDX_17cb3553c700a4985dff5a30ff"`); + await queryRunner.query(`DROP INDEX "IDX_e7c0567f5261063592f022e9b5"`); + await queryRunner.query(`DROP TABLE "note"`); + await queryRunner.query(`DROP TYPE "note_visibility_enum"`); + await queryRunner.query(`DROP INDEX "IDX_9949557d0e1b2c19e5344c171e"`); + await queryRunner.query(`DROP INDEX "IDX_64c327441248bae40f7d92f34f"`); + await queryRunner.query(`DROP INDEX "IDX_70ba8f6af34bc924fc9e12adb8"`); + await queryRunner.query(`DROP TABLE "access_token"`); + await queryRunner.query(`DROP INDEX "IDX_f49922d511d666848f250663c4"`); + await queryRunner.query(`DROP INDEX "IDX_3f5b0899ef90527a3462d7c2cb"`); + await queryRunner.query(`DROP INDEX "IDX_048a757923ed8b157e9895da53"`); + await queryRunner.query(`DROP TABLE "app"`); + await queryRunner.query(`DROP INDEX "IDX_5deb01ae162d1d70b80d064c27"`); + await queryRunner.query(`DROP INDEX "IDX_a854e557b1b14814750c7c7b0c"`); + await queryRunner.query(`DROP INDEX "IDX_be623adaa4c566baf5d29ce0c8"`); + await queryRunner.query(`DROP INDEX "IDX_3252a5df8d5bbd16b281f7799e"`); + await queryRunner.query(`DROP INDEX "IDX_fa99d777623947a5b05f394cae"`); + await queryRunner.query(`DROP INDEX "IDX_a27b942a0d6dcff90e3ee9b5e8"`); + await queryRunner.query(`DROP INDEX "IDX_80ca6e6ef65fb9ef34ea8c90f4"`); + await queryRunner.query(`DROP INDEX "IDX_e11e649824a45d8ed01d597fd9"`); + await queryRunner.query(`DROP TABLE "user"`); + await queryRunner.query(`DROP INDEX "IDX_bb90d1956dafc4068c28aa7560"`); + await queryRunner.query(`DROP INDEX "IDX_e5848eac4940934e23dbc17581"`); + await queryRunner.query(`DROP INDEX "IDX_c55b2b7c284d9fef98026fc88e"`); + await queryRunner.query(`DROP INDEX "IDX_e74022ce9a074b3866f70e0d27"`); + await queryRunner.query(`DROP INDEX "IDX_d85a184c2540d2deba33daf642"`); + await queryRunner.query(`DROP INDEX "IDX_a40b8df8c989d7db937ea27cf6"`); + await queryRunner.query(`DROP INDEX "IDX_37bb9a1b4585f8a3beb24c62d6"`); + await queryRunner.query(`DROP INDEX "IDX_92779627994ac79277f070c91e"`); + await queryRunner.query(`DROP INDEX "IDX_860fa6f6c7df5bb887249fba22"`); + await queryRunner.query(`DROP INDEX "IDX_c8dfad3b72196dd1d6b5db168a"`); + await queryRunner.query(`DROP TABLE "drive_file"`); + await queryRunner.query(`DROP INDEX "IDX_00ceffb0cdc238b3233294f08f"`); + await queryRunner.query(`DROP INDEX "IDX_f4fc06e49c0171c85f1c48060d"`); + await queryRunner.query(`DROP INDEX "IDX_02878d441ceae15ce060b73daf"`); + await queryRunner.query(`DROP TABLE "drive_folder"`); + await queryRunner.query(`DROP INDEX "IDX_584b536b49e53ac81beb39a177"`); + await queryRunner.query(`DROP INDEX "IDX_8cb40cfc8f3c28261e6f887b03"`); + await queryRunner.query(`DROP INDEX "IDX_8e4eb51a35d81b64dda28eed0a"`); + await queryRunner.query(`DROP TABLE "log"`); + await queryRunner.query(`DROP TYPE "log_level_enum"`); + } } diff --git a/packages/backend/migration/1556348509290-Pages.js b/packages/backend/migration/1556348509290-Pages.js index 50caa2ce91..696b2acbec 100644 --- a/packages/backend/migration/1556348509290-Pages.js +++ b/packages/backend/migration/1556348509290-Pages.js @@ -1,28 +1,50 @@ - - export class Pages1556348509290 { - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "page_visibility_enum" AS ENUM('public', 'followers', 'specified')`); - await queryRunner.query(`CREATE TABLE "page" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "name" character varying(256) NOT NULL, "summary" character varying(256), "alignCenter" boolean NOT NULL, "font" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "eyeCatchingImageId" character varying(32), "content" jsonb NOT NULL DEFAULT '[]', "variables" jsonb NOT NULL DEFAULT '[]', "visibility" "page_visibility_enum" NOT NULL, "visibleUserIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_742f4117e065c5b6ad21b37ba1f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_fbb4297c927a9b85e9cefa2eb1" ON "page" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_af639b066dfbca78b01a920f8a" ON "page" ("updatedAt") `); - await queryRunner.query(`CREATE INDEX "IDX_b82c19c08afb292de4600d99e4" ON "page" ("name") `); - await queryRunner.query(`CREATE INDEX "IDX_ae1d917992dd0c9d9bbdad06c4" ON "page" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_90148bbc2bf0854428786bfc15" ON "page" ("visibleUserIds") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_2133ef8317e4bdb839c0dcbf13" ON "page" ("userId", "name") `); - await queryRunner.query(`ALTER TABLE "page" ADD CONSTRAINT "FK_ae1d917992dd0c9d9bbdad06c4a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "page" ADD CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" FOREIGN KEY ("eyeCatchingImageId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" DROP CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10"`); - await queryRunner.query(`ALTER TABLE "page" DROP CONSTRAINT "FK_ae1d917992dd0c9d9bbdad06c4a"`); - await queryRunner.query(`DROP INDEX "IDX_2133ef8317e4bdb839c0dcbf13"`); - await queryRunner.query(`DROP INDEX "IDX_90148bbc2bf0854428786bfc15"`); - await queryRunner.query(`DROP INDEX "IDX_ae1d917992dd0c9d9bbdad06c4"`); - await queryRunner.query(`DROP INDEX "IDX_b82c19c08afb292de4600d99e4"`); - await queryRunner.query(`DROP INDEX "IDX_af639b066dfbca78b01a920f8a"`); - await queryRunner.query(`DROP INDEX "IDX_fbb4297c927a9b85e9cefa2eb1"`); - await queryRunner.query(`DROP TABLE "page"`); - await queryRunner.query(`DROP TYPE "page_visibility_enum"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "page_visibility_enum" AS ENUM('public', 'followers', 'specified')`, + ); + await queryRunner.query( + `CREATE TABLE "page" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "name" character varying(256) NOT NULL, "summary" character varying(256), "alignCenter" boolean NOT NULL, "font" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "eyeCatchingImageId" character varying(32), "content" jsonb NOT NULL DEFAULT '[]', "variables" jsonb NOT NULL DEFAULT '[]', "visibility" "page_visibility_enum" NOT NULL, "visibleUserIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_742f4117e065c5b6ad21b37ba1f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fbb4297c927a9b85e9cefa2eb1" ON "page" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_af639b066dfbca78b01a920f8a" ON "page" ("updatedAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b82c19c08afb292de4600d99e4" ON "page" ("name") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ae1d917992dd0c9d9bbdad06c4" ON "page" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_90148bbc2bf0854428786bfc15" ON "page" ("visibleUserIds") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_2133ef8317e4bdb839c0dcbf13" ON "page" ("userId", "name") `, + ); + await queryRunner.query( + `ALTER TABLE "page" ADD CONSTRAINT "FK_ae1d917992dd0c9d9bbdad06c4a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "page" ADD CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" FOREIGN KEY ("eyeCatchingImageId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page" DROP CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10"`, + ); + await queryRunner.query( + `ALTER TABLE "page" DROP CONSTRAINT "FK_ae1d917992dd0c9d9bbdad06c4a"`, + ); + await queryRunner.query(`DROP INDEX "IDX_2133ef8317e4bdb839c0dcbf13"`); + await queryRunner.query(`DROP INDEX "IDX_90148bbc2bf0854428786bfc15"`); + await queryRunner.query(`DROP INDEX "IDX_ae1d917992dd0c9d9bbdad06c4"`); + await queryRunner.query(`DROP INDEX "IDX_b82c19c08afb292de4600d99e4"`); + await queryRunner.query(`DROP INDEX "IDX_af639b066dfbca78b01a920f8a"`); + await queryRunner.query(`DROP INDEX "IDX_fbb4297c927a9b85e9cefa2eb1"`); + await queryRunner.query(`DROP TABLE "page"`); + await queryRunner.query(`DROP TYPE "page_visibility_enum"`); + } } diff --git a/packages/backend/migration/1556746559567-UserProfile.js b/packages/backend/migration/1556746559567-UserProfile.js index 50a9d1a8be..d229ec519f 100644 --- a/packages/backend/migration/1556746559567-UserProfile.js +++ b/packages/backend/migration/1556746559567-UserProfile.js @@ -1,13 +1,21 @@ - - export class UserProfile1556746559567 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE VARCHAR(64) USING "githubId"::VARCHAR(64)`); - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE VARCHAR(64) USING "discordExpiresDate"::VARCHAR(64)`); - } - async down(queryRunner) { - await queryRunner.query(`UPDATE "user_profile" SET github = FALSE, discord = FALSE`); - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE INTEGER USING NULL`); - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE INTEGER USING NULL`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE VARCHAR(64) USING "githubId"::VARCHAR(64)`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE VARCHAR(64) USING "discordExpiresDate"::VARCHAR(64)`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `UPDATE "user_profile" SET github = FALSE, discord = FALSE`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "githubId" TYPE INTEGER USING NULL`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "discordExpiresDate" TYPE INTEGER USING NULL`, + ); + } } diff --git a/packages/backend/migration/1557476068003-PinnedUsers.js b/packages/backend/migration/1557476068003-PinnedUsers.js index d9cce25435..6f348836ad 100644 --- a/packages/backend/migration/1557476068003-PinnedUsers.js +++ b/packages/backend/migration/1557476068003-PinnedUsers.js @@ -1,10 +1,10 @@ - - export class PinnedUsers1557476068003 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "pinnedUsers" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedUsers"`); + } } diff --git a/packages/backend/migration/1557761316509-AddSomeUrls.js b/packages/backend/migration/1557761316509-AddSomeUrls.js index ab8736f7cc..0734e14e90 100644 --- a/packages/backend/migration/1557761316509-AddSomeUrls.js +++ b/packages/backend/migration/1557761316509-AddSomeUrls.js @@ -1,14 +1,18 @@ - - export class AddSomeUrls1557761316509 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "ToSUrl" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "repositoryUrl" character varying(512) NOT NULL DEFAULT 'https://github.com/misskey-dev/misskey'`); - await queryRunner.query(`ALTER TABLE "meta" ADD "feedbackUrl" character varying(512) DEFAULT 'https://github.com/misskey-dev/misskey/issues/new'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "feedbackUrl"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "repositoryUrl"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "ToSUrl"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "ToSUrl" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "repositoryUrl" character varying(512) NOT NULL DEFAULT 'https://github.com/misskey-dev/misskey'`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "feedbackUrl" character varying(512) DEFAULT 'https://github.com/misskey-dev/misskey/issues/new'`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "feedbackUrl"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "repositoryUrl"`); + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "ToSUrl"`); + } } diff --git a/packages/backend/migration/1557932705754-ObjectStorageSetting.js b/packages/backend/migration/1557932705754-ObjectStorageSetting.js index 19a0b9d5cd..5fcc98fe15 100644 --- a/packages/backend/migration/1557932705754-ObjectStorageSetting.js +++ b/packages/backend/migration/1557932705754-ObjectStorageSetting.js @@ -1,28 +1,66 @@ - - export class ObjectStorageSetting1557932705754 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "useObjectStorage" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageBucket" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStoragePrefix" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageBaseUrl" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageEndpoint" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageRegion" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageAccessKey" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageSecretKey" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStoragePort" integer`); - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageUseSSL" boolean NOT NULL DEFAULT true`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageUseSSL"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStoragePort"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageSecretKey"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageAccessKey"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageRegion"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageEndpoint"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageBaseUrl"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStoragePrefix"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageBucket"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "useObjectStorage"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "useObjectStorage" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageBucket" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStoragePrefix" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageBaseUrl" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageEndpoint" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageRegion" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageAccessKey" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageSecretKey" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStoragePort" integer`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageUseSSL" boolean NOT NULL DEFAULT true`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageUseSSL"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStoragePort"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageSecretKey"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageAccessKey"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageRegion"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageEndpoint"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageBaseUrl"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStoragePrefix"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageBucket"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "useObjectStorage"`, + ); + } } diff --git a/packages/backend/migration/1558072954435-PageLike.js b/packages/backend/migration/1558072954435-PageLike.js index 31b08418a9..e919e02ddb 100644 --- a/packages/backend/migration/1558072954435-PageLike.js +++ b/packages/backend/migration/1558072954435-PageLike.js @@ -1,20 +1,34 @@ - - export class PageLike1558072954435 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "page_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "pageId" character varying(32) NOT NULL, CONSTRAINT "PK_813f034843af992d3ae0f43c64c" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_0e61efab7f88dbb79c9166dbb4" ON "page_like" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_4ce6fb9c70529b4c8ac46c9bfa" ON "page_like" ("userId", "pageId") `); - await queryRunner.query(`ALTER TABLE "page" ADD "likedCount" integer NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "page_like" ADD CONSTRAINT "FK_0e61efab7f88dbb79c9166dbb48" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "page_like" ADD CONSTRAINT "FK_cf8782626dced3176038176a847" FOREIGN KEY ("pageId") REFERENCES "page"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "page_like" DROP CONSTRAINT "FK_cf8782626dced3176038176a847"`); - await queryRunner.query(`ALTER TABLE "page_like" DROP CONSTRAINT "FK_0e61efab7f88dbb79c9166dbb48"`); - await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "likedCount"`); - await queryRunner.query(`DROP INDEX "IDX_4ce6fb9c70529b4c8ac46c9bfa"`); - await queryRunner.query(`DROP INDEX "IDX_0e61efab7f88dbb79c9166dbb4"`); - await queryRunner.query(`DROP TABLE "page_like"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "page_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "pageId" character varying(32) NOT NULL, CONSTRAINT "PK_813f034843af992d3ae0f43c64c" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0e61efab7f88dbb79c9166dbb4" ON "page_like" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_4ce6fb9c70529b4c8ac46c9bfa" ON "page_like" ("userId", "pageId") `, + ); + await queryRunner.query( + `ALTER TABLE "page" ADD "likedCount" integer NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "page_like" ADD CONSTRAINT "FK_0e61efab7f88dbb79c9166dbb48" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "page_like" ADD CONSTRAINT "FK_cf8782626dced3176038176a847" FOREIGN KEY ("pageId") REFERENCES "page"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page_like" DROP CONSTRAINT "FK_cf8782626dced3176038176a847"`, + ); + await queryRunner.query( + `ALTER TABLE "page_like" DROP CONSTRAINT "FK_0e61efab7f88dbb79c9166dbb48"`, + ); + await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "likedCount"`); + await queryRunner.query(`DROP INDEX "IDX_4ce6fb9c70529b4c8ac46c9bfa"`); + await queryRunner.query(`DROP INDEX "IDX_0e61efab7f88dbb79c9166dbb4"`); + await queryRunner.query(`DROP TABLE "page_like"`); + } } diff --git a/packages/backend/migration/1558103093633-UserGroup.js b/packages/backend/migration/1558103093633-UserGroup.js index b670b31c3d..dc581a24ef 100644 --- a/packages/backend/migration/1558103093633-UserGroup.js +++ b/packages/backend/migration/1558103093633-UserGroup.js @@ -1,38 +1,82 @@ - - export class UserGroup1558103093633 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "user_group" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, "isPrivate" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_3c29fba6fe013ec8724378ce7c9" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_20e30aa35180e317e133d75316" ON "user_group" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_3d6b372788ab01be58853003c9" ON "user_group" ("userId") `); - await queryRunner.query(`CREATE TABLE "user_group_joining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_15f2425885253c5507e1599cfe7" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_f3a1b4bd0c7cabba958a0c0b23" ON "user_group_joining" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_67dc758bc0566985d1b3d39986" ON "user_group_joining" ("userGroupId") `); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD "groupId" character varying(32)`); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD "reads" character varying(32) array NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "messaging_message" ALTER COLUMN "recipientId" DROP NOT NULL`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."recipientId" IS 'The recipient user ID.'`); - await queryRunner.query(`CREATE INDEX "IDX_2c4be03b446884f9e9c502135b" ON "messaging_message" ("groupId") `); - await queryRunner.query(`ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_2c4be03b446884f9e9c502135be" FOREIGN KEY ("groupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_group" ADD CONSTRAINT "FK_3d6b372788ab01be58853003c93" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_f3a1b4bd0c7cabba958a0c0b231" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_67dc758bc0566985d1b3d399865" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_67dc758bc0566985d1b3d399865"`); - await queryRunner.query(`ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_f3a1b4bd0c7cabba958a0c0b231"`); - await queryRunner.query(`ALTER TABLE "user_group" DROP CONSTRAINT "FK_3d6b372788ab01be58853003c93"`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_2c4be03b446884f9e9c502135be"`); - await queryRunner.query(`DROP INDEX "IDX_2c4be03b446884f9e9c502135b"`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."recipientId" IS ''`); - await queryRunner.query(`ALTER TABLE "messaging_message" ALTER COLUMN "recipientId" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP COLUMN "reads"`); - await queryRunner.query(`ALTER TABLE "messaging_message" DROP COLUMN "groupId"`); - await queryRunner.query(`DROP INDEX "IDX_67dc758bc0566985d1b3d39986"`); - await queryRunner.query(`DROP INDEX "IDX_f3a1b4bd0c7cabba958a0c0b23"`); - await queryRunner.query(`DROP TABLE "user_group_joining"`); - await queryRunner.query(`DROP INDEX "IDX_3d6b372788ab01be58853003c9"`); - await queryRunner.query(`DROP INDEX "IDX_20e30aa35180e317e133d75316"`); - await queryRunner.query(`DROP TABLE "user_group"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "user_group" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, "isPrivate" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_3c29fba6fe013ec8724378ce7c9" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_20e30aa35180e317e133d75316" ON "user_group" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3d6b372788ab01be58853003c9" ON "user_group" ("userId") `, + ); + await queryRunner.query( + `CREATE TABLE "user_group_joining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_15f2425885253c5507e1599cfe7" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f3a1b4bd0c7cabba958a0c0b23" ON "user_group_joining" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_67dc758bc0566985d1b3d39986" ON "user_group_joining" ("userGroupId") `, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD "groupId" character varying(32)`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD "reads" character varying(32) array NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ALTER COLUMN "recipientId" DROP NOT NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."recipientId" IS 'The recipient user ID.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2c4be03b446884f9e9c502135b" ON "messaging_message" ("groupId") `, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_2c4be03b446884f9e9c502135be" FOREIGN KEY ("groupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_group" ADD CONSTRAINT "FK_3d6b372788ab01be58853003c93" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_f3a1b4bd0c7cabba958a0c0b231" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_joining" ADD CONSTRAINT "FK_67dc758bc0566985d1b3d399865" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_67dc758bc0566985d1b3d399865"`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_joining" DROP CONSTRAINT "FK_f3a1b4bd0c7cabba958a0c0b231"`, + ); + await queryRunner.query( + `ALTER TABLE "user_group" DROP CONSTRAINT "FK_3d6b372788ab01be58853003c93"`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_2c4be03b446884f9e9c502135be"`, + ); + await queryRunner.query(`DROP INDEX "IDX_2c4be03b446884f9e9c502135b"`); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."recipientId" IS ''`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ALTER COLUMN "recipientId" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP COLUMN "reads"`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP COLUMN "groupId"`, + ); + await queryRunner.query(`DROP INDEX "IDX_67dc758bc0566985d1b3d39986"`); + await queryRunner.query(`DROP INDEX "IDX_f3a1b4bd0c7cabba958a0c0b23"`); + await queryRunner.query(`DROP TABLE "user_group_joining"`); + await queryRunner.query(`DROP INDEX "IDX_3d6b372788ab01be58853003c9"`); + await queryRunner.query(`DROP INDEX "IDX_20e30aa35180e317e133d75316"`); + await queryRunner.query(`DROP TABLE "user_group"`); + } } diff --git a/packages/backend/migration/1558257926829-UserGroupInvite.js b/packages/backend/migration/1558257926829-UserGroupInvite.js index e48bd3a7ff..ed137fdb2e 100644 --- a/packages/backend/migration/1558257926829-UserGroupInvite.js +++ b/packages/backend/migration/1558257926829-UserGroupInvite.js @@ -1,22 +1,38 @@ - - export class UserGroupInvite1558257926829 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "user_group_invite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_3893884af0d3a5f4d01e7921a97" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_1039988afa3bf991185b277fe0" ON "user_group_invite" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_e10924607d058004304611a436" ON "user_group_invite" ("userGroupId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_78787741f9010886796f2320a4" ON "user_group_invite" ("userId", "userGroupId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d9ecaed8c6dc43f3592c229282" ON "user_group_joining" ("userId", "userGroupId") `); - await queryRunner.query(`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_1039988afa3bf991185b277fe03" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_e10924607d058004304611a436a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_e10924607d058004304611a436a"`); - await queryRunner.query(`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_1039988afa3bf991185b277fe03"`); - await queryRunner.query(`DROP INDEX "IDX_d9ecaed8c6dc43f3592c229282"`); - await queryRunner.query(`DROP INDEX "IDX_78787741f9010886796f2320a4"`); - await queryRunner.query(`DROP INDEX "IDX_e10924607d058004304611a436"`); - await queryRunner.query(`DROP INDEX "IDX_1039988afa3bf991185b277fe0"`); - await queryRunner.query(`DROP TABLE "user_group_invite"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "user_group_invite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_3893884af0d3a5f4d01e7921a97" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_1039988afa3bf991185b277fe0" ON "user_group_invite" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e10924607d058004304611a436" ON "user_group_invite" ("userGroupId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_78787741f9010886796f2320a4" ON "user_group_invite" ("userId", "userGroupId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d9ecaed8c6dc43f3592c229282" ON "user_group_joining" ("userId", "userGroupId") `, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_1039988afa3bf991185b277fe03" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_e10924607d058004304611a436a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_e10924607d058004304611a436a"`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_1039988afa3bf991185b277fe03"`, + ); + await queryRunner.query(`DROP INDEX "IDX_d9ecaed8c6dc43f3592c229282"`); + await queryRunner.query(`DROP INDEX "IDX_78787741f9010886796f2320a4"`); + await queryRunner.query(`DROP INDEX "IDX_e10924607d058004304611a436"`); + await queryRunner.query(`DROP INDEX "IDX_1039988afa3bf991185b277fe0"`); + await queryRunner.query(`DROP TABLE "user_group_invite"`); + } } diff --git a/packages/backend/migration/1558266512381-UserListJoining.js b/packages/backend/migration/1558266512381-UserListJoining.js index 3398aed139..3597e51f76 100644 --- a/packages/backend/migration/1558266512381-UserListJoining.js +++ b/packages/backend/migration/1558266512381-UserListJoining.js @@ -1,10 +1,10 @@ - - export class UserListJoining1558266512381 { - async up(queryRunner) { - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_90f7da835e4c10aca6853621e1" ON "user_list_joining" ("userId", "userListId") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_90f7da835e4c10aca6853621e1"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_90f7da835e4c10aca6853621e1" ON "user_list_joining" ("userId", "userListId") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_90f7da835e4c10aca6853621e1"`); + } } diff --git a/packages/backend/migration/1561706992953-webauthn.js b/packages/backend/migration/1561706992953-webauthn.js index b007ffef14..f860d2c11b 100644 --- a/packages/backend/migration/1561706992953-webauthn.js +++ b/packages/backend/migration/1561706992953-webauthn.js @@ -1,26 +1,48 @@ - - export class webauthn1561706992953 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "attestation_challenge" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "challenge" character varying(64) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "registrationChallenge" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_d0ba6786e093f1bcb497572a6b5" PRIMARY KEY ("id", "userId"))`); - await queryRunner.query(`CREATE INDEX "IDX_f1a461a618fa1755692d0e0d59" ON "attestation_challenge" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_47efb914aed1f72dd39a306c7b" ON "attestation_challenge" ("challenge") `); - await queryRunner.query(`CREATE TABLE "user_security_key" ("id" character varying NOT NULL, "userId" character varying(32) NOT NULL, "publicKey" character varying NOT NULL, "lastUsed" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(30) NOT NULL, CONSTRAINT "PK_3e508571121ab39c5f85d10c166" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_ff9ca3b5f3ee3d0681367a9b44" ON "user_security_key" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_0d7718e562dcedd0aa5cf2c9f7" ON "user_security_key" ("publicKey") `); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "securityKeysAvailable" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "attestation_challenge" ADD CONSTRAINT "FK_f1a461a618fa1755692d0e0d592" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "user_security_key" ADD CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_security_key" DROP CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447"`); - await queryRunner.query(`ALTER TABLE "attestation_challenge" DROP CONSTRAINT "FK_f1a461a618fa1755692d0e0d592"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "securityKeysAvailable"`); - await queryRunner.query(`DROP INDEX "IDX_0d7718e562dcedd0aa5cf2c9f7"`); - await queryRunner.query(`DROP INDEX "IDX_ff9ca3b5f3ee3d0681367a9b44"`); - await queryRunner.query(`DROP TABLE "user_security_key"`); - await queryRunner.query(`DROP INDEX "IDX_47efb914aed1f72dd39a306c7b"`); - await queryRunner.query(`DROP INDEX "IDX_f1a461a618fa1755692d0e0d59"`); - await queryRunner.query(`DROP TABLE "attestation_challenge"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "attestation_challenge" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "challenge" character varying(64) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "registrationChallenge" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_d0ba6786e093f1bcb497572a6b5" PRIMARY KEY ("id", "userId"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f1a461a618fa1755692d0e0d59" ON "attestation_challenge" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_47efb914aed1f72dd39a306c7b" ON "attestation_challenge" ("challenge") `, + ); + await queryRunner.query( + `CREATE TABLE "user_security_key" ("id" character varying NOT NULL, "userId" character varying(32) NOT NULL, "publicKey" character varying NOT NULL, "lastUsed" TIMESTAMP WITH TIME ZONE NOT NULL, "name" character varying(30) NOT NULL, CONSTRAINT "PK_3e508571121ab39c5f85d10c166" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ff9ca3b5f3ee3d0681367a9b44" ON "user_security_key" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0d7718e562dcedd0aa5cf2c9f7" ON "user_security_key" ("publicKey") `, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "securityKeysAvailable" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "attestation_challenge" ADD CONSTRAINT "FK_f1a461a618fa1755692d0e0d592" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "user_security_key" ADD CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_security_key" DROP CONSTRAINT "FK_ff9ca3b5f3ee3d0681367a9b447"`, + ); + await queryRunner.query( + `ALTER TABLE "attestation_challenge" DROP CONSTRAINT "FK_f1a461a618fa1755692d0e0d592"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "securityKeysAvailable"`, + ); + await queryRunner.query(`DROP INDEX "IDX_0d7718e562dcedd0aa5cf2c9f7"`); + await queryRunner.query(`DROP INDEX "IDX_ff9ca3b5f3ee3d0681367a9b44"`); + await queryRunner.query(`DROP TABLE "user_security_key"`); + await queryRunner.query(`DROP INDEX "IDX_47efb914aed1f72dd39a306c7b"`); + await queryRunner.query(`DROP INDEX "IDX_f1a461a618fa1755692d0e0d59"`); + await queryRunner.query(`DROP TABLE "attestation_challenge"`); + } } diff --git a/packages/backend/migration/1561873850023-ChartIndexes.js b/packages/backend/migration/1561873850023-ChartIndexes.js index 3ce53567fc..ba46da1e41 100644 --- a/packages/backend/migration/1561873850023-ChartIndexes.js +++ b/packages/backend/migration/1561873850023-ChartIndexes.js @@ -1,198 +1,376 @@ - - export class ChartIndexes1561873850023 { - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_15e91a03aeeac9dbccdf43fc06" ON "__chart__active_users" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_00ed5f86db1f7efafb1978bf21" ON "__chart__active_users" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_20f57cc8f142c131340ee16742" ON "__chart__active_users" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_c26e2c1cbb6e911e0554b27416" ON "__chart__active_users" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_3fa0d0f17ca72e3dc80999a032" ON "__chart__drive" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_7a170f67425e62a8fabb76c872" ON "__chart__drive" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_6e1df243476e20cbf86572ecc0" ON "__chart__drive" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_06690fc959f1c9fdaf21928222" ON "__chart__drive" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_e447064455928cf627590ef527" ON "__chart__federation" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_76e87c7bfc5d925fcbba405d84" ON "__chart__federation" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_2d416e6af791a82e338c79d480" ON "__chart__federation" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_e9cd07672b37d8966cf3709283" ON "__chart__federation" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_07747a1038c05f532a718fe1de" ON "__chart__hashtag" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_fcc181fb8283009c61cc4083ef" ON "__chart__hashtag" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_99a7d2faaef84a6f728d714ad6" ON "__chart__hashtag" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_49975586f50ed7b800fdd88fbd" ON "__chart__hashtag" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_6d6f156ceefc6bc5f273a0e370" ON "__chart__hashtag" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_6b8f34a1a64b06014b6fb66824" ON "__chart__instance" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_c12f0af4a66cdd30c2287ce8aa" ON "__chart__instance" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63" ON "__chart__instance" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_d0a4f79af5a97b08f37b547197" ON "__chart__instance" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_f5448d9633cff74208d850aabe" ON "__chart__instance" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_f8dd01baeded2ffa833e0a610a" ON "__chart__network" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_7b5da130992ec9df96712d4290" ON "__chart__network" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_08fac0eb3b11f04c200c0b40dd" ON "__chart__network" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_9ff6944f01acb756fdc92d7563" ON "__chart__network" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_e69096589f11e3baa98ddd64d0" ON "__chart__notes" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_7036f2957151588b813185c794" ON "__chart__notes" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_0c9a159c5082cbeef3ca6706b5" ON "__chart__notes" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_924fc196c80ca24bae01dd37e4" ON "__chart__notes" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_5f86db6492274e07c1a3cdf286" ON "__chart__per_user_drive" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_328f259961e60c4fa0bfcf55ca" ON "__chart__per_user_drive" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_e496ca8096d28f6b9b509264dc" ON "__chart__per_user_drive" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53" ON "__chart__per_user_drive" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_f2aeafde2ae6fbad38e857631b" ON "__chart__per_user_drive" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_7af07790712aa3438ff6773f3b" ON "__chart__per_user_following" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_f92dd6d03f8d994f29987f6214" ON "__chart__per_user_following" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_4b3593098b6edc9c5afe36b18b" ON "__chart__per_user_following" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f" ON "__chart__per_user_following" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_4db3b84c7be0d3464714f3e0b1" ON "__chart__per_user_following" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_84234bd1abb873f07329681c83" ON "__chart__per_user_notes" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_8d2cbbc8114d90d19b44d626b6" ON "__chart__per_user_notes" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_55bf20f366979f2436de99206b" ON "__chart__per_user_notes" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_046feeb12e9ef5f783f409866a" ON "__chart__per_user_notes" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_f68a5ab958f9f5fa17a32ac23b" ON "__chart__per_user_notes" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_f7bf4c62059764c2c2bb40fdab" ON "__chart__per_user_reaction" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_65633a106bce43fc7c5c30a5c7" ON "__chart__per_user_reaction" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_8cf3156fd7a6b15c43459c6e3b" ON "__chart__per_user_reaction" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_edeb73c09c3143a81bcb34d569" ON "__chart__per_user_reaction" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_e316f01a6d24eb31db27f88262" ON "__chart__per_user_reaction" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_0c641990ecf47d2545df4edb75" ON "__chart__test_grouped" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_2be7ec6cebddc14dc11e206686" ON "__chart__test_grouped" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_234dff3c0b56a6150b95431ab9" ON "__chart__test_grouped" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_a5133470f4825902e170328ca5" ON "__chart__test_grouped" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_84e661abb7bd1e51b690d4b017" ON "__chart__test_grouped" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_437bab3c6061d90f6bb65fd2cc" ON "__chart__test_unique" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_5c73bf61da4f6e6f15bae88ed1" ON "__chart__test_unique" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_bbfa573a8181018851ed0b6357" ON "__chart__test_unique" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_d70c86baedc68326be11f9c0ce" ON "__chart__test_unique" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_66e1e1ecd2f29e57778af35b59" ON "__chart__test_unique" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_b070a906db04b44c67c6c2144d" ON "__chart__test" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_92255988735563f0fe4aba1f05" ON "__chart__test" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_d41cce6aee1a50bfc062038f9b" ON "__chart__test" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_c5870993e25c3d5771f91f5003" ON "__chart__test" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_f170de677ea75ad4533de2723e" ON "__chart__test" ("span", "date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_7c184198ecf66a8d3ecb253ab3" ON "__chart__users" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_ed9b95919c672a13008e9487ee" ON "__chart__users" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_f091abb24193d50c653c6b77fc" ON "__chart__users" ("span", "date") `); - await queryRunner.query(`CREATE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("span", "date", "group") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`); - await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); - await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`); - await queryRunner.query(`DROP INDEX "IDX_ed9b95919c672a13008e9487ee"`); - await queryRunner.query(`DROP INDEX "IDX_7c184198ecf66a8d3ecb253ab3"`); - await queryRunner.query(`DROP INDEX "IDX_845254b3eaf708ae8a6cac3026"`); - await queryRunner.query(`DROP INDEX "IDX_f170de677ea75ad4533de2723e"`); - await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); - await queryRunner.query(`DROP INDEX "IDX_c5870993e25c3d5771f91f5003"`); - await queryRunner.query(`DROP INDEX "IDX_d41cce6aee1a50bfc062038f9b"`); - await queryRunner.query(`DROP INDEX "IDX_92255988735563f0fe4aba1f05"`); - await queryRunner.query(`DROP INDEX "IDX_b070a906db04b44c67c6c2144d"`); - await queryRunner.query(`DROP INDEX "IDX_66e1e1ecd2f29e57778af35b59"`); - await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); - await queryRunner.query(`DROP INDEX "IDX_d70c86baedc68326be11f9c0ce"`); - await queryRunner.query(`DROP INDEX "IDX_bbfa573a8181018851ed0b6357"`); - await queryRunner.query(`DROP INDEX "IDX_5c73bf61da4f6e6f15bae88ed1"`); - await queryRunner.query(`DROP INDEX "IDX_437bab3c6061d90f6bb65fd2cc"`); - await queryRunner.query(`DROP INDEX "IDX_84e661abb7bd1e51b690d4b017"`); - await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); - await queryRunner.query(`DROP INDEX "IDX_a5133470f4825902e170328ca5"`); - await queryRunner.query(`DROP INDEX "IDX_234dff3c0b56a6150b95431ab9"`); - await queryRunner.query(`DROP INDEX "IDX_2be7ec6cebddc14dc11e206686"`); - await queryRunner.query(`DROP INDEX "IDX_0c641990ecf47d2545df4edb75"`); - await queryRunner.query(`DROP INDEX "IDX_e316f01a6d24eb31db27f88262"`); - await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); - await queryRunner.query(`DROP INDEX "IDX_edeb73c09c3143a81bcb34d569"`); - await queryRunner.query(`DROP INDEX "IDX_8cf3156fd7a6b15c43459c6e3b"`); - await queryRunner.query(`DROP INDEX "IDX_65633a106bce43fc7c5c30a5c7"`); - await queryRunner.query(`DROP INDEX "IDX_f7bf4c62059764c2c2bb40fdab"`); - await queryRunner.query(`DROP INDEX "IDX_f68a5ab958f9f5fa17a32ac23b"`); - await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); - await queryRunner.query(`DROP INDEX "IDX_046feeb12e9ef5f783f409866a"`); - await queryRunner.query(`DROP INDEX "IDX_55bf20f366979f2436de99206b"`); - await queryRunner.query(`DROP INDEX "IDX_8d2cbbc8114d90d19b44d626b6"`); - await queryRunner.query(`DROP INDEX "IDX_84234bd1abb873f07329681c83"`); - await queryRunner.query(`DROP INDEX "IDX_4db3b84c7be0d3464714f3e0b1"`); - await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); - await queryRunner.query(`DROP INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f"`); - await queryRunner.query(`DROP INDEX "IDX_4b3593098b6edc9c5afe36b18b"`); - await queryRunner.query(`DROP INDEX "IDX_f92dd6d03f8d994f29987f6214"`); - await queryRunner.query(`DROP INDEX "IDX_7af07790712aa3438ff6773f3b"`); - await queryRunner.query(`DROP INDEX "IDX_f2aeafde2ae6fbad38e857631b"`); - await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); - await queryRunner.query(`DROP INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53"`); - await queryRunner.query(`DROP INDEX "IDX_e496ca8096d28f6b9b509264dc"`); - await queryRunner.query(`DROP INDEX "IDX_328f259961e60c4fa0bfcf55ca"`); - await queryRunner.query(`DROP INDEX "IDX_5f86db6492274e07c1a3cdf286"`); - await queryRunner.query(`DROP INDEX "IDX_924fc196c80ca24bae01dd37e4"`); - await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); - await queryRunner.query(`DROP INDEX "IDX_0c9a159c5082cbeef3ca6706b5"`); - await queryRunner.query(`DROP INDEX "IDX_7036f2957151588b813185c794"`); - await queryRunner.query(`DROP INDEX "IDX_e69096589f11e3baa98ddd64d0"`); - await queryRunner.query(`DROP INDEX "IDX_42eb716a37d381cdf566192b2b"`); - await queryRunner.query(`DROP INDEX "IDX_9ff6944f01acb756fdc92d7563"`); - await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); - await queryRunner.query(`DROP INDEX "IDX_08fac0eb3b11f04c200c0b40dd"`); - await queryRunner.query(`DROP INDEX "IDX_7b5da130992ec9df96712d4290"`); - await queryRunner.query(`DROP INDEX "IDX_f8dd01baeded2ffa833e0a610a"`); - await queryRunner.query(`DROP INDEX "IDX_a1efd3e0048a5f2793a47360dc"`); - await queryRunner.query(`DROP INDEX "IDX_f5448d9633cff74208d850aabe"`); - await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); - await queryRunner.query(`DROP INDEX "IDX_d0a4f79af5a97b08f37b547197"`); - await queryRunner.query(`DROP INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63"`); - await queryRunner.query(`DROP INDEX "IDX_c12f0af4a66cdd30c2287ce8aa"`); - await queryRunner.query(`DROP INDEX "IDX_6b8f34a1a64b06014b6fb66824"`); - await queryRunner.query(`DROP INDEX "IDX_6d6f156ceefc6bc5f273a0e370"`); - await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); - await queryRunner.query(`DROP INDEX "IDX_49975586f50ed7b800fdd88fbd"`); - await queryRunner.query(`DROP INDEX "IDX_99a7d2faaef84a6f728d714ad6"`); - await queryRunner.query(`DROP INDEX "IDX_fcc181fb8283009c61cc4083ef"`); - await queryRunner.query(`DROP INDEX "IDX_07747a1038c05f532a718fe1de"`); - await queryRunner.query(`DROP INDEX "IDX_e9cd07672b37d8966cf3709283"`); - await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); - await queryRunner.query(`DROP INDEX "IDX_2d416e6af791a82e338c79d480"`); - await queryRunner.query(`DROP INDEX "IDX_76e87c7bfc5d925fcbba405d84"`); - await queryRunner.query(`DROP INDEX "IDX_e447064455928cf627590ef527"`); - await queryRunner.query(`DROP INDEX "IDX_36cb699c49580d4e6c2e6159f9"`); - await queryRunner.query(`DROP INDEX "IDX_06690fc959f1c9fdaf21928222"`); - await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); - await queryRunner.query(`DROP INDEX "IDX_6e1df243476e20cbf86572ecc0"`); - await queryRunner.query(`DROP INDEX "IDX_7a170f67425e62a8fabb76c872"`); - await queryRunner.query(`DROP INDEX "IDX_3fa0d0f17ca72e3dc80999a032"`); - await queryRunner.query(`DROP INDEX "IDX_13565815f618a1ff53886c5b28"`); - await queryRunner.query(`DROP INDEX "IDX_c26e2c1cbb6e911e0554b27416"`); - await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); - await queryRunner.query(`DROP INDEX "IDX_20f57cc8f142c131340ee16742"`); - await queryRunner.query(`DROP INDEX "IDX_00ed5f86db1f7efafb1978bf21"`); - await queryRunner.query(`DROP INDEX "IDX_15e91a03aeeac9dbccdf43fc06"`); - await queryRunner.query(`DROP INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc"`); - await queryRunner.query(`DROP INDEX "IDX_90148bbc2bf0854428786bfc15"`); - await queryRunner.query(`DROP INDEX "IDX_88937d94d7443d9a99a76fa5c0"`); - await queryRunner.query(`DROP INDEX "IDX_54ebcb6d27222913b908d56fd8"`); - await queryRunner.query(`DROP INDEX "IDX_796a8c03959361f97dc2be1d5c"`); - await queryRunner.query(`DROP INDEX "IDX_25dfc71b0369b003a4cd434d0b"`); - await queryRunner.query(`DROP INDEX "IDX_51c063b6a133a9cb87145450f5"`); - await queryRunner.query(`DROP INDEX "IDX_fa99d777623947a5b05f394cae"`); - await queryRunner.query(`DROP INDEX "IDX_315c779174fe8247ab324f036e"`); - await queryRunner.query(`DROP INDEX "IDX_c5d46cbfda48b1c33ed852e21b"`); - await queryRunner.query(`DROP INDEX "IDX_8cb40cfc8f3c28261e6f887b03"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_15e91a03aeeac9dbccdf43fc06" ON "__chart__active_users" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_00ed5f86db1f7efafb1978bf21" ON "__chart__active_users" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_20f57cc8f142c131340ee16742" ON "__chart__active_users" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c26e2c1cbb6e911e0554b27416" ON "__chart__active_users" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3fa0d0f17ca72e3dc80999a032" ON "__chart__drive" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7a170f67425e62a8fabb76c872" ON "__chart__drive" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6e1df243476e20cbf86572ecc0" ON "__chart__drive" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_06690fc959f1c9fdaf21928222" ON "__chart__drive" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e447064455928cf627590ef527" ON "__chart__federation" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_76e87c7bfc5d925fcbba405d84" ON "__chart__federation" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2d416e6af791a82e338c79d480" ON "__chart__federation" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e9cd07672b37d8966cf3709283" ON "__chart__federation" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_07747a1038c05f532a718fe1de" ON "__chart__hashtag" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fcc181fb8283009c61cc4083ef" ON "__chart__hashtag" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_99a7d2faaef84a6f728d714ad6" ON "__chart__hashtag" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_49975586f50ed7b800fdd88fbd" ON "__chart__hashtag" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6d6f156ceefc6bc5f273a0e370" ON "__chart__hashtag" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6b8f34a1a64b06014b6fb66824" ON "__chart__instance" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c12f0af4a66cdd30c2287ce8aa" ON "__chart__instance" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63" ON "__chart__instance" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d0a4f79af5a97b08f37b547197" ON "__chart__instance" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f5448d9633cff74208d850aabe" ON "__chart__instance" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f8dd01baeded2ffa833e0a610a" ON "__chart__network" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7b5da130992ec9df96712d4290" ON "__chart__network" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_08fac0eb3b11f04c200c0b40dd" ON "__chart__network" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9ff6944f01acb756fdc92d7563" ON "__chart__network" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e69096589f11e3baa98ddd64d0" ON "__chart__notes" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7036f2957151588b813185c794" ON "__chart__notes" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0c9a159c5082cbeef3ca6706b5" ON "__chart__notes" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_924fc196c80ca24bae01dd37e4" ON "__chart__notes" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5f86db6492274e07c1a3cdf286" ON "__chart__per_user_drive" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_328f259961e60c4fa0bfcf55ca" ON "__chart__per_user_drive" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e496ca8096d28f6b9b509264dc" ON "__chart__per_user_drive" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53" ON "__chart__per_user_drive" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f2aeafde2ae6fbad38e857631b" ON "__chart__per_user_drive" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7af07790712aa3438ff6773f3b" ON "__chart__per_user_following" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f92dd6d03f8d994f29987f6214" ON "__chart__per_user_following" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4b3593098b6edc9c5afe36b18b" ON "__chart__per_user_following" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f" ON "__chart__per_user_following" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4db3b84c7be0d3464714f3e0b1" ON "__chart__per_user_following" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_84234bd1abb873f07329681c83" ON "__chart__per_user_notes" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8d2cbbc8114d90d19b44d626b6" ON "__chart__per_user_notes" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_55bf20f366979f2436de99206b" ON "__chart__per_user_notes" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_046feeb12e9ef5f783f409866a" ON "__chart__per_user_notes" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f68a5ab958f9f5fa17a32ac23b" ON "__chart__per_user_notes" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f7bf4c62059764c2c2bb40fdab" ON "__chart__per_user_reaction" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_65633a106bce43fc7c5c30a5c7" ON "__chart__per_user_reaction" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8cf3156fd7a6b15c43459c6e3b" ON "__chart__per_user_reaction" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_edeb73c09c3143a81bcb34d569" ON "__chart__per_user_reaction" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e316f01a6d24eb31db27f88262" ON "__chart__per_user_reaction" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0c641990ecf47d2545df4edb75" ON "__chart__test_grouped" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2be7ec6cebddc14dc11e206686" ON "__chart__test_grouped" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_234dff3c0b56a6150b95431ab9" ON "__chart__test_grouped" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a5133470f4825902e170328ca5" ON "__chart__test_grouped" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_84e661abb7bd1e51b690d4b017" ON "__chart__test_grouped" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_437bab3c6061d90f6bb65fd2cc" ON "__chart__test_unique" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5c73bf61da4f6e6f15bae88ed1" ON "__chart__test_unique" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bbfa573a8181018851ed0b6357" ON "__chart__test_unique" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d70c86baedc68326be11f9c0ce" ON "__chart__test_unique" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_66e1e1ecd2f29e57778af35b59" ON "__chart__test_unique" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b070a906db04b44c67c6c2144d" ON "__chart__test" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_92255988735563f0fe4aba1f05" ON "__chart__test" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d41cce6aee1a50bfc062038f9b" ON "__chart__test" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c5870993e25c3d5771f91f5003" ON "__chart__test" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f170de677ea75ad4533de2723e" ON "__chart__test" ("span", "date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7c184198ecf66a8d3ecb253ab3" ON "__chart__users" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ed9b95919c672a13008e9487ee" ON "__chart__users" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f091abb24193d50c653c6b77fc" ON "__chart__users" ("span", "date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("span", "date", "group") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`); + await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); + await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`); + await queryRunner.query(`DROP INDEX "IDX_ed9b95919c672a13008e9487ee"`); + await queryRunner.query(`DROP INDEX "IDX_7c184198ecf66a8d3ecb253ab3"`); + await queryRunner.query(`DROP INDEX "IDX_845254b3eaf708ae8a6cac3026"`); + await queryRunner.query(`DROP INDEX "IDX_f170de677ea75ad4533de2723e"`); + await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); + await queryRunner.query(`DROP INDEX "IDX_c5870993e25c3d5771f91f5003"`); + await queryRunner.query(`DROP INDEX "IDX_d41cce6aee1a50bfc062038f9b"`); + await queryRunner.query(`DROP INDEX "IDX_92255988735563f0fe4aba1f05"`); + await queryRunner.query(`DROP INDEX "IDX_b070a906db04b44c67c6c2144d"`); + await queryRunner.query(`DROP INDEX "IDX_66e1e1ecd2f29e57778af35b59"`); + await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); + await queryRunner.query(`DROP INDEX "IDX_d70c86baedc68326be11f9c0ce"`); + await queryRunner.query(`DROP INDEX "IDX_bbfa573a8181018851ed0b6357"`); + await queryRunner.query(`DROP INDEX "IDX_5c73bf61da4f6e6f15bae88ed1"`); + await queryRunner.query(`DROP INDEX "IDX_437bab3c6061d90f6bb65fd2cc"`); + await queryRunner.query(`DROP INDEX "IDX_84e661abb7bd1e51b690d4b017"`); + await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); + await queryRunner.query(`DROP INDEX "IDX_a5133470f4825902e170328ca5"`); + await queryRunner.query(`DROP INDEX "IDX_234dff3c0b56a6150b95431ab9"`); + await queryRunner.query(`DROP INDEX "IDX_2be7ec6cebddc14dc11e206686"`); + await queryRunner.query(`DROP INDEX "IDX_0c641990ecf47d2545df4edb75"`); + await queryRunner.query(`DROP INDEX "IDX_e316f01a6d24eb31db27f88262"`); + await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); + await queryRunner.query(`DROP INDEX "IDX_edeb73c09c3143a81bcb34d569"`); + await queryRunner.query(`DROP INDEX "IDX_8cf3156fd7a6b15c43459c6e3b"`); + await queryRunner.query(`DROP INDEX "IDX_65633a106bce43fc7c5c30a5c7"`); + await queryRunner.query(`DROP INDEX "IDX_f7bf4c62059764c2c2bb40fdab"`); + await queryRunner.query(`DROP INDEX "IDX_f68a5ab958f9f5fa17a32ac23b"`); + await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); + await queryRunner.query(`DROP INDEX "IDX_046feeb12e9ef5f783f409866a"`); + await queryRunner.query(`DROP INDEX "IDX_55bf20f366979f2436de99206b"`); + await queryRunner.query(`DROP INDEX "IDX_8d2cbbc8114d90d19b44d626b6"`); + await queryRunner.query(`DROP INDEX "IDX_84234bd1abb873f07329681c83"`); + await queryRunner.query(`DROP INDEX "IDX_4db3b84c7be0d3464714f3e0b1"`); + await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); + await queryRunner.query(`DROP INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f"`); + await queryRunner.query(`DROP INDEX "IDX_4b3593098b6edc9c5afe36b18b"`); + await queryRunner.query(`DROP INDEX "IDX_f92dd6d03f8d994f29987f6214"`); + await queryRunner.query(`DROP INDEX "IDX_7af07790712aa3438ff6773f3b"`); + await queryRunner.query(`DROP INDEX "IDX_f2aeafde2ae6fbad38e857631b"`); + await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); + await queryRunner.query(`DROP INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53"`); + await queryRunner.query(`DROP INDEX "IDX_e496ca8096d28f6b9b509264dc"`); + await queryRunner.query(`DROP INDEX "IDX_328f259961e60c4fa0bfcf55ca"`); + await queryRunner.query(`DROP INDEX "IDX_5f86db6492274e07c1a3cdf286"`); + await queryRunner.query(`DROP INDEX "IDX_924fc196c80ca24bae01dd37e4"`); + await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); + await queryRunner.query(`DROP INDEX "IDX_0c9a159c5082cbeef3ca6706b5"`); + await queryRunner.query(`DROP INDEX "IDX_7036f2957151588b813185c794"`); + await queryRunner.query(`DROP INDEX "IDX_e69096589f11e3baa98ddd64d0"`); + await queryRunner.query(`DROP INDEX "IDX_42eb716a37d381cdf566192b2b"`); + await queryRunner.query(`DROP INDEX "IDX_9ff6944f01acb756fdc92d7563"`); + await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); + await queryRunner.query(`DROP INDEX "IDX_08fac0eb3b11f04c200c0b40dd"`); + await queryRunner.query(`DROP INDEX "IDX_7b5da130992ec9df96712d4290"`); + await queryRunner.query(`DROP INDEX "IDX_f8dd01baeded2ffa833e0a610a"`); + await queryRunner.query(`DROP INDEX "IDX_a1efd3e0048a5f2793a47360dc"`); + await queryRunner.query(`DROP INDEX "IDX_f5448d9633cff74208d850aabe"`); + await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); + await queryRunner.query(`DROP INDEX "IDX_d0a4f79af5a97b08f37b547197"`); + await queryRunner.query(`DROP INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63"`); + await queryRunner.query(`DROP INDEX "IDX_c12f0af4a66cdd30c2287ce8aa"`); + await queryRunner.query(`DROP INDEX "IDX_6b8f34a1a64b06014b6fb66824"`); + await queryRunner.query(`DROP INDEX "IDX_6d6f156ceefc6bc5f273a0e370"`); + await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); + await queryRunner.query(`DROP INDEX "IDX_49975586f50ed7b800fdd88fbd"`); + await queryRunner.query(`DROP INDEX "IDX_99a7d2faaef84a6f728d714ad6"`); + await queryRunner.query(`DROP INDEX "IDX_fcc181fb8283009c61cc4083ef"`); + await queryRunner.query(`DROP INDEX "IDX_07747a1038c05f532a718fe1de"`); + await queryRunner.query(`DROP INDEX "IDX_e9cd07672b37d8966cf3709283"`); + await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); + await queryRunner.query(`DROP INDEX "IDX_2d416e6af791a82e338c79d480"`); + await queryRunner.query(`DROP INDEX "IDX_76e87c7bfc5d925fcbba405d84"`); + await queryRunner.query(`DROP INDEX "IDX_e447064455928cf627590ef527"`); + await queryRunner.query(`DROP INDEX "IDX_36cb699c49580d4e6c2e6159f9"`); + await queryRunner.query(`DROP INDEX "IDX_06690fc959f1c9fdaf21928222"`); + await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); + await queryRunner.query(`DROP INDEX "IDX_6e1df243476e20cbf86572ecc0"`); + await queryRunner.query(`DROP INDEX "IDX_7a170f67425e62a8fabb76c872"`); + await queryRunner.query(`DROP INDEX "IDX_3fa0d0f17ca72e3dc80999a032"`); + await queryRunner.query(`DROP INDEX "IDX_13565815f618a1ff53886c5b28"`); + await queryRunner.query(`DROP INDEX "IDX_c26e2c1cbb6e911e0554b27416"`); + await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); + await queryRunner.query(`DROP INDEX "IDX_20f57cc8f142c131340ee16742"`); + await queryRunner.query(`DROP INDEX "IDX_00ed5f86db1f7efafb1978bf21"`); + await queryRunner.query(`DROP INDEX "IDX_15e91a03aeeac9dbccdf43fc06"`); + await queryRunner.query(`DROP INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc"`); + await queryRunner.query(`DROP INDEX "IDX_90148bbc2bf0854428786bfc15"`); + await queryRunner.query(`DROP INDEX "IDX_88937d94d7443d9a99a76fa5c0"`); + await queryRunner.query(`DROP INDEX "IDX_54ebcb6d27222913b908d56fd8"`); + await queryRunner.query(`DROP INDEX "IDX_796a8c03959361f97dc2be1d5c"`); + await queryRunner.query(`DROP INDEX "IDX_25dfc71b0369b003a4cd434d0b"`); + await queryRunner.query(`DROP INDEX "IDX_51c063b6a133a9cb87145450f5"`); + await queryRunner.query(`DROP INDEX "IDX_fa99d777623947a5b05f394cae"`); + await queryRunner.query(`DROP INDEX "IDX_315c779174fe8247ab324f036e"`); + await queryRunner.query(`DROP INDEX "IDX_c5d46cbfda48b1c33ed852e21b"`); + await queryRunner.query(`DROP INDEX "IDX_8cb40cfc8f3c28261e6f887b03"`); + } } diff --git a/packages/backend/migration/1562422242907-PasswordLessLogin.js b/packages/backend/migration/1562422242907-PasswordLessLogin.js index b73c7db4d3..8e1280830b 100644 --- a/packages/backend/migration/1562422242907-PasswordLessLogin.js +++ b/packages/backend/migration/1562422242907-PasswordLessLogin.js @@ -1,10 +1,12 @@ - - export class PasswordLessLogin1562422242907 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD COLUMN "usePasswordLessLogin" boolean DEFAULT false NOT NULL`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "usePasswordLessLogin"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD COLUMN "usePasswordLessLogin" boolean DEFAULT false NOT NULL`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "usePasswordLessLogin"`, + ); + } } diff --git a/packages/backend/migration/1562444565093-PinnedPage.js b/packages/backend/migration/1562444565093-PinnedPage.js index 9a999a9150..dcb342d3fc 100644 --- a/packages/backend/migration/1562444565093-PinnedPage.js +++ b/packages/backend/migration/1562444565093-PinnedPage.js @@ -1,14 +1,24 @@ - - export class PinnedPage1562444565093 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "pinnedPageId" character varying(32)`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27" UNIQUE ("pinnedPageId")`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27" FOREIGN KEY ("pinnedPageId") REFERENCES "page"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "pinnedPageId"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "pinnedPageId" character varying(32)`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27" UNIQUE ("pinnedPageId")`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27" FOREIGN KEY ("pinnedPageId") REFERENCES "page"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP CONSTRAINT "FK_6dc44f1ceb65b1e72bacef2ca27"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP CONSTRAINT "UQ_6dc44f1ceb65b1e72bacef2ca27"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "pinnedPageId"`, + ); + } } diff --git a/packages/backend/migration/1562448332510-PageTitleHideOption.js b/packages/backend/migration/1562448332510-PageTitleHideOption.js index 8fc78d202f..9a1b42f4bb 100644 --- a/packages/backend/migration/1562448332510-PageTitleHideOption.js +++ b/packages/backend/migration/1562448332510-PageTitleHideOption.js @@ -1,10 +1,12 @@ - - export class PageTitleHideOption1562448332510 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" ADD "hideTitleWhenPinned" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "hideTitleWhenPinned"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page" ADD "hideTitleWhenPinned" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page" DROP COLUMN "hideTitleWhenPinned"`, + ); + } } diff --git a/packages/backend/migration/1562869971568-ModerationLog.js b/packages/backend/migration/1562869971568-ModerationLog.js index dd66d16eec..f652b067b4 100644 --- a/packages/backend/migration/1562869971568-ModerationLog.js +++ b/packages/backend/migration/1562869971568-ModerationLog.js @@ -1,14 +1,20 @@ - - export class ModerationLog1562869971568 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "moderation_log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "type" character varying(128) NOT NULL, "info" jsonb NOT NULL, CONSTRAINT "PK_d0adca6ecfd068db83e4526cc26" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_a08ad074601d204e0f69da9a95" ON "moderation_log" ("userId") `); - await queryRunner.query(`ALTER TABLE "moderation_log" ADD CONSTRAINT "FK_a08ad074601d204e0f69da9a954" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "moderation_log" DROP CONSTRAINT "FK_a08ad074601d204e0f69da9a954"`); - await queryRunner.query(`DROP INDEX "IDX_a08ad074601d204e0f69da9a95"`); - await queryRunner.query(`DROP TABLE "moderation_log"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "moderation_log" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "type" character varying(128) NOT NULL, "info" jsonb NOT NULL, CONSTRAINT "PK_d0adca6ecfd068db83e4526cc26" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a08ad074601d204e0f69da9a95" ON "moderation_log" ("userId") `, + ); + await queryRunner.query( + `ALTER TABLE "moderation_log" ADD CONSTRAINT "FK_a08ad074601d204e0f69da9a954" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "moderation_log" DROP CONSTRAINT "FK_a08ad074601d204e0f69da9a954"`, + ); + await queryRunner.query(`DROP INDEX "IDX_a08ad074601d204e0f69da9a95"`); + await queryRunner.query(`DROP TABLE "moderation_log"`); + } } diff --git a/packages/backend/migration/1563757595828-UsedUsername.js b/packages/backend/migration/1563757595828-UsedUsername.js index 8972df297d..2cf5d8c740 100644 --- a/packages/backend/migration/1563757595828-UsedUsername.js +++ b/packages/backend/migration/1563757595828-UsedUsername.js @@ -1,10 +1,10 @@ - - export class UsedUsername1563757595828 { - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "used_username" ("username" character varying(128) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_78fd79d2d24c6ac2f4cc9a31a5d" PRIMARY KEY ("username"))`); - } - async down(queryRunner) { - await queryRunner.query(`DROP TABLE "used_username"`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "used_username" ("username" character varying(128) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, CONSTRAINT "PK_78fd79d2d24c6ac2f4cc9a31a5d" PRIMARY KEY ("username"))`, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP TABLE "used_username"`); + } } diff --git a/packages/backend/migration/1565634203341-room.js b/packages/backend/migration/1565634203341-room.js index 679940f244..1023c0a31a 100644 --- a/packages/backend/migration/1565634203341-room.js +++ b/packages/backend/migration/1565634203341-room.js @@ -1,10 +1,10 @@ - - export class room1565634203341 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "room" jsonb NOT NULL DEFAULT '{}'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "room"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "room" jsonb NOT NULL DEFAULT '{}'`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "room"`); + } } diff --git a/packages/backend/migration/1571220798684-CustomEmojiCategory.js b/packages/backend/migration/1571220798684-CustomEmojiCategory.js index 37c07366e1..4d75313328 100644 --- a/packages/backend/migration/1571220798684-CustomEmojiCategory.js +++ b/packages/backend/migration/1571220798684-CustomEmojiCategory.js @@ -1,10 +1,14 @@ - - export class CustomEmojiCategory1571220798684 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "emoji" ADD "category" character varying(128)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "category"`, undefined); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "emoji" ADD "category" character varying(128)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "emoji" DROP COLUMN "category"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1572760203493-nodeinfo.js b/packages/backend/migration/1572760203493-nodeinfo.js index 54d5f914a4..eea87c82c8 100644 --- a/packages/backend/migration/1572760203493-nodeinfo.js +++ b/packages/backend/migration/1572760203493-nodeinfo.js @@ -1,26 +1,78 @@ - - export class nodeinfo1572760203493 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "system"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "softwareName" character varying(64) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "softwareVersion" character varying(64) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "openRegistrations" boolean DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "name" character varying(256) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "description" character varying(4096) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "maintainerName" character varying(128) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "maintainerEmail" character varying(256) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "infoUpdatedAt" TIMESTAMP WITH TIME ZONE`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "infoUpdatedAt"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "maintainerEmail"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "maintainerName"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "description"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "name"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "openRegistrations"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "softwareVersion"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "softwareName"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "system" character varying(64)`, undefined); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "system"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "softwareName" character varying(64) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "softwareVersion" character varying(64) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "openRegistrations" boolean DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "name" character varying(256) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "description" character varying(4096) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "maintainerName" character varying(128) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "maintainerEmail" character varying(256) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "infoUpdatedAt" TIMESTAMP WITH TIME ZONE`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "infoUpdatedAt"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "maintainerEmail"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "maintainerName"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "description"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "name"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "openRegistrations"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "softwareVersion"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "softwareName"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "system" character varying(64)`, + undefined, + ); + } } diff --git a/packages/backend/migration/1576269851876-TalkFederationId.js b/packages/backend/migration/1576269851876-TalkFederationId.js index 35861d571f..f0aed7dd83 100644 --- a/packages/backend/migration/1576269851876-TalkFederationId.js +++ b/packages/backend/migration/1576269851876-TalkFederationId.js @@ -1,13 +1,17 @@ - - export class TalkFederationId1576269851876 { - constructor() { - this.name = 'TalkFederationId1576269851876'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "messaging_message" ADD "uri" character varying(512)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "messaging_message" DROP COLUMN "uri"`, undefined); - } + constructor() { + this.name = "TalkFederationId1576269851876"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "messaging_message" ADD "uri" character varying(512)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "messaging_message" DROP COLUMN "uri"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1576869585998-ProxyRemoteFiles.js b/packages/backend/migration/1576869585998-ProxyRemoteFiles.js index d6d134be40..5565f64b6d 100644 --- a/packages/backend/migration/1576869585998-ProxyRemoteFiles.js +++ b/packages/backend/migration/1576869585998-ProxyRemoteFiles.js @@ -1,13 +1,17 @@ - - export class ProxyRemoteFiles1576869585998 { - constructor() { - this.name = 'ProxyRemoteFiles1576869585998'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "proxyRemoteFiles" boolean NOT NULL DEFAULT false`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "proxyRemoteFiles"`, undefined); - } + constructor() { + this.name = "ProxyRemoteFiles1576869585998"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "proxyRemoteFiles" boolean NOT NULL DEFAULT false`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "proxyRemoteFiles"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1579267006611-v12.js b/packages/backend/migration/1579267006611-v12.js index 7f6318a192..f1d906465e 100644 --- a/packages/backend/migration/1579267006611-v12.js +++ b/packages/backend/migration/1579267006611-v12.js @@ -1,33 +1,91 @@ - - export class v121579267006611 { - constructor() { - this.name = 'v121579267006611'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "announcement" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "text" character varying(8192) NOT NULL, "title" character varying(256) NOT NULL, "imageUrl" character varying(1024), CONSTRAINT "PK_e0ef0550174fd1099a308fd18a0" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_118ec703e596086fc4515acb39" ON "announcement" ("createdAt") `, undefined); - await queryRunner.query(`CREATE TABLE "announcement_read" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "announcementId" character varying(32) NOT NULL, CONSTRAINT "PK_4b90ad1f42681d97b2683890c5e" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_8288151386172b8109f7239ab2" ON "announcement_read" ("userId") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_603a7b1e7aa0533c6c88e9bfaf" ON "announcement_read" ("announcementId") `, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_924fa71815cfa3941d003702a0" ON "announcement_read" ("userId", "announcementId") `, undefined); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isVerified"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "announcements"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableEmojiReaction"`, undefined); - await queryRunner.query(`ALTER TABLE "announcement_read" ADD CONSTRAINT "FK_8288151386172b8109f7239ab28" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "announcement_read" ADD CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe" FOREIGN KEY ("announcementId") REFERENCES "announcement"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe"`, undefined); - await queryRunner.query(`ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_8288151386172b8109f7239ab28"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "enableEmojiReaction" boolean NOT NULL DEFAULT true`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "announcements" jsonb NOT NULL DEFAULT '[]'`, undefined); - await queryRunner.query(`ALTER TABLE "user" ADD "isVerified" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`DROP INDEX "IDX_924fa71815cfa3941d003702a0"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_603a7b1e7aa0533c6c88e9bfaf"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_8288151386172b8109f7239ab2"`, undefined); - await queryRunner.query(`DROP TABLE "announcement_read"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_118ec703e596086fc4515acb39"`, undefined); - await queryRunner.query(`DROP TABLE "announcement"`, undefined); - } + constructor() { + this.name = "v121579267006611"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "announcement" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "text" character varying(8192) NOT NULL, "title" character varying(256) NOT NULL, "imageUrl" character varying(1024), CONSTRAINT "PK_e0ef0550174fd1099a308fd18a0" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_118ec703e596086fc4515acb39" ON "announcement" ("createdAt") `, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "announcement_read" ("id" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, "announcementId" character varying(32) NOT NULL, CONSTRAINT "PK_4b90ad1f42681d97b2683890c5e" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8288151386172b8109f7239ab2" ON "announcement_read" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_603a7b1e7aa0533c6c88e9bfaf" ON "announcement_read" ("announcementId") `, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_924fa71815cfa3941d003702a0" ON "announcement_read" ("userId", "announcementId") `, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user" DROP COLUMN "isVerified"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "announcements"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "enableEmojiReaction"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "announcement_read" ADD CONSTRAINT "FK_8288151386172b8109f7239ab28" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "announcement_read" ADD CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe" FOREIGN KEY ("announcementId") REFERENCES "announcement"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_603a7b1e7aa0533c6c88e9bfafe"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "announcement_read" DROP CONSTRAINT "FK_8288151386172b8109f7239ab28"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableEmojiReaction" boolean NOT NULL DEFAULT true`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "announcements" jsonb NOT NULL DEFAULT '[]'`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user" ADD "isVerified" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_924fa71815cfa3941d003702a0"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_603a7b1e7aa0533c6c88e9bfaf"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_8288151386172b8109f7239ab2"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "announcement_read"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_118ec703e596086fc4515acb39"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "announcement"`, undefined); + } } diff --git a/packages/backend/migration/1579270193251-v12-2.js b/packages/backend/migration/1579270193251-v12-2.js index c51ce63066..6bbcdcc152 100644 --- a/packages/backend/migration/1579270193251-v12-2.js +++ b/packages/backend/migration/1579270193251-v12-2.js @@ -1,13 +1,17 @@ - - export class v1221579270193251 { - constructor() { - this.name = 'v1221579270193251'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "announcement_read" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "announcement_read" DROP COLUMN "createdAt"`, undefined); - } + constructor() { + this.name = "v1221579270193251"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement_read" ADD "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement_read" DROP COLUMN "createdAt"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1579282808087-v12-3.js b/packages/backend/migration/1579282808087-v12-3.js index aeb4f5a873..d5a9a86b52 100644 --- a/packages/backend/migration/1579282808087-v12-3.js +++ b/packages/backend/migration/1579282808087-v12-3.js @@ -1,13 +1,17 @@ - - export class v1231579282808087 { - constructor() { - this.name = 'v1231579282808087'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "announcement" ADD "updatedAt" TIMESTAMP WITH TIME ZONE`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "announcement" DROP COLUMN "updatedAt"`, undefined); - } + constructor() { + this.name = "v1231579282808087"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement" ADD "updatedAt" TIMESTAMP WITH TIME ZONE`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "announcement" DROP COLUMN "updatedAt"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1579544426412-v12-4.js b/packages/backend/migration/1579544426412-v12-4.js index f1e093413e..efd6ee61bb 100644 --- a/packages/backend/migration/1579544426412-v12-4.js +++ b/packages/backend/migration/1579544426412-v12-4.js @@ -1,15 +1,25 @@ - - export class v1241579544426412 { - constructor() { - this.name = 'v1241579544426412'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" ADD "followRequestId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_bd7fab507621e635b32cd31892c" FOREIGN KEY ("followRequestId") REFERENCES "follow_request"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_bd7fab507621e635b32cd31892c"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "followRequestId"`, undefined); - } + constructor() { + this.name = "v1241579544426412"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" ADD "followRequestId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_bd7fab507621e635b32cd31892c" FOREIGN KEY ("followRequestId") REFERENCES "follow_request"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_bd7fab507621e635b32cd31892c"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "followRequestId"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1579977526288-v12-5.js b/packages/backend/migration/1579977526288-v12-5.js index 6d2b5c584a..f71c287551 100644 --- a/packages/backend/migration/1579977526288-v12-5.js +++ b/packages/backend/migration/1579977526288-v12-5.js @@ -1,53 +1,156 @@ - - export class v1251579977526288 { - constructor() { - this.name = 'v1251579977526288'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "clip" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "isPublic" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_f0685dac8d4dd056d7255670b75" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_2b5ec6c574d6802c94c80313fb" ON "clip" ("userId") `, undefined); - await queryRunner.query(`CREATE TABLE "clip_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "clipId" character varying(32) NOT NULL, CONSTRAINT "PK_e94cda2f40a99b57e032a1a738b" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_a012eaf5c87c65da1deb5fdbfa" ON "clip_note" ("noteId") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_ebe99317bbbe9968a0c6f579ad" ON "clip_note" ("clipId") `, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_6fc0ec357d55a18646262fdfff" ON "clip_note" ("noteId", "clipId") `, undefined); - await queryRunner.query(`CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'list')`, undefined); - await queryRunner.query(`CREATE TABLE "antenna" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "src" "antenna_src_enum" NOT NULL, "userListId" character varying(32), "keywords" jsonb NOT NULL DEFAULT '[]', "withFile" boolean NOT NULL, "expression" character varying(2048), "notify" boolean NOT NULL, "hasNewNote" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_c170b99775e1dccca947c9f2d5f" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_6446c571a0e8d0f05f01c78909" ON "antenna" ("userId") `, undefined); - await queryRunner.query(`CREATE TABLE "antenna_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "antennaId" character varying(32) NOT NULL, CONSTRAINT "PK_fb28d94d0989a3872df19fd6ef8" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_bd0397be22147e17210940e125" ON "antenna_note" ("noteId") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_0d775946662d2575dfd2068a5f" ON "antenna_note" ("antennaId") `, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_335a0bf3f904406f9ef3dd51c2" ON "antenna_note" ("noteId", "antennaId") `, undefined); - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "geo"`, undefined); - await queryRunner.query(`ALTER TABLE "clip" ADD CONSTRAINT "FK_2b5ec6c574d6802c94c80313fb2" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "clip_note" ADD CONSTRAINT "FK_a012eaf5c87c65da1deb5fdbfa3" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "clip_note" ADD CONSTRAINT "FK_ebe99317bbbe9968a0c6f579adf" FOREIGN KEY ("clipId") REFERENCES "clip"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD CONSTRAINT "FK_6446c571a0e8d0f05f01c789096" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD CONSTRAINT "FK_709d7d32053d0dd7620f678eeb9" FOREIGN KEY ("userListId") REFERENCES "user_list"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "antenna_note" ADD CONSTRAINT "FK_bd0397be22147e17210940e125b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "antenna_note" ADD CONSTRAINT "FK_0d775946662d2575dfd2068a5f5" FOREIGN KEY ("antennaId") REFERENCES "antenna"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_0d775946662d2575dfd2068a5f5"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_bd0397be22147e17210940e125b"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP CONSTRAINT "FK_709d7d32053d0dd7620f678eeb9"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP CONSTRAINT "FK_6446c571a0e8d0f05f01c789096"`, undefined); - await queryRunner.query(`ALTER TABLE "clip_note" DROP CONSTRAINT "FK_ebe99317bbbe9968a0c6f579adf"`, undefined); - await queryRunner.query(`ALTER TABLE "clip_note" DROP CONSTRAINT "FK_a012eaf5c87c65da1deb5fdbfa3"`, undefined); - await queryRunner.query(`ALTER TABLE "clip" DROP CONSTRAINT "FK_2b5ec6c574d6802c94c80313fb2"`, undefined); - await queryRunner.query(`ALTER TABLE "note" ADD "geo" jsonb`, undefined); - await queryRunner.query(`DROP INDEX "IDX_335a0bf3f904406f9ef3dd51c2"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_0d775946662d2575dfd2068a5f"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_bd0397be22147e17210940e125"`, undefined); - await queryRunner.query(`DROP TABLE "antenna_note"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_6446c571a0e8d0f05f01c78909"`, undefined); - await queryRunner.query(`DROP TABLE "antenna"`, undefined); - await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_6fc0ec357d55a18646262fdfff"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_ebe99317bbbe9968a0c6f579ad"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_a012eaf5c87c65da1deb5fdbfa"`, undefined); - await queryRunner.query(`DROP TABLE "clip_note"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_2b5ec6c574d6802c94c80313fb"`, undefined); - await queryRunner.query(`DROP TABLE "clip"`, undefined); - } + constructor() { + this.name = "v1251579977526288"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "clip" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "isPublic" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_f0685dac8d4dd056d7255670b75" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2b5ec6c574d6802c94c80313fb" ON "clip" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "clip_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "clipId" character varying(32) NOT NULL, CONSTRAINT "PK_e94cda2f40a99b57e032a1a738b" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a012eaf5c87c65da1deb5fdbfa" ON "clip_note" ("noteId") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ebe99317bbbe9968a0c6f579ad" ON "clip_note" ("clipId") `, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_6fc0ec357d55a18646262fdfff" ON "clip_note" ("noteId", "clipId") `, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'list')`, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "antenna" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "src" "antenna_src_enum" NOT NULL, "userListId" character varying(32), "keywords" jsonb NOT NULL DEFAULT '[]', "withFile" boolean NOT NULL, "expression" character varying(2048), "notify" boolean NOT NULL, "hasNewNote" boolean NOT NULL DEFAULT false, CONSTRAINT "PK_c170b99775e1dccca947c9f2d5f" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6446c571a0e8d0f05f01c78909" ON "antenna" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "antenna_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "antennaId" character varying(32) NOT NULL, CONSTRAINT "PK_fb28d94d0989a3872df19fd6ef8" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bd0397be22147e17210940e125" ON "antenna_note" ("noteId") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0d775946662d2575dfd2068a5f" ON "antenna_note" ("antennaId") `, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_335a0bf3f904406f9ef3dd51c2" ON "antenna_note" ("noteId", "antennaId") `, + undefined, + ); + await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "geo"`, undefined); + await queryRunner.query( + `ALTER TABLE "clip" ADD CONSTRAINT "FK_2b5ec6c574d6802c94c80313fb2" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "clip_note" ADD CONSTRAINT "FK_a012eaf5c87c65da1deb5fdbfa3" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "clip_note" ADD CONSTRAINT "FK_ebe99317bbbe9968a0c6f579adf" FOREIGN KEY ("clipId") REFERENCES "clip"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD CONSTRAINT "FK_6446c571a0e8d0f05f01c789096" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD CONSTRAINT "FK_709d7d32053d0dd7620f678eeb9" FOREIGN KEY ("userListId") REFERENCES "user_list"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" ADD CONSTRAINT "FK_bd0397be22147e17210940e125b" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" ADD CONSTRAINT "FK_0d775946662d2575dfd2068a5f5" FOREIGN KEY ("antennaId") REFERENCES "antenna"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_0d775946662d2575dfd2068a5f5"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" DROP CONSTRAINT "FK_bd0397be22147e17210940e125b"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP CONSTRAINT "FK_709d7d32053d0dd7620f678eeb9"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP CONSTRAINT "FK_6446c571a0e8d0f05f01c789096"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "clip_note" DROP CONSTRAINT "FK_ebe99317bbbe9968a0c6f579adf"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "clip_note" DROP CONSTRAINT "FK_a012eaf5c87c65da1deb5fdbfa3"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "clip" DROP CONSTRAINT "FK_2b5ec6c574d6802c94c80313fb2"`, + undefined, + ); + await queryRunner.query(`ALTER TABLE "note" ADD "geo" jsonb`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_335a0bf3f904406f9ef3dd51c2"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_0d775946662d2575dfd2068a5f"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_bd0397be22147e17210940e125"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "antenna_note"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_6446c571a0e8d0f05f01c78909"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "antenna"`, undefined); + await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_6fc0ec357d55a18646262fdfff"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_ebe99317bbbe9968a0c6f579ad"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_a012eaf5c87c65da1deb5fdbfa"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "clip_note"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_2b5ec6c574d6802c94c80313fb"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "clip"`, undefined); + } } diff --git a/packages/backend/migration/1579993013959-v12-6.js b/packages/backend/migration/1579993013959-v12-6.js index 3941c1391d..fc954c3612 100644 --- a/packages/backend/migration/1579993013959-v12-6.js +++ b/packages/backend/migration/1579993013959-v12-6.js @@ -1,17 +1,33 @@ - - export class v1261579993013959 { - constructor() { - this.name = 'v1261579993013959'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "hasNewNote"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna_note" ADD "read" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_9937ea48d7ae97ffb4f3f063a4" ON "antenna_note" ("read") `, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_9937ea48d7ae97ffb4f3f063a4"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna_note" DROP COLUMN "read"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD "hasNewNote" boolean NOT NULL DEFAULT false`, undefined); - } + constructor() { + this.name = "v1261579993013959"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "hasNewNote"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" ADD "read" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9937ea48d7ae97ffb4f3f063a4" ON "antenna_note" ("read") `, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "IDX_9937ea48d7ae97ffb4f3f063a4"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna_note" DROP COLUMN "read"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD "hasNewNote" boolean NOT NULL DEFAULT false`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580069531114-v12-7.js b/packages/backend/migration/1580069531114-v12-7.js index 4b4790cb7d..c4214ddf13 100644 --- a/packages/backend/migration/1580069531114-v12-7.js +++ b/packages/backend/migration/1580069531114-v12-7.js @@ -1,23 +1,51 @@ - - export class v1271580069531114 { - constructor() { - this.name = 'v1271580069531114'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD "caseSensitive" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`ALTER TYPE "public"."antenna_src_enum" RENAME TO "antenna_src_enum_old"`, undefined); - await queryRunner.query(`CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'users', 'list')`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum" USING "src"::"text"::"antenna_src_enum"`, undefined); - await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'list')`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum_old" USING "src"::"text"::"antenna_src_enum_old"`, undefined); - await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); - await queryRunner.query(`ALTER TYPE "antenna_src_enum_old" RENAME TO "antenna_src_enum"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "caseSensitive"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "users"`, undefined); - } + constructor() { + this.name = "v1271580069531114"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD "caseSensitive" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `ALTER TYPE "public"."antenna_src_enum" RENAME TO "antenna_src_enum_old"`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'users', 'list')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum" USING "src"::"text"::"antenna_src_enum"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined); + } + async down(queryRunner) { + await queryRunner.query( + `CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'list')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum_old" USING "src"::"text"::"antenna_src_enum_old"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); + await queryRunner.query( + `ALTER TYPE "antenna_src_enum_old" RENAME TO "antenna_src_enum"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "caseSensitive"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "users"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580148575182-v12-8.js b/packages/backend/migration/1580148575182-v12-8.js index cc30200c14..11b792b7ea 100644 --- a/packages/backend/migration/1580148575182-v12-8.js +++ b/packages/backend/migration/1580148575182-v12-8.js @@ -1,15 +1,25 @@ - - export class v1281580148575182 { - constructor() { - this.name = 'v1281580148575182'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`, undefined); - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "appId"`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" ADD "appId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_ec5c201576192ba8904c345c5cc" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, undefined); - } + constructor() { + this.name = "v1281580148575182"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_ec5c201576192ba8904c345c5cc"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP COLUMN "appId"`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note" ADD "appId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_ec5c201576192ba8904c345c5cc" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580154400017-v12-9.js b/packages/backend/migration/1580154400017-v12-9.js index 3715798f19..19f8be0958 100644 --- a/packages/backend/migration/1580154400017-v12-9.js +++ b/packages/backend/migration/1580154400017-v12-9.js @@ -1,13 +1,17 @@ - - export class v1291580154400017 { - constructor() { - this.name = 'v1291580154400017'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" ADD "withReplies" boolean NOT NULL DEFAULT false`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "withReplies"`, undefined); - } + constructor() { + this.name = "v1291580154400017"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" ADD "withReplies" boolean NOT NULL DEFAULT false`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "withReplies"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580276619901-v12-10.js b/packages/backend/migration/1580276619901-v12-10.js index d5decb882e..e5dd1db5e5 100644 --- a/packages/backend/migration/1580276619901-v12-10.js +++ b/packages/backend/migration/1580276619901-v12-10.js @@ -1,18 +1,31 @@ - - export class v12101580276619901 { - constructor() { - this.name = 'v12101580276619901'; - } - async up(queryRunner) { - await queryRunner.query(`TRUNCATE TABLE "notification"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "type"`, undefined); - await queryRunner.query(`CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted')`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "type" "notification_type_enum" NOT NULL`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "type"`, undefined); - await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "type" character varying(32) NOT NULL`, undefined); - } + constructor() { + this.name = "v12101580276619901"; + } + async up(queryRunner) { + await queryRunner.query(`TRUNCATE TABLE "notification"`, undefined); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "type"`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD "type" "notification_type_enum" NOT NULL`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "type"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); + await queryRunner.query( + `ALTER TABLE "notification" ADD "type" character varying(32) NOT NULL`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580331224276-v12-11.js b/packages/backend/migration/1580331224276-v12-11.js index 129720adbf..c31dca1758 100644 --- a/packages/backend/migration/1580331224276-v12-11.js +++ b/packages/backend/migration/1580331224276-v12-11.js @@ -1,17 +1,33 @@ - - export class v12111580331224276 { - constructor() { - this.name = 'v12111580331224276'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "isMarkedAsClosed"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "isSuspended" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_34500da2e38ac393f7bb6b299c" ON "instance" ("isSuspended") `, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_34500da2e38ac393f7bb6b299c"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "isSuspended"`, undefined); - await queryRunner.query(`ALTER TABLE "instance" ADD "isMarkedAsClosed" boolean NOT NULL DEFAULT false`, undefined); - } + constructor() { + this.name = "v12111580331224276"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "isMarkedAsClosed"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "isSuspended" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_34500da2e38ac393f7bb6b299c" ON "instance" ("isSuspended") `, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "IDX_34500da2e38ac393f7bb6b299c"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" DROP COLUMN "isSuspended"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "isMarkedAsClosed" boolean NOT NULL DEFAULT false`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580508795118-v12-12.js b/packages/backend/migration/1580508795118-v12-12.js index c5cec23a36..6df1b8f8a9 100644 --- a/packages/backend/migration/1580508795118-v12-12.js +++ b/packages/backend/migration/1580508795118-v12-12.js @@ -1,45 +1,145 @@ - - export class v12121580508795118 { - constructor() { - this.name = 'v12121580508795118'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "twitter"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "twitterAccessToken"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "twitterAccessTokenSecret"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "twitterUserId"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "twitterScreenName"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "github"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "githubAccessToken"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "githubId"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "githubLogin"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discord"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordAccessToken"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordRefreshToken"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordExpiresDate"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordId"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordUsername"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "discordDiscriminator"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "integrations" jsonb NOT NULL DEFAULT '{}'`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "integrations"`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordDiscriminator" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordUsername" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordId" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordExpiresDate" character varying(64)`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordRefreshToken" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discordAccessToken" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "discord" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "githubLogin" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "githubId" character varying(64)`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "githubAccessToken" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "github" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "twitterScreenName" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "twitterUserId" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "twitterAccessTokenSecret" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "twitterAccessToken" character varying(64) DEFAULT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "twitter" boolean NOT NULL DEFAULT false`, undefined); - } + constructor() { + this.name = "v12121580508795118"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "twitter"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "twitterAccessToken"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "twitterAccessTokenSecret"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "twitterUserId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "twitterScreenName"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "github"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "githubAccessToken"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "githubId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "githubLogin"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discord"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordAccessToken"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordRefreshToken"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordExpiresDate"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordUsername"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "discordDiscriminator"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "integrations" jsonb NOT NULL DEFAULT '{}'`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "integrations"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordDiscriminator" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordUsername" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordId" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordExpiresDate" character varying(64)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordRefreshToken" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discordAccessToken" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "discord" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "githubLogin" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "githubId" character varying(64)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "githubAccessToken" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "github" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "twitterScreenName" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "twitterUserId" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "twitterAccessTokenSecret" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "twitterAccessToken" character varying(64) DEFAULT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "twitter" boolean NOT NULL DEFAULT false`, + undefined, + ); + } } diff --git a/packages/backend/migration/1580543501339-v12-13.js b/packages/backend/migration/1580543501339-v12-13.js index 2fa490392d..fd4d131518 100644 --- a/packages/backend/migration/1580543501339-v12-13.js +++ b/packages/backend/migration/1580543501339-v12-13.js @@ -1,13 +1,14 @@ - - export class v12131580543501339 { - constructor() { - this.name = 'v12131580543501339'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_NOTE_TAGS" ON "note" USING gin ("tags")`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_NOTE_TAGS"`, undefined); - } + constructor() { + this.name = "v12131580543501339"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_NOTE_TAGS" ON "note" USING gin ("tags")`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_NOTE_TAGS"`, undefined); + } } diff --git a/packages/backend/migration/1580864313253-v12-14.js b/packages/backend/migration/1580864313253-v12-14.js index a3756ad029..47f778e1d7 100644 --- a/packages/backend/migration/1580864313253-v12-14.js +++ b/packages/backend/migration/1580864313253-v12-14.js @@ -1,19 +1,41 @@ - - export class v12141580864313253 { - constructor() { - this.name = 'v12141580864313253'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" RENAME COLUMN "proxyAccount" TO "proxyAccountId"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "proxyAccountId"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "proxyAccountId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad" FOREIGN KEY ("proxyAccountId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "proxyAccountId"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "proxyAccountId" character varying(128)`, undefined); - await queryRunner.query(`ALTER TABLE "meta" RENAME COLUMN "proxyAccountId" TO "proxyAccount"`, undefined); - } + constructor() { + this.name = "v12141580864313253"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" RENAME COLUMN "proxyAccount" TO "proxyAccountId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "proxyAccountId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "proxyAccountId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad" FOREIGN KEY ("proxyAccountId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP CONSTRAINT "FK_ab1bc0c1e209daa77b8e8d212ad"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "proxyAccountId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "proxyAccountId" character varying(128)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" RENAME COLUMN "proxyAccountId" TO "proxyAccount"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1581526429287-user-group-invitation.js b/packages/backend/migration/1581526429287-user-group-invitation.js index 181b0aba86..e327816ea7 100644 --- a/packages/backend/migration/1581526429287-user-group-invitation.js +++ b/packages/backend/migration/1581526429287-user-group-invitation.js @@ -1,37 +1,107 @@ - - export class userGroupInvitation1581526429287 { - constructor() { - this.name = 'userGroupInvitation1581526429287'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "user_group_invitation" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_160c63ec02bf23f6a5c5e8140d6" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_bfbc6305547539369fe73eb144" ON "user_group_invitation" ("userId") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_5cc8c468090e129857e9fecce5" ON "user_group_invitation" ("userGroupId") `, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e9793f65f504e5a31fbaedbf2f" ON "user_group_invitation" ("userId", "userGroupId") `, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "userGroupInvitationId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, undefined); - await queryRunner.query(`CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited')`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum" USING "type"::"text"::"notification_type_enum"`, undefined); - await queryRunner.query(`DROP TYPE "notification_type_enum_old"`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS 'The type of the Notification.'`, undefined); - await queryRunner.query(`ALTER TABLE "user_group_invitation" ADD CONSTRAINT "FK_bfbc6305547539369fe73eb144a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "user_group_invitation" ADD CONSTRAINT "FK_5cc8c468090e129857e9fecce5a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_8fe87814e978053a53b1beb7e98" FOREIGN KEY ("userGroupInvitationId") REFERENCES "user_group_invitation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_8fe87814e978053a53b1beb7e98"`, undefined); - await queryRunner.query(`ALTER TABLE "user_group_invitation" DROP CONSTRAINT "FK_5cc8c468090e129857e9fecce5a"`, undefined); - await queryRunner.query(`ALTER TABLE "user_group_invitation" DROP CONSTRAINT "FK_bfbc6305547539369fe73eb144a"`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS ''`, undefined); - await queryRunner.query(`CREATE TYPE "notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted')`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum_old" USING "type"::"text"::"notification_type_enum_old"`, undefined); - await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); - await queryRunner.query(`ALTER TYPE "notification_type_enum_old" RENAME TO "notification_type_enum"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "userGroupInvitationId"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_e9793f65f504e5a31fbaedbf2f"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_5cc8c468090e129857e9fecce5"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_bfbc6305547539369fe73eb144"`, undefined); - await queryRunner.query(`DROP TABLE "user_group_invitation"`, undefined); - } + constructor() { + this.name = "userGroupInvitation1581526429287"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "user_group_invitation" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_160c63ec02bf23f6a5c5e8140d6" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bfbc6305547539369fe73eb144" ON "user_group_invitation" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5cc8c468090e129857e9fecce5" ON "user_group_invitation" ("userGroupId") `, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e9793f65f504e5a31fbaedbf2f" ON "user_group_invitation" ("userId", "userGroupId") `, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD "userGroupInvitationId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum" USING "type"::"text"::"notification_type_enum"`, + undefined, + ); + await queryRunner.query( + `DROP TYPE "notification_type_enum_old"`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."type" IS 'The type of the Notification.'`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" ADD CONSTRAINT "FK_bfbc6305547539369fe73eb144a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" ADD CONSTRAINT "FK_5cc8c468090e129857e9fecce5a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_8fe87814e978053a53b1beb7e98" FOREIGN KEY ("userGroupInvitationId") REFERENCES "user_group_invitation"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_8fe87814e978053a53b1beb7e98"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" DROP CONSTRAINT "FK_5cc8c468090e129857e9fecce5a"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" DROP CONSTRAINT "FK_bfbc6305547539369fe73eb144a"`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."type" IS ''`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum_old" USING "type"::"text"::"notification_type_enum_old"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); + await queryRunner.query( + `ALTER TYPE "notification_type_enum_old" RENAME TO "notification_type_enum"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "userGroupInvitationId"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_e9793f65f504e5a31fbaedbf2f"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_5cc8c468090e129857e9fecce5"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_bfbc6305547539369fe73eb144"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "user_group_invitation"`, undefined); + } } diff --git a/packages/backend/migration/1581695816408-user-group-antenna.js b/packages/backend/migration/1581695816408-user-group-antenna.js index 267b58cd9b..28112767e7 100644 --- a/packages/backend/migration/1581695816408-user-group-antenna.js +++ b/packages/backend/migration/1581695816408-user-group-antenna.js @@ -1,27 +1,67 @@ - - export class userGroupAntenna1581695816408 { - constructor() { - this.name = 'userGroupAntenna1581695816408'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" ADD "userGroupJoiningId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TYPE "public"."antenna_src_enum" RENAME TO "antenna_src_enum_old"`, undefined); - await queryRunner.query(`CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'users', 'list', 'group')`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum" USING "src"::"text"::"antenna_src_enum"`, undefined); - await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "users"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb" FOREIGN KEY ("userGroupJoiningId") REFERENCES "user_group_joining"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" DROP CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "users"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ADD "users" character varying array NOT NULL DEFAULT '{}'`, undefined); - await queryRunner.query(`CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'users', 'list')`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum_old" USING "src"::"text"::"antenna_src_enum_old"`, undefined); - await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); - await queryRunner.query(`ALTER TYPE "antenna_src_enum_old" RENAME TO "antenna_src_enum"`, undefined); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "userGroupJoiningId"`, undefined); - } + constructor() { + this.name = "userGroupAntenna1581695816408"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" ADD "userGroupJoiningId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TYPE "public"."antenna_src_enum" RENAME TO "antenna_src_enum_old"`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "antenna_src_enum" AS ENUM('home', 'all', 'users', 'list', 'group')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum" USING "src"::"text"::"antenna_src_enum"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "antenna_src_enum_old"`, undefined); + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "users"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD "users" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[]`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb" FOREIGN KEY ("userGroupJoiningId") REFERENCES "user_group_joining"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" DROP CONSTRAINT "FK_ccbf5a8c0be4511133dcc50ddeb"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "users"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD "users" character varying array NOT NULL DEFAULT '{}'`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "antenna_src_enum_old" AS ENUM('home', 'all', 'users', 'list')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "antenna_src_enum_old" USING "src"::"text"::"antenna_src_enum_old"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "antenna_src_enum"`, undefined); + await queryRunner.query( + `ALTER TYPE "antenna_src_enum_old" RENAME TO "antenna_src_enum"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "userGroupJoiningId"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1581708415836-drive-user-folder-id-index.js b/packages/backend/migration/1581708415836-drive-user-folder-id-index.js index 43c2ce6cee..41902dc53f 100644 --- a/packages/backend/migration/1581708415836-drive-user-folder-id-index.js +++ b/packages/backend/migration/1581708415836-drive-user-folder-id-index.js @@ -1,13 +1,17 @@ - - export class driveUserFolderIdIndex1581708415836 { - constructor() { - this.name = 'driveUserFolderIdIndex1581708415836'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_55720b33a61a7c806a8215b825" ON "drive_file" ("userId", "folderId", "id") `, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_55720b33a61a7c806a8215b825"`, undefined); - } + constructor() { + this.name = "driveUserFolderIdIndex1581708415836"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_55720b33a61a7c806a8215b825" ON "drive_file" ("userId", "folderId", "id") `, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "IDX_55720b33a61a7c806a8215b825"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1581979837262-promo.js b/packages/backend/migration/1581979837262-promo.js index 4813a5f480..39e79965b7 100644 --- a/packages/backend/migration/1581979837262-promo.js +++ b/packages/backend/migration/1581979837262-promo.js @@ -1,27 +1,67 @@ - - export class promo1581979837262 { - constructor() { - this.name = 'promo1581979837262'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "promo_note" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "REL_e263909ca4fe5d57f8d4230dd5" UNIQUE ("noteId"), CONSTRAINT "PK_e263909ca4fe5d57f8d4230dd5c" PRIMARY KEY ("noteId"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_83f0862e9bae44af52ced7099e" ON "promo_note" ("userId") `, undefined); - await queryRunner.query(`CREATE TABLE "promo_read" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_61917c1541002422b703318b7c9" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_9657d55550c3d37bfafaf7d4b0" ON "promo_read" ("userId") `, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_2882b8a1a07c7d281a98b6db16" ON "promo_read" ("userId", "noteId") `, undefined); - await queryRunner.query(`ALTER TABLE "promo_note" ADD CONSTRAINT "FK_e263909ca4fe5d57f8d4230dd5c" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "promo_read" ADD CONSTRAINT "FK_9657d55550c3d37bfafaf7d4b05" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "promo_read" ADD CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "promo_read" DROP CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4"`, undefined); - await queryRunner.query(`ALTER TABLE "promo_read" DROP CONSTRAINT "FK_9657d55550c3d37bfafaf7d4b05"`, undefined); - await queryRunner.query(`ALTER TABLE "promo_note" DROP CONSTRAINT "FK_e263909ca4fe5d57f8d4230dd5c"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_2882b8a1a07c7d281a98b6db16"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_9657d55550c3d37bfafaf7d4b0"`, undefined); - await queryRunner.query(`DROP TABLE "promo_read"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_83f0862e9bae44af52ced7099e"`, undefined); - await queryRunner.query(`DROP TABLE "promo_note"`, undefined); - } + constructor() { + this.name = "promo1581979837262"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "promo_note" ("noteId" character varying(32) NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "REL_e263909ca4fe5d57f8d4230dd5" UNIQUE ("noteId"), CONSTRAINT "PK_e263909ca4fe5d57f8d4230dd5c" PRIMARY KEY ("noteId"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_83f0862e9bae44af52ced7099e" ON "promo_note" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "promo_read" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_61917c1541002422b703318b7c9" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9657d55550c3d37bfafaf7d4b0" ON "promo_read" ("userId") `, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_2882b8a1a07c7d281a98b6db16" ON "promo_read" ("userId", "noteId") `, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "promo_note" ADD CONSTRAINT "FK_e263909ca4fe5d57f8d4230dd5c" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "promo_read" ADD CONSTRAINT "FK_9657d55550c3d37bfafaf7d4b05" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "promo_read" ADD CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "promo_read" DROP CONSTRAINT "FK_a46a1a603ecee695d7db26da5f4"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "promo_read" DROP CONSTRAINT "FK_9657d55550c3d37bfafaf7d4b05"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "promo_note" DROP CONSTRAINT "FK_e263909ca4fe5d57f8d4230dd5c"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_2882b8a1a07c7d281a98b6db16"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_9657d55550c3d37bfafaf7d4b0"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "promo_read"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_83f0862e9bae44af52ced7099e"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "promo_note"`, undefined); + } } diff --git a/packages/backend/migration/1582019042083-featured-injecttion.js b/packages/backend/migration/1582019042083-featured-injecttion.js index 7f8790b01b..61b7d0c272 100644 --- a/packages/backend/migration/1582019042083-featured-injecttion.js +++ b/packages/backend/migration/1582019042083-featured-injecttion.js @@ -1,13 +1,17 @@ - - export class featuredInjecttion1582019042083 { - constructor() { - this.name = 'featuredInjecttion1582019042083'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "injectFeaturedNote" boolean NOT NULL DEFAULT true`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "injectFeaturedNote"`, undefined); - } + constructor() { + this.name = "featuredInjecttion1582019042083"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "injectFeaturedNote" boolean NOT NULL DEFAULT true`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "injectFeaturedNote"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1582210532752-antenna-exclude.js b/packages/backend/migration/1582210532752-antenna-exclude.js index ff8d7b80d8..5a394270ef 100644 --- a/packages/backend/migration/1582210532752-antenna-exclude.js +++ b/packages/backend/migration/1582210532752-antenna-exclude.js @@ -1,13 +1,17 @@ - - export class antennaExclude1582210532752 { - constructor() { - this.name = 'antennaExclude1582210532752'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" ADD "excludeKeywords" jsonb NOT NULL DEFAULT '[]'`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "excludeKeywords"`, undefined); - } + constructor() { + this.name = "antennaExclude1582210532752"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" ADD "excludeKeywords" jsonb NOT NULL DEFAULT '[]'`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "antenna" DROP COLUMN "excludeKeywords"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1582875306439-note-reaction-length.js b/packages/backend/migration/1582875306439-note-reaction-length.js index e99501f012..2c9b726732 100644 --- a/packages/backend/migration/1582875306439-note-reaction-length.js +++ b/packages/backend/migration/1582875306439-note-reaction-length.js @@ -1,13 +1,17 @@ - - export class noteReactionLength1582875306439 { - constructor() { - this.name = 'noteReactionLength1582875306439'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(128)`, undefined); - } + constructor() { + this.name = "noteReactionLength1582875306439"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(128)`, + undefined, + ); + } } diff --git a/packages/backend/migration/1585361548360-miauth.js b/packages/backend/migration/1585361548360-miauth.js index e59aa3b6ef..2e052cb89a 100644 --- a/packages/backend/migration/1585361548360-miauth.js +++ b/packages/backend/migration/1585361548360-miauth.js @@ -1,35 +1,105 @@ - - export class miauth1585361548360 { - constructor() { - this.name = 'miauth1585361548360'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "access_token" ADD "lastUsedAt" TIMESTAMP WITH TIME ZONE DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "session" character varying(128) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "name" character varying(128) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "description" character varying(512) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "iconUrl" character varying(512) DEFAULT null`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "permission" character varying(64) array NOT NULL DEFAULT '{}'::varchar[]`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD "fetched" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" DROP NOT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" SET DEFAULT null`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_bf3a053c07d9fb5d87317c56ee" ON "access_token" ("session") `, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_bf3a053c07d9fb5d87317c56ee"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" DROP DEFAULT`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" SET NOT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "fetched"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "permission"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "iconUrl"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "description"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "name"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "session"`, undefined); - await queryRunner.query(`ALTER TABLE "access_token" DROP COLUMN "lastUsedAt"`, undefined); - } + constructor() { + this.name = "miauth1585361548360"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "access_token" ADD "lastUsedAt" TIMESTAMP WITH TIME ZONE DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "session" character varying(128) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "name" character varying(128) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "description" character varying(512) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "iconUrl" character varying(512) DEFAULT null`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "permission" character varying(64) array NOT NULL DEFAULT '{}'::varchar[]`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD "fetched" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "appId" DROP NOT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "appId" SET DEFAULT null`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bf3a053c07d9fb5d87317c56ee" ON "access_token" ("session") `, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "access_token" DROP CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_bf3a053c07d9fb5d87317c56ee"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "appId" DROP DEFAULT`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "appId" SET NOT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ADD CONSTRAINT "FK_a3ff16c90cc87a82a0b5959e560" FOREIGN KEY ("appId") REFERENCES "app"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "fetched"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "permission"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "iconUrl"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "description"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "name"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "session"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "access_token" DROP COLUMN "lastUsedAt"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1585385921215-custom-notification.js b/packages/backend/migration/1585385921215-custom-notification.js index c3ddb2be17..23142cd3a8 100644 --- a/packages/backend/migration/1585385921215-custom-notification.js +++ b/packages/backend/migration/1585385921215-custom-notification.js @@ -1,47 +1,150 @@ - - export class customNotification1585385921215 { - constructor() { - this.name = 'customNotification1585385921215'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" ADD "customBody" character varying(2048)`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "customHeader" character varying(256)`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "customIcon" character varying(1024)`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD "appAccessTokenId" character varying(32)`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "notifierId" DROP NOT NULL`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."notifierId" IS 'The ID of sender user of the Notification.'`, undefined); - await queryRunner.query(`ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, undefined); - await queryRunner.query(`CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum" USING "type"::"text"::"notification_type_enum"`, undefined); - await queryRunner.query(`DROP TYPE "notification_type_enum_old"`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS 'The type of the Notification.'`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71" ON "notification" ("notifierId") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_33f33cc8ef29d805a97ff4628b" ON "notification" ("type") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_080ab397c379af09b9d2169e5b" ON "notification" ("isRead") `, undefined); - await queryRunner.query(`CREATE INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c" ON "notification" ("appAccessTokenId") `, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9" FOREIGN KEY ("appAccessTokenId") REFERENCES "access_token"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_080ab397c379af09b9d2169e5b"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_33f33cc8ef29d805a97ff4628b"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71"`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."type" IS ''`, undefined); - await queryRunner.query(`CREATE TYPE "notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited')`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum_old" USING "type"::"text"::"notification_type_enum_old"`, undefined); - await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); - await queryRunner.query(`ALTER TYPE "notification_type_enum_old" RENAME TO "notification_type_enum"`, undefined); - await queryRunner.query(`COMMENT ON COLUMN "notification"."notifierId" IS ''`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "notifierId" SET NOT NULL`, undefined); - await queryRunner.query(`ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "appAccessTokenId"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customIcon"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customHeader"`, undefined); - await queryRunner.query(`ALTER TABLE "notification" DROP COLUMN "customBody"`, undefined); - } + constructor() { + this.name = "customNotification1585385921215"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" ADD "customBody" character varying(2048)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD "customHeader" character varying(256)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD "customIcon" character varying(1024)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD "appAccessTokenId" character varying(32)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "notifierId" DROP NOT NULL`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."notifierId" IS 'The ID of sender user of the Notification.'`, + undefined, + ); + await queryRunner.query( + `ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum" USING "type"::"text"::"notification_type_enum"`, + undefined, + ); + await queryRunner.query( + `DROP TYPE "notification_type_enum_old"`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."type" IS 'The type of the Notification.'`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71" ON "notification" ("notifierId") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_33f33cc8ef29d805a97ff4628b" ON "notification" ("type") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_080ab397c379af09b9d2169e5b" ON "notification" ("isRead") `, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c" ON "notification" ("appAccessTokenId") `, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9" FOREIGN KEY ("appAccessTokenId") REFERENCES "access_token"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_e22bf6bda77b6adc1fd9e75c8c9"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_e22bf6bda77b6adc1fd9e75c8c"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_080ab397c379af09b9d2169e5b"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_33f33cc8ef29d805a97ff4628b"`, + undefined, + ); + await queryRunner.query( + `DROP INDEX "IDX_3b4e96eec8d36a8bbb9d02aa71"`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."type" IS ''`, + undefined, + ); + await queryRunner.query( + `CREATE TYPE "notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited')`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "notification_type_enum_old" USING "type"::"text"::"notification_type_enum_old"`, + undefined, + ); + await queryRunner.query(`DROP TYPE "notification_type_enum"`, undefined); + await queryRunner.query( + `ALTER TYPE "notification_type_enum_old" RENAME TO "notification_type_enum"`, + undefined, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."notifierId" IS ''`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "notifierId" SET NOT NULL`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" ADD CONSTRAINT "FK_3b4e96eec8d36a8bbb9d02aa710" FOREIGN KEY ("notifierId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "appAccessTokenId"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "customIcon"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "customHeader"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "notification" DROP COLUMN "customBody"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1585772678853-ap-url.js b/packages/backend/migration/1585772678853-ap-url.js index 5fb809ff53..18cc4588e6 100644 --- a/packages/backend/migration/1585772678853-ap-url.js +++ b/packages/backend/migration/1585772678853-ap-url.js @@ -1,13 +1,14 @@ - - export class apUrl1585772678853 { - constructor() { - this.name = 'apUrl1585772678853'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" ADD "url" character varying(512)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "url"`, undefined); - } + constructor() { + this.name = "apUrl1585772678853"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note" ADD "url" character varying(512)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "url"`, undefined); + } } diff --git a/packages/backend/migration/1586624197029-AddObjectStorageUseProxy.js b/packages/backend/migration/1586624197029-AddObjectStorageUseProxy.js index e13bb217e3..89694f84b2 100644 --- a/packages/backend/migration/1586624197029-AddObjectStorageUseProxy.js +++ b/packages/backend/migration/1586624197029-AddObjectStorageUseProxy.js @@ -1,13 +1,17 @@ - - export class AddObjectStorageUseProxy1586624197029 { - constructor() { - this.name = 'AddObjectStorageUseProxy1586624197029'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageUseProxy" boolean NOT NULL DEFAULT true`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageUseProxy"`, undefined); - } + constructor() { + this.name = "AddObjectStorageUseProxy1586624197029"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageUseProxy" boolean NOT NULL DEFAULT true`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageUseProxy"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1586641139527-remote-reaction.js b/packages/backend/migration/1586641139527-remote-reaction.js index 5b23103a17..d7390544c4 100644 --- a/packages/backend/migration/1586641139527-remote-reaction.js +++ b/packages/backend/migration/1586641139527-remote-reaction.js @@ -1,13 +1,17 @@ - - export class remoteReaction1586641139527 { - constructor() { - this.name = 'remoteReaction1586641139527'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(260)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, undefined); - } + constructor() { + this.name = "remoteReaction1586641139527"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(260)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, + undefined, + ); + } } diff --git a/packages/backend/migration/1586708940386-pageAiScript.js b/packages/backend/migration/1586708940386-pageAiScript.js index eed616c111..25eb710988 100644 --- a/packages/backend/migration/1586708940386-pageAiScript.js +++ b/packages/backend/migration/1586708940386-pageAiScript.js @@ -1,13 +1,17 @@ - - export class pageAiScript1586708940386 { - constructor() { - this.name = 'pageAiScript1586708940386'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" ADD "script" character varying(16384) NOT NULL DEFAULT ''`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "script"`, undefined); - } + constructor() { + this.name = "pageAiScript1586708940386"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page" ADD "script" character varying(16384) NOT NULL DEFAULT ''`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "page" DROP COLUMN "script"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1588044505511-hCaptcha.js b/packages/backend/migration/1588044505511-hCaptcha.js index a33dbd7133..29ba87370f 100644 --- a/packages/backend/migration/1588044505511-hCaptcha.js +++ b/packages/backend/migration/1588044505511-hCaptcha.js @@ -1,17 +1,33 @@ - - export class hCaptcha1588044505511 { - constructor() { - this.name = 'hCaptcha1588044505511'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "enableHcaptcha" boolean NOT NULL DEFAULT false`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "hcaptchaSiteKey" character varying(64)`, undefined); - await queryRunner.query(`ALTER TABLE "meta" ADD "hcaptchaSecretKey" character varying(64)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "hcaptchaSecretKey"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "hcaptchaSiteKey"`, undefined); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableHcaptcha"`, undefined); - } + constructor() { + this.name = "hCaptcha1588044505511"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableHcaptcha" boolean NOT NULL DEFAULT false`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "hcaptchaSiteKey" character varying(64)`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "hcaptchaSecretKey" character varying(64)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "hcaptchaSecretKey"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "hcaptchaSiteKey"`, + undefined, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "enableHcaptcha"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1589023282116-pubRelay.js b/packages/backend/migration/1589023282116-pubRelay.js index 48a1028d39..a1a2299192 100644 --- a/packages/backend/migration/1589023282116-pubRelay.js +++ b/packages/backend/migration/1589023282116-pubRelay.js @@ -1,17 +1,27 @@ - - export class pubRelay1589023282116 { - constructor() { - this.name = 'pubRelay1589023282116'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "relay_status_enum" AS ENUM('requesting', 'accepted', 'rejected')`, undefined); - await queryRunner.query(`CREATE TABLE "relay" ("id" character varying(32) NOT NULL, "inbox" character varying(512) NOT NULL, "status" "relay_status_enum" NOT NULL, CONSTRAINT "PK_78ebc9cfddf4292633b7ba57aee" PRIMARY KEY ("id"))`, undefined); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab" ON "relay" ("inbox") `, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab"`, undefined); - await queryRunner.query(`DROP TABLE "relay"`, undefined); - await queryRunner.query(`DROP TYPE "relay_status_enum"`, undefined); - } + constructor() { + this.name = "pubRelay1589023282116"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "relay_status_enum" AS ENUM('requesting', 'accepted', 'rejected')`, + undefined, + ); + await queryRunner.query( + `CREATE TABLE "relay" ("id" character varying(32) NOT NULL, "inbox" character varying(512) NOT NULL, "status" "relay_status_enum" NOT NULL, CONSTRAINT "PK_78ebc9cfddf4292633b7ba57aee" PRIMARY KEY ("id"))`, + undefined, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab" ON "relay" ("inbox") `, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "IDX_0d9a1738f2cf7f3b1c3334dfab"`, + undefined, + ); + await queryRunner.query(`DROP TABLE "relay"`, undefined); + await queryRunner.query(`DROP TYPE "relay_status_enum"`, undefined); + } } diff --git a/packages/backend/migration/1595075960584-blurhash.js b/packages/backend/migration/1595075960584-blurhash.js index f24d3722cf..50660cd055 100644 --- a/packages/backend/migration/1595075960584-blurhash.js +++ b/packages/backend/migration/1595075960584-blurhash.js @@ -1,13 +1,13 @@ - - export class blurhash1595075960584 { - constructor() { - this.name = 'blurhash1595075960584'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" ADD "blurhash" character varying(128)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "blurhash"`); - } + constructor() { + this.name = "blurhash1595075960584"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "blurhash" character varying(128)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "blurhash"`); + } } diff --git a/packages/backend/migration/1595077605646-blurhash-for-avatar-banner.js b/packages/backend/migration/1595077605646-blurhash-for-avatar-banner.js index f18f6f972a..612ab648cb 100644 --- a/packages/backend/migration/1595077605646-blurhash-for-avatar-banner.js +++ b/packages/backend/migration/1595077605646-blurhash-for-avatar-banner.js @@ -1,19 +1,25 @@ - - export class blurhashForAvatarBanner1595077605646 { - constructor() { - this.name = 'blurhashForAvatarBanner1595077605646'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarColor"`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerColor"`); - await queryRunner.query(`ALTER TABLE "user" ADD "avatarBlurhash" character varying(128)`); - await queryRunner.query(`ALTER TABLE "user" ADD "bannerBlurhash" character varying(128)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerBlurhash"`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarBlurhash"`); - await queryRunner.query(`ALTER TABLE "user" ADD "bannerColor" character varying(32)`); - await queryRunner.query(`ALTER TABLE "user" ADD "avatarColor" character varying(32)`); - } + constructor() { + this.name = "blurhashForAvatarBanner1595077605646"; + } + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarColor"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerColor"`); + await queryRunner.query( + `ALTER TABLE "user" ADD "avatarBlurhash" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "user" ADD "bannerBlurhash" character varying(128)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "bannerBlurhash"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "avatarBlurhash"`); + await queryRunner.query( + `ALTER TABLE "user" ADD "bannerColor" character varying(32)`, + ); + await queryRunner.query( + `ALTER TABLE "user" ADD "avatarColor" character varying(32)`, + ); + } } diff --git a/packages/backend/migration/1595676934834-instance-icon-url.js b/packages/backend/migration/1595676934834-instance-icon-url.js index df9d8199bd..c228b14b6c 100644 --- a/packages/backend/migration/1595676934834-instance-icon-url.js +++ b/packages/backend/migration/1595676934834-instance-icon-url.js @@ -1,13 +1,13 @@ - - export class instanceIconUrl1595676934834 { - constructor() { - this.name = 'instanceIconUrl1595676934834'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" ADD "iconUrl" character varying(256) DEFAULT null`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "iconUrl"`); - } + constructor() { + this.name = "instanceIconUrl1595676934834"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" ADD "iconUrl" character varying(256) DEFAULT null`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "iconUrl"`); + } } diff --git a/packages/backend/migration/1595771249699-word-mute.js b/packages/backend/migration/1595771249699-word-mute.js index e8e4ac838b..0a8a63294d 100644 --- a/packages/backend/migration/1595771249699-word-mute.js +++ b/packages/backend/migration/1595771249699-word-mute.js @@ -1,29 +1,53 @@ - - export class wordMute1595771249699 { - constructor() { - this.name = 'wordMute1595771249699'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "muted_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_897e2eff1c0b9b64e55ca1418a4" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_70ab9786313d78e4201d81cdb8" ON "muted_note" ("noteId") `); - await queryRunner.query(`CREATE INDEX "IDX_d8e07aa18c2d64e86201601aec" ON "muted_note" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a8c6bfd637d3f1d67a27c48e27" ON "muted_note" ("noteId", "userId") `); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "enableWordMute" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "mutedWords" jsonb NOT NULL DEFAULT '[]'`); - await queryRunner.query(`CREATE INDEX "IDX_3befe6f999c86aff06eb0257b4" ON "user_profile" ("enableWordMute") `); - await queryRunner.query(`ALTER TABLE "muted_note" ADD CONSTRAINT "FK_70ab9786313d78e4201d81cdb89" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "muted_note" ADD CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "muted_note" DROP CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1"`); - await queryRunner.query(`ALTER TABLE "muted_note" DROP CONSTRAINT "FK_70ab9786313d78e4201d81cdb89"`); - await queryRunner.query(`DROP INDEX "IDX_3befe6f999c86aff06eb0257b4"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "mutedWords"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "enableWordMute"`); - await queryRunner.query(`DROP INDEX "IDX_a8c6bfd637d3f1d67a27c48e27"`); - await queryRunner.query(`DROP INDEX "IDX_d8e07aa18c2d64e86201601aec"`); - await queryRunner.query(`DROP INDEX "IDX_70ab9786313d78e4201d81cdb8"`); - await queryRunner.query(`DROP TABLE "muted_note"`); - } + constructor() { + this.name = "wordMute1595771249699"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "muted_note" ("id" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_897e2eff1c0b9b64e55ca1418a4" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_70ab9786313d78e4201d81cdb8" ON "muted_note" ("noteId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d8e07aa18c2d64e86201601aec" ON "muted_note" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a8c6bfd637d3f1d67a27c48e27" ON "muted_note" ("noteId", "userId") `, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "enableWordMute" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "mutedWords" jsonb NOT NULL DEFAULT '[]'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3befe6f999c86aff06eb0257b4" ON "user_profile" ("enableWordMute") `, + ); + await queryRunner.query( + `ALTER TABLE "muted_note" ADD CONSTRAINT "FK_70ab9786313d78e4201d81cdb89" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "muted_note" ADD CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "muted_note" DROP CONSTRAINT "FK_d8e07aa18c2d64e86201601aec1"`, + ); + await queryRunner.query( + `ALTER TABLE "muted_note" DROP CONSTRAINT "FK_70ab9786313d78e4201d81cdb89"`, + ); + await queryRunner.query(`DROP INDEX "IDX_3befe6f999c86aff06eb0257b4"`); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "mutedWords"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "enableWordMute"`, + ); + await queryRunner.query(`DROP INDEX "IDX_a8c6bfd637d3f1d67a27c48e27"`); + await queryRunner.query(`DROP INDEX "IDX_d8e07aa18c2d64e86201601aec"`); + await queryRunner.query(`DROP INDEX "IDX_70ab9786313d78e4201d81cdb8"`); + await queryRunner.query(`DROP TABLE "muted_note"`); + } } diff --git a/packages/backend/migration/1595782306083-word-mute2.js b/packages/backend/migration/1595782306083-word-mute2.js index ab1e40a041..61f06b3474 100644 --- a/packages/backend/migration/1595782306083-word-mute2.js +++ b/packages/backend/migration/1595782306083-word-mute2.js @@ -1,17 +1,21 @@ - - export class wordMute21595782306083 { - constructor() { - this.name = 'wordMute21595782306083'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "muted_note_reason_enum" AS ENUM('word', 'manual', 'spam', 'other')`); - await queryRunner.query(`ALTER TABLE "muted_note" ADD "reason" "muted_note_reason_enum" NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_636e977ff90b23676fb5624b25" ON "muted_note" ("reason") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_636e977ff90b23676fb5624b25"`); - await queryRunner.query(`ALTER TABLE "muted_note" DROP COLUMN "reason"`); - await queryRunner.query(`DROP TYPE "muted_note_reason_enum"`); - } + constructor() { + this.name = "wordMute21595782306083"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "muted_note_reason_enum" AS ENUM('word', 'manual', 'spam', 'other')`, + ); + await queryRunner.query( + `ALTER TABLE "muted_note" ADD "reason" "muted_note_reason_enum" NOT NULL`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_636e977ff90b23676fb5624b25" ON "muted_note" ("reason") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_636e977ff90b23676fb5624b25"`); + await queryRunner.query(`ALTER TABLE "muted_note" DROP COLUMN "reason"`); + await queryRunner.query(`DROP TYPE "muted_note_reason_enum"`); + } } diff --git a/packages/backend/migration/1596548170836-channel.js b/packages/backend/migration/1596548170836-channel.js index 242db7d45a..2aaaf95503 100644 --- a/packages/backend/migration/1596548170836-channel.js +++ b/packages/backend/migration/1596548170836-channel.js @@ -1,57 +1,115 @@ - - export class channel1596548170836 { - constructor() { - this.name = 'channel1596548170836'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "channel" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "lastNotedAt" TIMESTAMP WITH TIME ZONE, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(2048), "bannerId" character varying(32), "notesCount" integer NOT NULL DEFAULT 0, "usersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_590f33ee6ee7d76437acf362e39" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_71cb7b435b7c0d4843317e7e16" ON "channel" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_29ef80c6f13bcea998447fce43" ON "channel" ("lastNotedAt") `); - await queryRunner.query(`CREATE INDEX "IDX_823bae55bd81b3be6e05cff438" ON "channel" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_0f58c11241e649d2a638a8de94" ON "channel" ("notesCount") `); - await queryRunner.query(`CREATE INDEX "IDX_094b86cd36bb805d1aa1e8cc9a" ON "channel" ("usersCount") `); - await queryRunner.query(`CREATE TABLE "channel_following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, CONSTRAINT "PK_8b104be7f7415113f2a02cd5bdd" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_11e71f2511589dcc8a4d3214f9" ON "channel_following" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_0e43068c3f92cab197c3d3cd86" ON "channel_following" ("followeeId") `); - await queryRunner.query(`CREATE INDEX "IDX_6d8084ec9496e7334a4602707e" ON "channel_following" ("followerId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_2e230dd45a10e671d781d99f3e" ON "channel_following" ("followerId", "followeeId") `); - await queryRunner.query(`CREATE TABLE "channel_note_pining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "channelId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_44f7474496bcf2e4b741681146d" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_8125f950afd3093acb10d2db8a" ON "channel_note_pining" ("channelId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_f36fed37d6d4cdcc68c803cd9c" ON "channel_note_pining" ("channelId", "noteId") `); - await queryRunner.query(`ALTER TABLE "note" ADD "channelId" character varying(32) DEFAULT null`); - await queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `); - await queryRunner.query(`ALTER TABLE "channel" ADD CONSTRAINT "FK_823bae55bd81b3be6e05cff4383" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "channel" ADD CONSTRAINT "FK_999da2bcc7efadbfe0e92d3bc19" FOREIGN KEY ("bannerId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_f22169eb10657bded6d875ac8f9" FOREIGN KEY ("channelId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "channel_following" ADD CONSTRAINT "FK_0e43068c3f92cab197c3d3cd86e" FOREIGN KEY ("followeeId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "channel_following" ADD CONSTRAINT "FK_6d8084ec9496e7334a4602707e1" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_8125f950afd3093acb10d2db8a8" FOREIGN KEY ("channelId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_10b19ef67d297ea9de325cd4502" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_10b19ef67d297ea9de325cd4502"`); - await queryRunner.query(`ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_8125f950afd3093acb10d2db8a8"`); - await queryRunner.query(`ALTER TABLE "channel_following" DROP CONSTRAINT "FK_6d8084ec9496e7334a4602707e1"`); - await queryRunner.query(`ALTER TABLE "channel_following" DROP CONSTRAINT "FK_0e43068c3f92cab197c3d3cd86e"`); - await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_f22169eb10657bded6d875ac8f9"`); - await queryRunner.query(`ALTER TABLE "channel" DROP CONSTRAINT "FK_999da2bcc7efadbfe0e92d3bc19"`); - await queryRunner.query(`ALTER TABLE "channel" DROP CONSTRAINT "FK_823bae55bd81b3be6e05cff4383"`); - await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "channelId"`); - await queryRunner.query(`DROP INDEX "IDX_f36fed37d6d4cdcc68c803cd9c"`); - await queryRunner.query(`DROP INDEX "IDX_8125f950afd3093acb10d2db8a"`); - await queryRunner.query(`DROP TABLE "channel_note_pining"`); - await queryRunner.query(`DROP INDEX "IDX_2e230dd45a10e671d781d99f3e"`); - await queryRunner.query(`DROP INDEX "IDX_6d8084ec9496e7334a4602707e"`); - await queryRunner.query(`DROP INDEX "IDX_0e43068c3f92cab197c3d3cd86"`); - await queryRunner.query(`DROP INDEX "IDX_11e71f2511589dcc8a4d3214f9"`); - await queryRunner.query(`DROP TABLE "channel_following"`); - await queryRunner.query(`DROP INDEX "IDX_094b86cd36bb805d1aa1e8cc9a"`); - await queryRunner.query(`DROP INDEX "IDX_0f58c11241e649d2a638a8de94"`); - await queryRunner.query(`DROP INDEX "IDX_823bae55bd81b3be6e05cff438"`); - await queryRunner.query(`DROP INDEX "IDX_29ef80c6f13bcea998447fce43"`); - await queryRunner.query(`DROP INDEX "IDX_71cb7b435b7c0d4843317e7e16"`); - await queryRunner.query(`DROP TABLE "channel"`); - } + constructor() { + this.name = "channel1596548170836"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "channel" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "lastNotedAt" TIMESTAMP WITH TIME ZONE, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "description" character varying(2048), "bannerId" character varying(32), "notesCount" integer NOT NULL DEFAULT 0, "usersCount" integer NOT NULL DEFAULT 0, CONSTRAINT "PK_590f33ee6ee7d76437acf362e39" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_71cb7b435b7c0d4843317e7e16" ON "channel" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_29ef80c6f13bcea998447fce43" ON "channel" ("lastNotedAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_823bae55bd81b3be6e05cff438" ON "channel" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0f58c11241e649d2a638a8de94" ON "channel" ("notesCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_094b86cd36bb805d1aa1e8cc9a" ON "channel" ("usersCount") `, + ); + await queryRunner.query( + `CREATE TABLE "channel_following" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "followeeId" character varying(32) NOT NULL, "followerId" character varying(32) NOT NULL, CONSTRAINT "PK_8b104be7f7415113f2a02cd5bdd" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_11e71f2511589dcc8a4d3214f9" ON "channel_following" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0e43068c3f92cab197c3d3cd86" ON "channel_following" ("followeeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6d8084ec9496e7334a4602707e" ON "channel_following" ("followerId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_2e230dd45a10e671d781d99f3e" ON "channel_following" ("followerId", "followeeId") `, + ); + await queryRunner.query( + `CREATE TABLE "channel_note_pining" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "channelId" character varying(32) NOT NULL, "noteId" character varying(32) NOT NULL, CONSTRAINT "PK_44f7474496bcf2e4b741681146d" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8125f950afd3093acb10d2db8a" ON "channel_note_pining" ("channelId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_f36fed37d6d4cdcc68c803cd9c" ON "channel_note_pining" ("channelId", "noteId") `, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD "channelId" character varying(32) DEFAULT null`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `, + ); + await queryRunner.query( + `ALTER TABLE "channel" ADD CONSTRAINT "FK_823bae55bd81b3be6e05cff4383" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "channel" ADD CONSTRAINT "FK_999da2bcc7efadbfe0e92d3bc19" FOREIGN KEY ("bannerId") REFERENCES "drive_file"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD CONSTRAINT "FK_f22169eb10657bded6d875ac8f9" FOREIGN KEY ("channelId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" ADD CONSTRAINT "FK_0e43068c3f92cab197c3d3cd86e" FOREIGN KEY ("followeeId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" ADD CONSTRAINT "FK_6d8084ec9496e7334a4602707e1" FOREIGN KEY ("followerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_8125f950afd3093acb10d2db8a8" FOREIGN KEY ("channelId") REFERENCES "channel"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "channel_note_pining" ADD CONSTRAINT "FK_10b19ef67d297ea9de325cd4502" FOREIGN KEY ("noteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_10b19ef67d297ea9de325cd4502"`, + ); + await queryRunner.query( + `ALTER TABLE "channel_note_pining" DROP CONSTRAINT "FK_8125f950afd3093acb10d2db8a8"`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" DROP CONSTRAINT "FK_6d8084ec9496e7334a4602707e1"`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" DROP CONSTRAINT "FK_0e43068c3f92cab197c3d3cd86e"`, + ); + await queryRunner.query( + `ALTER TABLE "note" DROP CONSTRAINT "FK_f22169eb10657bded6d875ac8f9"`, + ); + await queryRunner.query( + `ALTER TABLE "channel" DROP CONSTRAINT "FK_999da2bcc7efadbfe0e92d3bc19"`, + ); + await queryRunner.query( + `ALTER TABLE "channel" DROP CONSTRAINT "FK_823bae55bd81b3be6e05cff4383"`, + ); + await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); + await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "channelId"`); + await queryRunner.query(`DROP INDEX "IDX_f36fed37d6d4cdcc68c803cd9c"`); + await queryRunner.query(`DROP INDEX "IDX_8125f950afd3093acb10d2db8a"`); + await queryRunner.query(`DROP TABLE "channel_note_pining"`); + await queryRunner.query(`DROP INDEX "IDX_2e230dd45a10e671d781d99f3e"`); + await queryRunner.query(`DROP INDEX "IDX_6d8084ec9496e7334a4602707e"`); + await queryRunner.query(`DROP INDEX "IDX_0e43068c3f92cab197c3d3cd86"`); + await queryRunner.query(`DROP INDEX "IDX_11e71f2511589dcc8a4d3214f9"`); + await queryRunner.query(`DROP TABLE "channel_following"`); + await queryRunner.query(`DROP INDEX "IDX_094b86cd36bb805d1aa1e8cc9a"`); + await queryRunner.query(`DROP INDEX "IDX_0f58c11241e649d2a638a8de94"`); + await queryRunner.query(`DROP INDEX "IDX_823bae55bd81b3be6e05cff438"`); + await queryRunner.query(`DROP INDEX "IDX_29ef80c6f13bcea998447fce43"`); + await queryRunner.query(`DROP INDEX "IDX_71cb7b435b7c0d4843317e7e16"`); + await queryRunner.query(`DROP TABLE "channel"`); + } } diff --git a/packages/backend/migration/1596786425167-channel2.js b/packages/backend/migration/1596786425167-channel2.js index 4b17048fef..ae871f5ff6 100644 --- a/packages/backend/migration/1596786425167-channel2.js +++ b/packages/backend/migration/1596786425167-channel2.js @@ -1,13 +1,15 @@ - - export class channel21596786425167 { - constructor() { - this.name = 'channel21596786425167'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`); - } + constructor() { + this.name = "channel21596786425167"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "channel_following" DROP COLUMN "readCursor"`, + ); + } } diff --git a/packages/backend/migration/1597230137744-objectStorageSetPublicRead.js b/packages/backend/migration/1597230137744-objectStorageSetPublicRead.js index 07283e31df..81540d5e8c 100644 --- a/packages/backend/migration/1597230137744-objectStorageSetPublicRead.js +++ b/packages/backend/migration/1597230137744-objectStorageSetPublicRead.js @@ -1,13 +1,15 @@ - - export class objectStorageSetPublicRead1597230137744 { - constructor() { - this.name = 'objectStorageSetPublicRead1597230137744'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageSetPublicRead" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageSetPublicRead"`); - } + constructor() { + this.name = "objectStorageSetPublicRead1597230137744"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageSetPublicRead" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageSetPublicRead"`, + ); + } } diff --git a/packages/backend/migration/1597236229720-IncludingNotificationTypes.js b/packages/backend/migration/1597236229720-IncludingNotificationTypes.js index f498fa7d9a..ce02148d28 100644 --- a/packages/backend/migration/1597236229720-IncludingNotificationTypes.js +++ b/packages/backend/migration/1597236229720-IncludingNotificationTypes.js @@ -1,15 +1,21 @@ - - export class IncludingNotificationTypes1597236229720 { - constructor() { - this.name = 'IncludingNotificationTypes1597236229720'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`); - await queryRunner.query(`DROP TYPE "user_profile_includingnotificationtypes_enum"`); - } + constructor() { + this.name = "IncludingNotificationTypes1597236229720"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`, + ); + await queryRunner.query( + `DROP TYPE "user_profile_includingnotificationtypes_enum"`, + ); + } } diff --git a/packages/backend/migration/1597385880794-add-sensitive-index.js b/packages/backend/migration/1597385880794-add-sensitive-index.js index 8c5c040ba0..d7c818bbfe 100644 --- a/packages/backend/migration/1597385880794-add-sensitive-index.js +++ b/packages/backend/migration/1597385880794-add-sensitive-index.js @@ -1,13 +1,13 @@ - - export class addSensitiveIndex1597385880794 { - constructor() { - this.name = 'addSensitiveIndex1597385880794'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_a7eba67f8b3fa27271e85d2e26" ON "drive_file" ("isSensitive") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_a7eba67f8b3fa27271e85d2e26"`); - } + constructor() { + this.name = "addSensitiveIndex1597385880794"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_a7eba67f8b3fa27271e85d2e26" ON "drive_file" ("isSensitive") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_a7eba67f8b3fa27271e85d2e26"`); + } } diff --git a/packages/backend/migration/1597459042300-channel-unread.js b/packages/backend/migration/1597459042300-channel-unread.js index 3157ab7793..4975a84f92 100644 --- a/packages/backend/migration/1597459042300-channel-unread.js +++ b/packages/backend/migration/1597459042300-channel-unread.js @@ -1,26 +1,44 @@ - - export class channelUnread1597459042300 { - constructor() { - this.name = 'channelUnread1597459042300'; - } - async up(queryRunner) { - await queryRunner.query(`TRUNCATE TABLE "note_unread"`, undefined); - await queryRunner.query(`ALTER TABLE "channel_following" DROP COLUMN "readCursor"`); - await queryRunner.query(`ALTER TABLE "note_unread" ADD "isMentioned" boolean NOT NULL`); - await queryRunner.query(`ALTER TABLE "note_unread" ADD "noteChannelId" character varying(32)`); - await queryRunner.query(`CREATE INDEX "IDX_25b1dd384bec391b07b74b861c" ON "note_unread" ("isMentioned") `); - await queryRunner.query(`CREATE INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30" ON "note_unread" ("isSpecified") `); - await queryRunner.query(`CREATE INDEX "IDX_29e8c1d579af54d4232939f994" ON "note_unread" ("noteUserId") `); - await queryRunner.query(`CREATE INDEX "IDX_6a57f051d82c6d4036c141e107" ON "note_unread" ("noteChannelId") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_6a57f051d82c6d4036c141e107"`); - await queryRunner.query(`DROP INDEX "IDX_29e8c1d579af54d4232939f994"`); - await queryRunner.query(`DROP INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30"`); - await queryRunner.query(`DROP INDEX "IDX_25b1dd384bec391b07b74b861c"`); - await queryRunner.query(`ALTER TABLE "note_unread" DROP COLUMN "noteChannelId"`); - await queryRunner.query(`ALTER TABLE "note_unread" DROP COLUMN "isMentioned"`); - await queryRunner.query(`ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`); - } + constructor() { + this.name = "channelUnread1597459042300"; + } + async up(queryRunner) { + await queryRunner.query(`TRUNCATE TABLE "note_unread"`, undefined); + await queryRunner.query( + `ALTER TABLE "channel_following" DROP COLUMN "readCursor"`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" ADD "isMentioned" boolean NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" ADD "noteChannelId" character varying(32)`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_25b1dd384bec391b07b74b861c" ON "note_unread" ("isMentioned") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30" ON "note_unread" ("isSpecified") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_29e8c1d579af54d4232939f994" ON "note_unread" ("noteUserId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6a57f051d82c6d4036c141e107" ON "note_unread" ("noteChannelId") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_6a57f051d82c6d4036c141e107"`); + await queryRunner.query(`DROP INDEX "IDX_29e8c1d579af54d4232939f994"`); + await queryRunner.query(`DROP INDEX "IDX_89a29c9237b8c3b6b3cbb4cb30"`); + await queryRunner.query(`DROP INDEX "IDX_25b1dd384bec391b07b74b861c"`); + await queryRunner.query( + `ALTER TABLE "note_unread" DROP COLUMN "noteChannelId"`, + ); + await queryRunner.query( + `ALTER TABLE "note_unread" DROP COLUMN "isMentioned"`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" ADD "readCursor" TIMESTAMP WITH TIME ZONE NOT NULL`, + ); + } } diff --git a/packages/backend/migration/1597893996136-ChannelNoteIdDescIndex.js b/packages/backend/migration/1597893996136-ChannelNoteIdDescIndex.js index 2bd8aee358..5a31d51e8b 100644 --- a/packages/backend/migration/1597893996136-ChannelNoteIdDescIndex.js +++ b/packages/backend/migration/1597893996136-ChannelNoteIdDescIndex.js @@ -1,15 +1,17 @@ - - export class ChannelNoteIdDescIndex1597893996136 { - constructor() { - this.name = 'ChannelNoteIdDescIndex1597893996136'; - } - async up(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); - await queryRunner.query(`CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("channelId", "id" desc)`); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_note_on_channelId_and_id_desc"`); - await queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `); - } + constructor() { + this.name = "ChannelNoteIdDescIndex1597893996136"; + } + async up(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); + await queryRunner.query( + `CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("channelId", "id" desc)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_note_on_channelId_and_id_desc"`); + await queryRunner.query( + `CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId") `, + ); + } } diff --git a/packages/backend/migration/1600353287890-mutingNotificationTypes.js b/packages/backend/migration/1600353287890-mutingNotificationTypes.js index ed3eb7d146..2a317b3f9f 100644 --- a/packages/backend/migration/1600353287890-mutingNotificationTypes.js +++ b/packages/backend/migration/1600353287890-mutingNotificationTypes.js @@ -1,19 +1,33 @@ - - export class mutingNotificationTypes1600353287890 { - constructor() { - this.name = 'mutingNotificationTypes1600353287890'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`); - await queryRunner.query(`DROP TYPE "public"."user_profile_includingnotificationtypes_enum"`); - await queryRunner.query(`CREATE TYPE "user_profile_mutingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "mutingNotificationTypes" "user_profile_mutingnotificationtypes_enum" array NOT NULL DEFAULT '{}'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "mutingNotificationTypes"`); - await queryRunner.query(`DROP TYPE "user_profile_mutingnotificationtypes_enum"`); - await queryRunner.query(`CREATE TYPE "public"."user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`); - } + constructor() { + this.name = "mutingNotificationTypes1600353287890"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "includingNotificationTypes"`, + ); + await queryRunner.query( + `DROP TYPE "public"."user_profile_includingnotificationtypes_enum"`, + ); + await queryRunner.query( + `CREATE TYPE "user_profile_mutingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "mutingNotificationTypes" "user_profile_mutingnotificationtypes_enum" array NOT NULL DEFAULT '{}'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "mutingNotificationTypes"`, + ); + await queryRunner.query( + `DROP TYPE "user_profile_mutingnotificationtypes_enum"`, + ); + await queryRunner.query( + `CREATE TYPE "public"."user_profile_includingnotificationtypes_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "includingNotificationTypes" "user_profile_includingnotificationtypes_enum" array`, + ); + } } diff --git a/packages/backend/migration/1603094348345-refine-abuse-user-report.js b/packages/backend/migration/1603094348345-refine-abuse-user-report.js index 4918032a2b..1aaf2685e5 100644 --- a/packages/backend/migration/1603094348345-refine-abuse-user-report.js +++ b/packages/backend/migration/1603094348345-refine-abuse-user-report.js @@ -1,31 +1,63 @@ - - export class refineAbuseUserReport1603094348345 { - constructor() { - this.name = 'refineAbuseUserReport1603094348345'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`); - await queryRunner.query(`DROP INDEX "IDX_d049123c413e68ca52abe73420"`); - await queryRunner.query(`DROP INDEX "IDX_5cd442c3b2e74fdd99dae20243"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" RENAME COLUMN "userId" TO "targetUserId"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "assigneeId" character varying(32)`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "resolved" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "comment"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "comment" character varying(2048) NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`CREATE INDEX "IDX_2b15aaf4a0dc5be3499af7ab6a" ON "abuse_user_report" ("resolved") `); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de" FOREIGN KEY ("assigneeId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de"`); - await queryRunner.query(`DROP INDEX "IDX_2b15aaf4a0dc5be3499af7ab6a"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "comment"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "comment" character varying(512) NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "resolved"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "assigneeId"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" RENAME COLUMN "targetUserId" TO "userId"`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5cd442c3b2e74fdd99dae20243" ON "abuse_user_report" ("userId", "reporterId") `); - await queryRunner.query(`CREATE INDEX "IDX_d049123c413e68ca52abe73420" ON "abuse_user_report" ("userId") `); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_d049123c413e68ca52abe734203" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } + constructor() { + this.name = "refineAbuseUserReport1603094348345"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_d049123c413e68ca52abe734203"`, + ); + await queryRunner.query(`DROP INDEX "IDX_d049123c413e68ca52abe73420"`); + await queryRunner.query(`DROP INDEX "IDX_5cd442c3b2e74fdd99dae20243"`); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" RENAME COLUMN "userId" TO "targetUserId"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "assigneeId" character varying(32)`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "resolved" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "comment"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "comment" character varying(2048) NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2b15aaf4a0dc5be3499af7ab6a" ON "abuse_user_report" ("resolved") `, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de" FOREIGN KEY ("assigneeId") REFERENCES "user"("id") ON DELETE SET NULL ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_08b883dd5fdd6f9c4c1572b36de"`, + ); + await queryRunner.query(`DROP INDEX "IDX_2b15aaf4a0dc5be3499af7ab6a"`); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "comment"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "comment" character varying(512) NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "resolved"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "assigneeId"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" RENAME COLUMN "targetUserId" TO "userId"`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5cd442c3b2e74fdd99dae20243" ON "abuse_user_report" ("userId", "reporterId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d049123c413e68ca52abe73420" ON "abuse_user_report" ("userId") `, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_d049123c413e68ca52abe734203" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } } diff --git a/packages/backend/migration/1603095701770-refine-abuse-user-report2.js b/packages/backend/migration/1603095701770-refine-abuse-user-report2.js index 64e92672f2..301a8e5382 100644 --- a/packages/backend/migration/1603095701770-refine-abuse-user-report2.js +++ b/packages/backend/migration/1603095701770-refine-abuse-user-report2.js @@ -1,19 +1,29 @@ - - export class refineAbuseUserReport21603095701770 { - constructor() { - this.name = 'refineAbuseUserReport21603095701770'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "targetUserHost" character varying(128)`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "reporterHost" character varying(128)`); - await queryRunner.query(`CREATE INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd" ON "abuse_user_report" ("targetUserHost") `); - await queryRunner.query(`CREATE INDEX "IDX_f8d8b93740ad12c4ce8213a199" ON "abuse_user_report" ("reporterHost") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_f8d8b93740ad12c4ce8213a199"`); - await queryRunner.query(`DROP INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "reporterHost"`); - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "targetUserHost"`); - } + constructor() { + this.name = "refineAbuseUserReport21603095701770"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "targetUserHost" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "reporterHost" character varying(128)`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd" ON "abuse_user_report" ("targetUserHost") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f8d8b93740ad12c4ce8213a199" ON "abuse_user_report" ("reporterHost") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_f8d8b93740ad12c4ce8213a199"`); + await queryRunner.query(`DROP INDEX "IDX_4ebbf7f93cdc10e8d1ef2fc6cd"`); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "reporterHost"`, + ); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "targetUserHost"`, + ); + } } diff --git a/packages/backend/migration/1603776877564-instance-theme-color.js b/packages/backend/migration/1603776877564-instance-theme-color.js index 92440d3f64..9bb3d65c0e 100644 --- a/packages/backend/migration/1603776877564-instance-theme-color.js +++ b/packages/backend/migration/1603776877564-instance-theme-color.js @@ -1,13 +1,13 @@ - - export class instanceThemeColor1603776877564 { - constructor() { - this.name = 'instanceThemeColor1603776877564'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" ADD "themeColor" character varying(64) DEFAULT null`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "themeColor"`); - } + constructor() { + this.name = "instanceThemeColor1603776877564"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" ADD "themeColor" character varying(64) DEFAULT null`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "themeColor"`); + } } diff --git a/packages/backend/migration/1603781553011-instance-favicon.js b/packages/backend/migration/1603781553011-instance-favicon.js index f607c49ffb..4b2442692f 100644 --- a/packages/backend/migration/1603781553011-instance-favicon.js +++ b/packages/backend/migration/1603781553011-instance-favicon.js @@ -1,13 +1,13 @@ - - export class instanceFavicon1603781553011 { - constructor() { - this.name = 'instanceFavicon1603781553011'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" ADD "faviconUrl" character varying(256) DEFAULT null`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "faviconUrl"`); - } + constructor() { + this.name = "instanceFavicon1603781553011"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" ADD "faviconUrl" character varying(256) DEFAULT null`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "faviconUrl"`); + } } diff --git a/packages/backend/migration/1604821689616-delete-auto-watch.js b/packages/backend/migration/1604821689616-delete-auto-watch.js index 4706e8bae9..6a8333ce16 100644 --- a/packages/backend/migration/1604821689616-delete-auto-watch.js +++ b/packages/backend/migration/1604821689616-delete-auto-watch.js @@ -1,13 +1,15 @@ - - export class deleteAutoWatch1604821689616 { - constructor() { - this.name = 'deleteAutoWatch1604821689616'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "autoWatch"`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "autoWatch" boolean NOT NULL DEFAULT false`); - } + constructor() { + this.name = "deleteAutoWatch1604821689616"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "autoWatch"`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "autoWatch" boolean NOT NULL DEFAULT false`, + ); + } } diff --git a/packages/backend/migration/1605408848373-clip-description.js b/packages/backend/migration/1605408848373-clip-description.js index edd5505b30..99cda65346 100644 --- a/packages/backend/migration/1605408848373-clip-description.js +++ b/packages/backend/migration/1605408848373-clip-description.js @@ -1,13 +1,13 @@ - - export class clipDescription1605408848373 { - constructor() { - this.name = 'clipDescription1605408848373'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "clip" ADD "description" character varying(2048) DEFAULT null`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "clip" DROP COLUMN "description"`); - } + constructor() { + this.name = "clipDescription1605408848373"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "clip" ADD "description" character varying(2048) DEFAULT null`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "clip" DROP COLUMN "description"`); + } } diff --git a/packages/backend/migration/1605408971051-comments.js b/packages/backend/migration/1605408971051-comments.js index 400efd5e70..363fec5cdd 100644 --- a/packages/backend/migration/1605408971051-comments.js +++ b/packages/backend/migration/1605408971051-comments.js @@ -1,433 +1,1067 @@ - - export class comments1605408971051 { - constructor() { - this.name = 'comments1605408971051'; - } - async up(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "log"."createdAt" IS 'The created date of the Log.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."createdAt" IS 'The created date of the DriveFolder.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."name" IS 'The name of the DriveFolder.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."parentId" IS 'The parent folder ID. If null, it means the DriveFolder is located in root.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."createdAt" IS 'The created date of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userHost" IS 'The host of owner. It will be null if the user in local.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."md5" IS 'The MD5 hash of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."name" IS 'The file name of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."type" IS 'The content type (MIME) of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."size" IS 'The file size (bytes) of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."comment" IS 'The comment of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."blurhash" IS 'The BlurHash string.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."properties" IS 'The any properties of the DriveFile. For example, it includes image width/height.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS 'The URL of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS 'The URL of the thumbnail of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."webpublicUrl" IS 'The URL of the webpublic of the DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS 'The URI of the DriveFile. it will be null when the DriveFile is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."folderId" IS 'The parent folder ID. If null, it means the DriveFile is located in root.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isSensitive" IS 'Whether the DriveFile is NSFW.'`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isLink" IS 'Whether the DriveFile is direct link to remote server.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."createdAt" IS 'The created date of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."updatedAt" IS 'The updated date of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."username" IS 'The username of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."usernameLower" IS 'The username (lowercased) of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."name" IS 'The name of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."followersCount" IS 'The count of followers.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."followingCount" IS 'The count of following.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."notesCount" IS 'The count of notes.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."avatarId" IS 'The ID of avatar DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."bannerId" IS 'The ID of banner DriveFile.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isSuspended" IS 'Whether the User is suspended.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isSilenced" IS 'Whether the User is silenced.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isLocked" IS 'Whether the User is locked.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isBot" IS 'Whether the User is a bot.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isCat" IS 'Whether the User is a cat.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isAdmin" IS 'Whether the User is the admin.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isModerator" IS 'Whether the User is a moderator.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."host" IS 'The host of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."inbox" IS 'The inbox URL of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."sharedInbox" IS 'The sharedInbox URL of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."featured" IS 'The featured URL of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."uri" IS 'The URI of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."token" IS 'The native access token of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."createdAt" IS 'The created date of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."secret" IS 'The secret key of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."name" IS 'The name of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."description" IS 'The description of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."callbackUrl" IS 'The callbackUrl of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."createdAt" IS 'The created date of the AccessToken.'`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."session" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."createdAt" IS 'The created date of the Channel.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."name" IS 'The name of the Channel.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."description" IS 'The description of the Channel.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."bannerId" IS 'The ID of banner Channel.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."notesCount" IS 'The count of notes.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."usersCount" IS 'The count of users.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."createdAt" IS 'The created date of the Note.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyId" IS 'The ID of reply target.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteId" IS 'The ID of renote target.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."userId" IS 'The ID of author.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."uri" IS 'The URI of a note. it will be null when the note is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."url" IS 'The human readable url of a note. it will be null when the note is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."channelId" IS 'The ID of source channel.'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."userHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "poll_vote"."createdAt" IS 'The created date of the PollVote.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_reaction"."createdAt" IS 'The created date of the NoteReaction.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."createdAt" IS 'The created date of the NoteWatching.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."userId" IS 'The watcher ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteId" IS 'The target Note ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteUserId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteUserId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteChannelId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."createdAt" IS 'The created date of the FollowRequest.'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeId" IS 'The followee user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerId" IS 'The follower user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."requestId" IS 'id of Follow Activity.'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group"."createdAt" IS 'The created date of the UserGroup.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group"."userId" IS 'The ID of owner.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."createdAt" IS 'The created date of the UserGroupInvitation.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userId" IS 'The user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS 'The group ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."createdAt" IS 'The created date of the Notification.'`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."notifieeId" IS 'The ID of recipient user of the Notification.'`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."isRead" IS 'Whether the Notification is read.'`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS 'Drive capacity of a local user (MB)'`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS 'Drive capacity of a remote user (MB)'`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."maxNoteTextLength" IS 'Max allowed note text length in characters'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."createdAt" IS 'The created date of the Following.'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeId" IS 'The followee user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerId" IS 'The follower user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerSharedInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeSharedInbox" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."caughtAt" IS 'The caught date of the Instance.'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."host" IS 'The host of the Instance.'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."usersCount" IS 'The count of the users of the Instance.'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."notesCount" IS 'The count of the notes of the Instance.'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareName" IS 'The software of the Instance.'`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerName" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."themeColor" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."createdAt" IS 'The created date of the Muting.'`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."muteeId" IS 'The mutee user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."muterId" IS 'The muter user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."createdAt" IS 'The created date of the Blocking.'`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockeeId" IS 'The blockee user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockerId" IS 'The blocker user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."createdAt" IS 'The created date of the UserList.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."name" IS 'The name of the UserList.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."createdAt" IS 'The created date of the UserListJoining.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userId" IS 'The user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userListId" IS 'The list ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."createdAt" IS 'The created date of the UserGroupJoining.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userId" IS 'The user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userGroupId" IS 'The group ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "note_favorite"."createdAt" IS 'The created date of the NoteFavorite.'`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."createdAt" IS 'The created date of the AbuseUserReport.'`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."createdAt" IS 'The created date of the MessagingMessage.'`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."userId" IS 'The sender user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."groupId" IS 'The recipient group ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "signin"."createdAt" IS 'The created date of the Signin.'`); - await queryRunner.query(`COMMENT ON COLUMN "auth_session"."createdAt" IS 'The created date of the AuthSession.'`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."createdAt" IS 'The created date of the ReversiGame.'`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."startedAt" IS 'The started date of the ReversiGame.'`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_matching"."createdAt" IS 'The created date of the ReversiMatching.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_note_pining"."createdAt" IS 'The created date of the UserNotePinings.'`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."noteVisibility" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."userId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."userHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "user_keypair"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_publickey"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "page"."createdAt" IS 'The created date of the Page.'`); - await queryRunner.query(`COMMENT ON COLUMN "page"."updatedAt" IS 'The updated date of the Page.'`); - await queryRunner.query(`COMMENT ON COLUMN "page"."userId" IS 'The ID of author.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."location" IS 'The location of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."birthday" IS 'The birthday (YYYY-MM-DD) of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."url" IS 'Remote URL of the user.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."email" IS 'The email address of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."password" IS 'The password hash of the User. It will be null if the origin of the user is local.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."clientData" IS 'The client-specific data of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."room" IS 'The room data of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userHost" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."id" IS 'Variable-length id given to navigator.credentials.get()'`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."publicKey" IS 'Variable-length public key used to verify attestations (hex-encoded).'`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."lastUsed" IS 'The date of the last time the UserSecurityKey was successfully validated.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."name" IS 'User-defined name for this key'`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."challenge" IS 'Hex-encoded sha256 hash of the challenge.'`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."createdAt" IS 'The date challenge was created for expiry purposes.'`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS 'Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.'`); - await queryRunner.query(`COMMENT ON COLUMN "moderation_log"."createdAt" IS 'The created date of the ModerationLog.'`); - await queryRunner.query(`COMMENT ON COLUMN "announcement"."createdAt" IS 'The created date of the Announcement.'`); - await queryRunner.query(`COMMENT ON COLUMN "announcement"."updatedAt" IS 'The updated date of the Announcement.'`); - await queryRunner.query(`COMMENT ON COLUMN "announcement_read"."createdAt" IS 'The created date of the AnnouncementRead.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."createdAt" IS 'The created date of the Clip.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."name" IS 'The name of the Clip.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."description" IS 'The description of the Clip.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip_note"."noteId" IS 'The note ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "clip_note"."clipId" IS 'The clip ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."createdAt" IS 'The created date of the Antenna.'`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."userId" IS 'The owner ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."name" IS 'The name of the Antenna.'`); - await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."noteId" IS 'The note ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."antennaId" IS 'The antenna ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "promo_note"."userId" IS '[Denormalized]'`); - await queryRunner.query(`COMMENT ON COLUMN "promo_read"."createdAt" IS 'The created date of the PromoRead.'`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."noteId" IS 'The note ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."userId" IS 'The user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."reason" IS 'The reason of the MutedNote.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."createdAt" IS 'The created date of the ChannelFollowing.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followeeId" IS 'The followee channel ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followerId" IS 'The follower user ID.'`); - await queryRunner.query(`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS 'The created date of the ChannelNotePining.'`); - } - async down(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "channel_note_pining"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."followeeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel_following"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."reason" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muted_note"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "promo_read"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "promo_note"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."antennaId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "antenna_note"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "antenna"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip_note"."clipId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip_note"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "clip"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "announcement_read"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "announcement"."updatedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "announcement"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "moderation_log"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "attestation_challenge"."challenge" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."lastUsed" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."publicKey" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_security_key"."id" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."room" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."clientData" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."password" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."email" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."url" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."birthday" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."location" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "page"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "page"."updatedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "page"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_publickey"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_keypair"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."userHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."noteVisibility" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_note_pining"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_matching"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."startedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "auth_session"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "signin"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."groupId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "messaging_message"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "abuse_user_report"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_favorite"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userGroupId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_joining"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userListId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list_joining"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_list"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockeeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "blocking"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."muterId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."muteeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "muting"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."themeColor" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."maintainerName" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."softwareName" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."notesCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."usersCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."host" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "instance"."caughtAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeSharedInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerSharedInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."followeeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "following"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."maxNoteTextLength" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."isRead" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."notifieeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "notification"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group_invitation"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user_group"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."requestId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."followeeId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "follow_request"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteChannelId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_unread"."noteUserId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteUserId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."noteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_watching"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note_reaction"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "poll_vote"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."userHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."channelId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."url" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."uri" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."renoteId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."replyId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "note"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."usersCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."notesCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."bannerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "channel"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."session" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "access_token"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."callbackUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`); - await queryRunner.query(`COMMENT ON COLUMN "app"."description" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."secret" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "app"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."token" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."uri" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."featured" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."sharedInbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."inbox" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."host" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isModerator" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isAdmin" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isCat" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isBot" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isLocked" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isSilenced" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isSuspended" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."bannerId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."avatarId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."notesCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."followingCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."followersCount" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."usernameLower" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."username" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."updatedAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isLink" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isSensitive" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."folderId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."webpublicUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."properties" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."blurhash" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."comment" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."size" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."type" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."md5" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userHost" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."parentId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."userId" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."name" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."createdAt" IS NULL`); - await queryRunner.query(`COMMENT ON COLUMN "log"."createdAt" IS NULL`); - } + constructor() { + this.name = "comments1605408971051"; + } + async up(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "log"."createdAt" IS 'The created date of the Log.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."createdAt" IS 'The created date of the DriveFolder.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."name" IS 'The name of the DriveFolder.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."parentId" IS 'The parent folder ID. If null, it means the DriveFolder is located in root.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."createdAt" IS 'The created date of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."userHost" IS 'The host of owner. It will be null if the user in local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."md5" IS 'The MD5 hash of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."name" IS 'The file name of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."type" IS 'The content type (MIME) of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."size" IS 'The file size (bytes) of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."comment" IS 'The comment of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."blurhash" IS 'The BlurHash string.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."properties" IS 'The any properties of the DriveFile. For example, it includes image width/height.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."url" IS 'The URL of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS 'The URL of the thumbnail of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."webpublicUrl" IS 'The URL of the webpublic of the DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."uri" IS 'The URI of the DriveFile. it will be null when the DriveFile is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."folderId" IS 'The parent folder ID. If null, it means the DriveFile is located in root.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."isSensitive" IS 'Whether the DriveFile is NSFW.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."isLink" IS 'Whether the DriveFile is direct link to remote server.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."createdAt" IS 'The created date of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."updatedAt" IS 'The updated date of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."username" IS 'The username of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."usernameLower" IS 'The username (lowercased) of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."name" IS 'The name of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."followersCount" IS 'The count of followers.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."followingCount" IS 'The count of following.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."notesCount" IS 'The count of notes.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."avatarId" IS 'The ID of avatar DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."bannerId" IS 'The ID of banner DriveFile.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isSuspended" IS 'Whether the User is suspended.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isSilenced" IS 'Whether the User is silenced.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isLocked" IS 'Whether the User is locked.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isBot" IS 'Whether the User is a bot.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isCat" IS 'Whether the User is a cat.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isAdmin" IS 'Whether the User is the admin.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isModerator" IS 'Whether the User is a moderator.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."host" IS 'The host of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."inbox" IS 'The inbox URL of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."sharedInbox" IS 'The sharedInbox URL of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."featured" IS 'The featured URL of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."uri" IS 'The URI of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."token" IS 'The native access token of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."createdAt" IS 'The created date of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."secret" IS 'The secret key of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."name" IS 'The name of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."description" IS 'The description of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "app"."callbackUrl" IS 'The callbackUrl of the App.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."createdAt" IS 'The created date of the AccessToken.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."session" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."description" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."createdAt" IS 'The created date of the Channel.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."name" IS 'The name of the Channel.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."description" IS 'The description of the Channel.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."bannerId" IS 'The ID of banner Channel.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."notesCount" IS 'The count of notes.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."usersCount" IS 'The count of users.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."createdAt" IS 'The created date of the Note.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."replyId" IS 'The ID of reply target.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."renoteId" IS 'The ID of renote target.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."userId" IS 'The ID of author.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."uri" IS 'The URI of a note. it will be null when the note is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."url" IS 'The human readable url of a note. it will be null when the note is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."channelId" IS 'The ID of source channel.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."userHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."replyUserId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."replyUserHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."renoteUserId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."renoteUserHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "poll_vote"."createdAt" IS 'The created date of the PollVote.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_reaction"."createdAt" IS 'The created date of the NoteReaction.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."createdAt" IS 'The created date of the NoteWatching.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."userId" IS 'The watcher ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."noteId" IS 'The target Note ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."noteUserId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_unread"."noteUserId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_unread"."noteChannelId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."createdAt" IS 'The created date of the FollowRequest.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeId" IS 'The followee user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerId" IS 'The follower user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."requestId" IS 'id of Follow Activity.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group"."createdAt" IS 'The created date of the UserGroup.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group"."userId" IS 'The ID of owner.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."createdAt" IS 'The created date of the UserGroupInvitation.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."userId" IS 'The user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS 'The group ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."createdAt" IS 'The created date of the Notification.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."notifieeId" IS 'The ID of recipient user of the Notification.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."isRead" IS 'Whether the Notification is read.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS 'Drive capacity of a local user (MB)'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS 'Drive capacity of a remote user (MB)'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."maxNoteTextLength" IS 'Max allowed note text length in characters'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."createdAt" IS 'The created date of the Following.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeId" IS 'The followee user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerId" IS 'The follower user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerSharedInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeSharedInbox" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."caughtAt" IS 'The caught date of the Instance.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."host" IS 'The host of the Instance.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."usersCount" IS 'The count of the users of the Instance.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."notesCount" IS 'The count of the notes of the Instance.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."softwareName" IS 'The software of the Instance.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."description" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."maintainerName" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."themeColor" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muting"."createdAt" IS 'The created date of the Muting.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muting"."muteeId" IS 'The mutee user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muting"."muterId" IS 'The muter user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "blocking"."createdAt" IS 'The created date of the Blocking.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "blocking"."blockeeId" IS 'The blockee user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "blocking"."blockerId" IS 'The blocker user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list"."createdAt" IS 'The created date of the UserList.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list"."name" IS 'The name of the UserList.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."createdAt" IS 'The created date of the UserListJoining.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."userId" IS 'The user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."userListId" IS 'The list ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."createdAt" IS 'The created date of the UserGroupJoining.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."userId" IS 'The user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."userGroupId" IS 'The group ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_favorite"."createdAt" IS 'The created date of the NoteFavorite.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."createdAt" IS 'The created date of the AbuseUserReport.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."createdAt" IS 'The created date of the MessagingMessage.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."userId" IS 'The sender user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."groupId" IS 'The recipient group ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "signin"."createdAt" IS 'The created date of the Signin.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "auth_session"."createdAt" IS 'The created date of the AuthSession.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."createdAt" IS 'The created date of the ReversiGame.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."startedAt" IS 'The started date of the ReversiGame.'`, + ); + await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_matching"."createdAt" IS 'The created date of the ReversiMatching.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_note_pining"."createdAt" IS 'The created date of the UserNotePinings.'`, + ); + await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "poll"."noteVisibility" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "poll"."userId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "poll"."userHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_keypair"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_publickey"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "page"."createdAt" IS 'The created date of the Page.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "page"."updatedAt" IS 'The updated date of the Page.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "page"."userId" IS 'The ID of author.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."location" IS 'The location of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."birthday" IS 'The birthday (YYYY-MM-DD) of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."url" IS 'Remote URL of the user.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."email" IS 'The email address of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."password" IS 'The password hash of the User. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."clientData" IS 'The client-specific data of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."room" IS 'The room data of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."userHost" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."id" IS 'Variable-length id given to navigator.credentials.get()'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."publicKey" IS 'Variable-length public key used to verify attestations (hex-encoded).'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."lastUsed" IS 'The date of the last time the UserSecurityKey was successfully validated.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."name" IS 'User-defined name for this key'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."challenge" IS 'Hex-encoded sha256 hash of the challenge.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."createdAt" IS 'The date challenge was created for expiry purposes.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS 'Indicates that the challenge is only for registration purposes if true to prevent the challenge for being used as authentication.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "moderation_log"."createdAt" IS 'The created date of the ModerationLog.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "announcement"."createdAt" IS 'The created date of the Announcement.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "announcement"."updatedAt" IS 'The updated date of the Announcement.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "announcement_read"."createdAt" IS 'The created date of the AnnouncementRead.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip"."createdAt" IS 'The created date of the Clip.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip"."name" IS 'The name of the Clip.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip"."description" IS 'The description of the Clip.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip_note"."noteId" IS 'The note ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "clip_note"."clipId" IS 'The clip ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna"."createdAt" IS 'The created date of the Antenna.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna"."userId" IS 'The owner ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna"."name" IS 'The name of the Antenna.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna_note"."noteId" IS 'The note ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna_note"."antennaId" IS 'The antenna ID.'`, + ); + await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "promo_note"."userId" IS '[Denormalized]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "promo_read"."createdAt" IS 'The created date of the PromoRead.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muted_note"."noteId" IS 'The note ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muted_note"."userId" IS 'The user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "muted_note"."reason" IS 'The reason of the MutedNote.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."createdAt" IS 'The created date of the ChannelFollowing.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."followeeId" IS 'The followee channel ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."followerId" IS 'The follower user ID.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_note_pining"."createdAt" IS 'The created date of the ChannelNotePining.'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "channel_note_pining"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."followerId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."followeeId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "channel_following"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "muted_note"."reason" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "muted_note"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "muted_note"."noteId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "promo_read"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "promo_note"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "promo_note"."noteId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "antenna_note"."antennaId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "antenna_note"."noteId" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "antenna"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "antenna"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "antenna"."createdAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip_note"."clipId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip_note"."noteId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip"."description" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "clip"."createdAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "announcement_read"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "announcement"."updatedAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "announcement"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "moderation_log"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."registrationChallenge" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "attestation_challenge"."challenge" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."name" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."lastUsed" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."publicKey" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_security_key"."id" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."userHost" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "user_profile"."room" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."clientData" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."password" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "user_profile"."email" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user_profile"."url" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."description" IS 'The description (bio) of the User.'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."birthday" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."location" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."userId" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "page"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "page"."updatedAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "page"."createdAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_publickey"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_keypair"."userId" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "poll"."userHost" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "poll"."userId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "poll"."noteVisibility" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "poll"."noteId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_note_pining"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_matching"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form2" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "reversi_game"."form1" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."startedAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "reversi_game"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "auth_session"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "signin"."createdAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."groupId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "messaging_message"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."reporterHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."targetUserHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "abuse_user_report"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_favorite"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."userGroupId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_joining"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."userListId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_list_joining"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "user_list"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user_list"."userId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_list"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockerId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "blocking"."blockeeId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "blocking"."createdAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "muting"."muterId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "muting"."muteeId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "muting"."createdAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."themeColor" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."faviconUrl" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "instance"."iconUrl" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."maintainerEmail" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."maintainerName" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."description" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "instance"."name" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."openRegistrations" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."softwareVersion" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."softwareName" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."notesCount" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "instance"."usersCount" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "instance"."host" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "instance"."caughtAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeSharedInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerSharedInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followerId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."followeeId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "following"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."maxNoteTextLength" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."remoteDriveCapacityMb" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."localDriveCapacityMb" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."isRead" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."notifieeId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "notification"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."userGroupId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_group_invitation"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "user_group"."userId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user_group"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeSharedInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerSharedInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerInbox" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerHost" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."requestId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followerId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."followeeId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "follow_request"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_unread"."noteChannelId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_unread"."noteUserId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."noteUserId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."noteId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."userId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_watching"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note_reaction"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "poll_vote"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "note"."renoteUserHost" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "note"."renoteUserId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserHost" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."replyUserId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."userHost" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."channelId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."url" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."uri" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."renoteId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."replyId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "note"."createdAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "channel"."usersCount" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "channel"."notesCount" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "channel"."bannerId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "channel"."description" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "channel"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "channel"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "channel"."createdAt" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."iconUrl" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."description" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "access_token"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "access_token"."appId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."session" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."lastUsedAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "access_token"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "app"."callbackUrl" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "app"."permission" IS 'The permission of the App.'`, + ); + await queryRunner.query(`COMMENT ON COLUMN "app"."description" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "app"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "app"."secret" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "app"."userId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "app"."createdAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."token" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."uri" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."featured" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."sharedInbox" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."inbox" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."host" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isModerator" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isAdmin" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isCat" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isBot" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isLocked" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isSilenced" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."isSuspended" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."bannerId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."avatarId" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."notesCount" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "user"."followingCount" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."followersCount" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "user"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."usernameLower" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."username" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."updatedAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "user"."createdAt" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."isLink" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."isSensitive" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."folderId" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."uri" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."webpublicUrl" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."thumbnailUrl" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."url" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."properties" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."blurhash" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."comment" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."size" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."type" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."name" IS NULL`); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."md5" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."userHost" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "drive_file"."userId" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."createdAt" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."parentId" IS NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."userId" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "drive_folder"."name" IS NULL`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_folder"."createdAt" IS NULL`, + ); + await queryRunner.query(`COMMENT ON COLUMN "log"."createdAt" IS NULL`); + } } diff --git a/packages/backend/migration/1605585339718-instance-pinned-pages.js b/packages/backend/migration/1605585339718-instance-pinned-pages.js index 56ccd44c8e..09e1617641 100644 --- a/packages/backend/migration/1605585339718-instance-pinned-pages.js +++ b/packages/backend/migration/1605585339718-instance-pinned-pages.js @@ -1,13 +1,13 @@ - - export class instancePinnedPages1605585339718 { - constructor() { - this.name = 'instancePinnedPages1605585339718'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`); - } + constructor() { + this.name = "instancePinnedPages1605585339718"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "pinnedPages" character varying(512) array NOT NULL DEFAULT '{"/featured", "/channels", "/explore", "/pages", "/about-misskey"}'::varchar[]`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedPages"`); + } } diff --git a/packages/backend/migration/1605965516823-instance-images.js b/packages/backend/migration/1605965516823-instance-images.js index 710c75981d..ed9a26a655 100644 --- a/packages/backend/migration/1605965516823-instance-images.js +++ b/packages/backend/migration/1605965516823-instance-images.js @@ -1,15 +1,19 @@ - - export class instanceImages1605965516823 { - constructor() { - this.name = 'instanceImages1605965516823'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "backgroundImageUrl" character varying(512)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "logoImageUrl" character varying(512)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "logoImageUrl"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "backgroundImageUrl"`); - } + constructor() { + this.name = "instanceImages1605965516823"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "backgroundImageUrl" character varying(512)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "logoImageUrl" character varying(512)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "logoImageUrl"`); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "backgroundImageUrl"`, + ); + } } diff --git a/packages/backend/migration/1606191203881-no-crawle.js b/packages/backend/migration/1606191203881-no-crawle.js index b9ada4354e..4e7e822771 100644 --- a/packages/backend/migration/1606191203881-no-crawle.js +++ b/packages/backend/migration/1606191203881-no-crawle.js @@ -1,15 +1,21 @@ - - export class noCrawle1606191203881 { - constructor() { - this.name = 'noCrawle1606191203881'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`); - } - async down(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "noCrawle"`); - } + constructor() { + this.name = "noCrawle1606191203881"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "noCrawle" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."noCrawle" IS 'Whether reject index by crawler.'`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "noCrawle"`, + ); + } } diff --git a/packages/backend/migration/1607151207216-instance-pinned-clip.js b/packages/backend/migration/1607151207216-instance-pinned-clip.js index 9a4195e74c..655b4c7fbd 100644 --- a/packages/backend/migration/1607151207216-instance-pinned-clip.js +++ b/packages/backend/migration/1607151207216-instance-pinned-clip.js @@ -1,13 +1,13 @@ - - export class instancePinnedClip1607151207216 { - constructor() { - this.name = 'instancePinnedClip1607151207216'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "pinnedClipId" character varying(32)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedClipId"`); - } + constructor() { + this.name = "instancePinnedClip1607151207216"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "pinnedClipId" character varying(32)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "pinnedClipId"`); + } } diff --git a/packages/backend/migration/1607353487793-isExplorable.js b/packages/backend/migration/1607353487793-isExplorable.js index d9f1ff4c69..d654ee121f 100644 --- a/packages/backend/migration/1607353487793-isExplorable.js +++ b/packages/backend/migration/1607353487793-isExplorable.js @@ -1,17 +1,23 @@ - - export class isExplorable1607353487793 { - constructor() { - this.name = 'isExplorable1607353487793'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "isExplorable" boolean NOT NULL DEFAULT true`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`); - await queryRunner.query(`CREATE INDEX "IDX_d5a1b83c7cab66f167e6888188" ON "user" ("isExplorable") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_d5a1b83c7cab66f167e6888188"`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isExplorable"`); - } + constructor() { + this.name = "isExplorable1607353487793"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "isExplorable" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d5a1b83c7cab66f167e6888188" ON "user" ("isExplorable") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_d5a1b83c7cab66f167e6888188"`); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isExplorable" IS 'Whether the User is explorable.'`, + ); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isExplorable"`); + } } diff --git a/packages/backend/migration/1610277136869-registry.js b/packages/backend/migration/1610277136869-registry.js index 184c062ddb..023519302e 100644 --- a/packages/backend/migration/1610277136869-registry.js +++ b/packages/backend/migration/1610277136869-registry.js @@ -1,21 +1,31 @@ - - export class registry1610277136869 { - constructor() { - this.name = 'registry1610277136869'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "registry_item" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "key" character varying(1024) NOT NULL, "scope" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[], "domain" character varying(512), CONSTRAINT "PK_64b3f7e6008b4d89b826cd3af95" PRIMARY KEY ("id")); COMMENT ON COLUMN "registry_item"."createdAt" IS 'The created date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."updatedAt" IS 'The updated date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "registry_item"."key" IS 'The key of the RegistryItem.'`); - await queryRunner.query(`CREATE INDEX "IDX_fb9d21ba0abb83223263df6bcb" ON "registry_item" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_22baca135bb8a3ea1a83d13df3" ON "registry_item" ("scope") `); - await queryRunner.query(`CREATE INDEX "IDX_0a72bdfcdb97c0eca11fe7ecad" ON "registry_item" ("domain") `); - await queryRunner.query(`ALTER TABLE "registry_item" ADD CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "registry_item" DROP CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3"`); - await queryRunner.query(`DROP INDEX "IDX_0a72bdfcdb97c0eca11fe7ecad"`); - await queryRunner.query(`DROP INDEX "IDX_22baca135bb8a3ea1a83d13df3"`); - await queryRunner.query(`DROP INDEX "IDX_fb9d21ba0abb83223263df6bcb"`); - await queryRunner.query(`DROP TABLE "registry_item"`); - } + constructor() { + this.name = "registry1610277136869"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "registry_item" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "key" character varying(1024) NOT NULL, "scope" character varying(1024) array NOT NULL DEFAULT '{}'::varchar[], "domain" character varying(512), CONSTRAINT "PK_64b3f7e6008b4d89b826cd3af95" PRIMARY KEY ("id")); COMMENT ON COLUMN "registry_item"."createdAt" IS 'The created date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."updatedAt" IS 'The updated date of the RegistryItem.'; COMMENT ON COLUMN "registry_item"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "registry_item"."key" IS 'The key of the RegistryItem.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fb9d21ba0abb83223263df6bcb" ON "registry_item" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_22baca135bb8a3ea1a83d13df3" ON "registry_item" ("scope") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0a72bdfcdb97c0eca11fe7ecad" ON "registry_item" ("domain") `, + ); + await queryRunner.query( + `ALTER TABLE "registry_item" ADD CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "registry_item" DROP CONSTRAINT "FK_fb9d21ba0abb83223263df6bcb3"`, + ); + await queryRunner.query(`DROP INDEX "IDX_0a72bdfcdb97c0eca11fe7ecad"`); + await queryRunner.query(`DROP INDEX "IDX_22baca135bb8a3ea1a83d13df3"`); + await queryRunner.query(`DROP INDEX "IDX_fb9d21ba0abb83223263df6bcb"`); + await queryRunner.query(`DROP TABLE "registry_item"`); + } } diff --git a/packages/backend/migration/1610277585759-registry2.js b/packages/backend/migration/1610277585759-registry2.js index 591bafae31..a2c1fb01bf 100644 --- a/packages/backend/migration/1610277585759-registry2.js +++ b/packages/backend/migration/1610277585759-registry2.js @@ -1,15 +1,19 @@ - - export class registry21610277585759 { - constructor() { - this.name = 'registry21610277585759'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "registry_item" ADD "value" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`); - } - async down(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`); - await queryRunner.query(`ALTER TABLE "registry_item" DROP COLUMN "value"`); - } + constructor() { + this.name = "registry21610277585759"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "registry_item" ADD "value" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "registry_item"."value" IS 'The value of the RegistryItem.'`, + ); + await queryRunner.query(`ALTER TABLE "registry_item" DROP COLUMN "value"`); + } } diff --git a/packages/backend/migration/1610283021566-registry3.js b/packages/backend/migration/1610283021566-registry3.js index e0289f17ee..a1d55b2dc1 100644 --- a/packages/backend/migration/1610283021566-registry3.js +++ b/packages/backend/migration/1610283021566-registry3.js @@ -1,13 +1,15 @@ - - export class registry31610283021566 { - constructor() { - this.name = 'registry31610283021566'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "registry_item" ALTER COLUMN "value" DROP NOT NULL`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "registry_item" ALTER COLUMN "value" SET NOT NULL`); - } + constructor() { + this.name = "registry31610283021566"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER COLUMN "value" DROP NOT NULL`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER COLUMN "value" SET NOT NULL`, + ); + } } diff --git a/packages/backend/migration/1611354329133-followersUri.js b/packages/backend/migration/1611354329133-followersUri.js index 669ddb480e..c7ca5c895b 100644 --- a/packages/backend/migration/1611354329133-followersUri.js +++ b/packages/backend/migration/1611354329133-followersUri.js @@ -1,15 +1,19 @@ - - export class followersUri1611354329133 { - constructor() { - this.name = 'followersUri1611354329133'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "followersUri" varchar(512) DEFAULT NULL`); - await queryRunner.query(`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`); - } - async down(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "followersUri"`); - } + constructor() { + this.name = "followersUri1611354329133"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "followersUri" varchar(512) DEFAULT NULL`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "user"."followersUri" IS 'The URI of the user Follower Collection. It will be null if the origin of the user is local.'`, + ); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "followersUri"`); + } } diff --git a/packages/backend/migration/1611397665007-gallery.js b/packages/backend/migration/1611397665007-gallery.js index f49b2df468..1f36acbc17 100644 --- a/packages/backend/migration/1611397665007-gallery.js +++ b/packages/backend/migration/1611397665007-gallery.js @@ -1,39 +1,71 @@ - - export class gallery1611397665007 { - constructor() { - this.name = 'gallery1611397665007'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "gallery_post" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "description" character varying(2048), "userId" character varying(32) NOT NULL, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "isSensitive" boolean NOT NULL DEFAULT false, "likedCount" integer NOT NULL DEFAULT '0', "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_8e90d7b6015f2c4518881b14753" PRIMARY KEY ("id")); COMMENT ON COLUMN "gallery_post"."createdAt" IS 'The created date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."updatedAt" IS 'The updated date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."userId" IS 'The ID of author.'; COMMENT ON COLUMN "gallery_post"."isSensitive" IS 'Whether the post is sensitive.'`); - await queryRunner.query(`CREATE INDEX "IDX_8f1a239bd077c8864a20c62c2c" ON "gallery_post" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_f631d37835adb04792e361807c" ON "gallery_post" ("updatedAt") `); - await queryRunner.query(`CREATE INDEX "IDX_985b836dddd8615e432d7043dd" ON "gallery_post" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_3ca50563facd913c425e7a89ee" ON "gallery_post" ("fileIds") `); - await queryRunner.query(`CREATE INDEX "IDX_f2d744d9a14d0dfb8b96cb7fc5" ON "gallery_post" ("isSensitive") `); - await queryRunner.query(`CREATE INDEX "IDX_1a165c68a49d08f11caffbd206" ON "gallery_post" ("likedCount") `); - await queryRunner.query(`CREATE INDEX "IDX_05cca34b985d1b8edc1d1e28df" ON "gallery_post" ("tags") `); - await queryRunner.query(`CREATE TABLE "gallery_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "postId" character varying(32) NOT NULL, CONSTRAINT "PK_853ab02be39b8de45cd720cc15f" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_8fd5215095473061855ceb948c" ON "gallery_like" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_df1b5f4099e99fb0bc5eae53b6" ON "gallery_like" ("userId", "postId") `); - await queryRunner.query(`ALTER TABLE "gallery_post" ADD CONSTRAINT "FK_985b836dddd8615e432d7043ddb" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_8fd5215095473061855ceb948cf" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - await queryRunner.query(`ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8" FOREIGN KEY ("postId") REFERENCES "gallery_post"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8"`); - await queryRunner.query(`ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_8fd5215095473061855ceb948cf"`); - await queryRunner.query(`ALTER TABLE "gallery_post" DROP CONSTRAINT "FK_985b836dddd8615e432d7043ddb"`); - await queryRunner.query(`DROP INDEX "IDX_df1b5f4099e99fb0bc5eae53b6"`); - await queryRunner.query(`DROP INDEX "IDX_8fd5215095473061855ceb948c"`); - await queryRunner.query(`DROP TABLE "gallery_like"`); - await queryRunner.query(`DROP INDEX "IDX_05cca34b985d1b8edc1d1e28df"`); - await queryRunner.query(`DROP INDEX "IDX_1a165c68a49d08f11caffbd206"`); - await queryRunner.query(`DROP INDEX "IDX_f2d744d9a14d0dfb8b96cb7fc5"`); - await queryRunner.query(`DROP INDEX "IDX_3ca50563facd913c425e7a89ee"`); - await queryRunner.query(`DROP INDEX "IDX_985b836dddd8615e432d7043dd"`); - await queryRunner.query(`DROP INDEX "IDX_f631d37835adb04792e361807c"`); - await queryRunner.query(`DROP INDEX "IDX_8f1a239bd077c8864a20c62c2c"`); - await queryRunner.query(`DROP TABLE "gallery_post"`); - } + constructor() { + this.name = "gallery1611397665007"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "gallery_post" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL, "title" character varying(256) NOT NULL, "description" character varying(2048), "userId" character varying(32) NOT NULL, "fileIds" character varying(32) array NOT NULL DEFAULT '{}'::varchar[], "isSensitive" boolean NOT NULL DEFAULT false, "likedCount" integer NOT NULL DEFAULT '0', "tags" character varying(128) array NOT NULL DEFAULT '{}'::varchar[], CONSTRAINT "PK_8e90d7b6015f2c4518881b14753" PRIMARY KEY ("id")); COMMENT ON COLUMN "gallery_post"."createdAt" IS 'The created date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."updatedAt" IS 'The updated date of the GalleryPost.'; COMMENT ON COLUMN "gallery_post"."userId" IS 'The ID of author.'; COMMENT ON COLUMN "gallery_post"."isSensitive" IS 'Whether the post is sensitive.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8f1a239bd077c8864a20c62c2c" ON "gallery_post" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f631d37835adb04792e361807c" ON "gallery_post" ("updatedAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_985b836dddd8615e432d7043dd" ON "gallery_post" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3ca50563facd913c425e7a89ee" ON "gallery_post" ("fileIds") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f2d744d9a14d0dfb8b96cb7fc5" ON "gallery_post" ("isSensitive") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_1a165c68a49d08f11caffbd206" ON "gallery_post" ("likedCount") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_05cca34b985d1b8edc1d1e28df" ON "gallery_post" ("tags") `, + ); + await queryRunner.query( + `CREATE TABLE "gallery_like" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "postId" character varying(32) NOT NULL, CONSTRAINT "PK_853ab02be39b8de45cd720cc15f" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8fd5215095473061855ceb948c" ON "gallery_like" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_df1b5f4099e99fb0bc5eae53b6" ON "gallery_like" ("userId", "postId") `, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" ADD CONSTRAINT "FK_985b836dddd8615e432d7043ddb" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_8fd5215095473061855ceb948cf" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_like" ADD CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8" FOREIGN KEY ("postId") REFERENCES "gallery_post"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_b1cb568bfe569e47b7051699fc8"`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_like" DROP CONSTRAINT "FK_8fd5215095473061855ceb948cf"`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" DROP CONSTRAINT "FK_985b836dddd8615e432d7043ddb"`, + ); + await queryRunner.query(`DROP INDEX "IDX_df1b5f4099e99fb0bc5eae53b6"`); + await queryRunner.query(`DROP INDEX "IDX_8fd5215095473061855ceb948c"`); + await queryRunner.query(`DROP TABLE "gallery_like"`); + await queryRunner.query(`DROP INDEX "IDX_05cca34b985d1b8edc1d1e28df"`); + await queryRunner.query(`DROP INDEX "IDX_1a165c68a49d08f11caffbd206"`); + await queryRunner.query(`DROP INDEX "IDX_f2d744d9a14d0dfb8b96cb7fc5"`); + await queryRunner.query(`DROP INDEX "IDX_3ca50563facd913c425e7a89ee"`); + await queryRunner.query(`DROP INDEX "IDX_985b836dddd8615e432d7043dd"`); + await queryRunner.query(`DROP INDEX "IDX_f631d37835adb04792e361807c"`); + await queryRunner.query(`DROP INDEX "IDX_8f1a239bd077c8864a20c62c2c"`); + await queryRunner.query(`DROP TABLE "gallery_post"`); + } } diff --git a/packages/backend/migration/1611547387175-objectStorageS3ForcePathStyle.js b/packages/backend/migration/1611547387175-objectStorageS3ForcePathStyle.js index e4d3c0e8ec..b65ca2a577 100644 --- a/packages/backend/migration/1611547387175-objectStorageS3ForcePathStyle.js +++ b/packages/backend/migration/1611547387175-objectStorageS3ForcePathStyle.js @@ -1,13 +1,15 @@ - - export class objectStorageS3ForcePathStyle1611547387175 { - constructor() { - this.name = 'objectStorageS3ForcePathStyle1611547387175'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "objectStorageS3ForcePathStyle" boolean NOT NULL DEFAULT true`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "objectStorageS3ForcePathStyle"`); - } + constructor() { + this.name = "objectStorageS3ForcePathStyle1611547387175"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "objectStorageS3ForcePathStyle" boolean NOT NULL DEFAULT true`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "objectStorageS3ForcePathStyle"`, + ); + } } diff --git a/packages/backend/migration/1612619156584-announcement-email.js b/packages/backend/migration/1612619156584-announcement-email.js index bcc718d1c2..a3b7292f8a 100644 --- a/packages/backend/migration/1612619156584-announcement-email.js +++ b/packages/backend/migration/1612619156584-announcement-email.js @@ -1,13 +1,15 @@ - - export class announcementEmail1612619156584 { - constructor() { - this.name = 'announcementEmail1612619156584'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "receiveAnnouncementEmail" boolean NOT NULL DEFAULT true`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "receiveAnnouncementEmail"`); - } + constructor() { + this.name = "announcementEmail1612619156584"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "receiveAnnouncementEmail" boolean NOT NULL DEFAULT true`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "receiveAnnouncementEmail"`, + ); + } } diff --git a/packages/backend/migration/1613155914446-emailNotificationTypes.js b/packages/backend/migration/1613155914446-emailNotificationTypes.js index cd49924d2d..e64aada7b3 100644 --- a/packages/backend/migration/1613155914446-emailNotificationTypes.js +++ b/packages/backend/migration/1613155914446-emailNotificationTypes.js @@ -1,13 +1,15 @@ - - export class emailNotificationTypes1613155914446 { - constructor() { - this.name = 'emailNotificationTypes1613155914446'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "emailNotificationTypes" jsonb NOT NULL DEFAULT '["follow","receiveFollowRequest","groupInvited"]'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "emailNotificationTypes"`); - } + constructor() { + this.name = "emailNotificationTypes1613155914446"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "emailNotificationTypes" jsonb NOT NULL DEFAULT '["follow","receiveFollowRequest","groupInvited"]'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "emailNotificationTypes"`, + ); + } } diff --git a/packages/backend/migration/1613181457597-user-lang.js b/packages/backend/migration/1613181457597-user-lang.js index d2cd06848e..aa5bf7de8d 100644 --- a/packages/backend/migration/1613181457597-user-lang.js +++ b/packages/backend/migration/1613181457597-user-lang.js @@ -1,13 +1,13 @@ - - export class userLang1613181457597 { - constructor() { - this.name = 'userLang1613181457597'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "lang" character varying(32)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "lang"`); - } + constructor() { + this.name = "userLang1613181457597"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "lang" character varying(32)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "lang"`); + } } diff --git a/packages/backend/migration/1613503367223-use-bigint-for-driveUsage.js b/packages/backend/migration/1613503367223-use-bigint-for-driveUsage.js index f2e2c5d357..a8f1e33bfc 100644 --- a/packages/backend/migration/1613503367223-use-bigint-for-driveUsage.js +++ b/packages/backend/migration/1613503367223-use-bigint-for-driveUsage.js @@ -1,14 +1,16 @@ - - export class useBigintForDriveUsage1613503367223 { - constructor() { - this.name = 'useBigintForDriveUsage1613503367223'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "driveUsage" TYPE bigint`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveUsage"`); - await queryRunner.query(`ALTER TABLE "instance" ADD "driveUsage" integer NOT NULL DEFAULT 0`); - } + constructor() { + this.name = "useBigintForDriveUsage1613503367223"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "driveUsage" TYPE bigint`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveUsage"`); + await queryRunner.query( + `ALTER TABLE "instance" ADD "driveUsage" integer NOT NULL DEFAULT 0`, + ); + } } diff --git a/packages/backend/migration/1615965918224-chart-v2.js b/packages/backend/migration/1615965918224-chart-v2.js index 86fa5b0c00..0460a57f55 100644 --- a/packages/backend/migration/1615965918224-chart-v2.js +++ b/packages/backend/migration/1615965918224-chart-v2.js @@ -1,216 +1,508 @@ - - export class chartV21615965918224 { - constructor() { - this.name = 'chartV21615965918224'; - } - async up(queryRunner) { - await queryRunner.query(`DELETE FROM "__chart__active_users" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__drive" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__federation" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__hashtag" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__instance" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__network" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__notes" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__per_user_drive" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__per_user_following" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__per_user_notes" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__per_user_reaction" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__test" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__test_grouped" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__test_unique" WHERE "span" = 'day'`); - await queryRunner.query(`DELETE FROM "__chart__users" WHERE "span" = 'day'`); - await queryRunner.query(`DROP INDEX "IDX_15e91a03aeeac9dbccdf43fc06"`); - await queryRunner.query(`DROP INDEX "IDX_20f57cc8f142c131340ee16742"`); - await queryRunner.query(`DROP INDEX "IDX_c26e2c1cbb6e911e0554b27416"`); - await queryRunner.query(`DROP INDEX "IDX_3fa0d0f17ca72e3dc80999a032"`); - await queryRunner.query(`DROP INDEX "IDX_6e1df243476e20cbf86572ecc0"`); - await queryRunner.query(`DROP INDEX "IDX_06690fc959f1c9fdaf21928222"`); - await queryRunner.query(`DROP INDEX "IDX_e447064455928cf627590ef527"`); - await queryRunner.query(`DROP INDEX "IDX_2d416e6af791a82e338c79d480"`); - await queryRunner.query(`DROP INDEX "IDX_e9cd07672b37d8966cf3709283"`); - await queryRunner.query(`DROP INDEX "IDX_fcc181fb8283009c61cc4083ef"`); - await queryRunner.query(`DROP INDEX "IDX_49975586f50ed7b800fdd88fbd"`); - await queryRunner.query(`DROP INDEX "IDX_6d6f156ceefc6bc5f273a0e370"`); - await queryRunner.query(`DROP INDEX "IDX_c12f0af4a66cdd30c2287ce8aa"`); - await queryRunner.query(`DROP INDEX "IDX_d0a4f79af5a97b08f37b547197"`); - await queryRunner.query(`DROP INDEX "IDX_f5448d9633cff74208d850aabe"`); - await queryRunner.query(`DROP INDEX "IDX_f8dd01baeded2ffa833e0a610a"`); - await queryRunner.query(`DROP INDEX "IDX_08fac0eb3b11f04c200c0b40dd"`); - await queryRunner.query(`DROP INDEX "IDX_9ff6944f01acb756fdc92d7563"`); - await queryRunner.query(`DROP INDEX "IDX_e69096589f11e3baa98ddd64d0"`); - await queryRunner.query(`DROP INDEX "IDX_0c9a159c5082cbeef3ca6706b5"`); - await queryRunner.query(`DROP INDEX "IDX_924fc196c80ca24bae01dd37e4"`); - await queryRunner.query(`DROP INDEX "IDX_328f259961e60c4fa0bfcf55ca"`); - await queryRunner.query(`DROP INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53"`); - await queryRunner.query(`DROP INDEX "IDX_f2aeafde2ae6fbad38e857631b"`); - await queryRunner.query(`DROP INDEX "IDX_f92dd6d03f8d994f29987f6214"`); - await queryRunner.query(`DROP INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f"`); - await queryRunner.query(`DROP INDEX "IDX_4db3b84c7be0d3464714f3e0b1"`); - await queryRunner.query(`DROP INDEX "IDX_8d2cbbc8114d90d19b44d626b6"`); - await queryRunner.query(`DROP INDEX "IDX_046feeb12e9ef5f783f409866a"`); - await queryRunner.query(`DROP INDEX "IDX_f68a5ab958f9f5fa17a32ac23b"`); - await queryRunner.query(`DROP INDEX "IDX_65633a106bce43fc7c5c30a5c7"`); - await queryRunner.query(`DROP INDEX "IDX_edeb73c09c3143a81bcb34d569"`); - await queryRunner.query(`DROP INDEX "IDX_e316f01a6d24eb31db27f88262"`); - await queryRunner.query(`DROP INDEX "IDX_2be7ec6cebddc14dc11e206686"`); - await queryRunner.query(`DROP INDEX "IDX_a5133470f4825902e170328ca5"`); - await queryRunner.query(`DROP INDEX "IDX_84e661abb7bd1e51b690d4b017"`); - await queryRunner.query(`DROP INDEX "IDX_5c73bf61da4f6e6f15bae88ed1"`); - await queryRunner.query(`DROP INDEX "IDX_d70c86baedc68326be11f9c0ce"`); - await queryRunner.query(`DROP INDEX "IDX_66e1e1ecd2f29e57778af35b59"`); - await queryRunner.query(`DROP INDEX "IDX_92255988735563f0fe4aba1f05"`); - await queryRunner.query(`DROP INDEX "IDX_c5870993e25c3d5771f91f5003"`); - await queryRunner.query(`DROP INDEX "IDX_f170de677ea75ad4533de2723e"`); - await queryRunner.query(`DROP INDEX "IDX_7c184198ecf66a8d3ecb253ab3"`); - await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`); - await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__active_users_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___local_count"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_count"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__drive_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__federation_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__hashtag_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_count"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_count"`); - await queryRunner.query(`ALTER TABLE "__chart__instance" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__instance_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__instance" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__network" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__network_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__network" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__notes_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__per_user_drive_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__per_user_following_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__per_user_notes_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__per_user_reaction_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__test_grouped" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__test_grouped_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__test_grouped" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__test_unique_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" DROP COLUMN "___foo"`); - await queryRunner.query(`ALTER TABLE "__chart__test" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__test_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__test" DROP COLUMN "unique"`); - await queryRunner.query(`ALTER TABLE "__chart__users" DROP COLUMN "span"`); - await queryRunner.query(`DROP TYPE "public"."__chart__users_span_enum"`); - await queryRunner.query(`ALTER TABLE "__chart__users" DROP COLUMN "unique"`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__users" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__users_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__users" ADD "span" "__chart__users_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__test" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__test_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__test" ADD "span" "__chart__test_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" ADD "___foo" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__test_unique_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" ADD "span" "__chart__test_unique_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__test_grouped" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__test_grouped_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__test_grouped" ADD "span" "__chart__test_grouped_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__per_user_reaction_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ADD "span" "__chart__per_user_reaction_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__per_user_notes_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ADD "span" "__chart__per_user_notes_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__per_user_following_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ADD "span" "__chart__per_user_following_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__per_user_drive_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ADD "span" "__chart__per_user_drive_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__notes_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD "span" "__chart__notes_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__network" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__network_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__network" ADD "span" "__chart__network_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__instance_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ADD "span" "__chart__instance_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___remote_count" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___local_count" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__hashtag_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "span" "__chart__hashtag_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__federation_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "span" "__chart__federation_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__drive_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "span" "__chart__drive_span_enum" NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___remote_count" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___local_count" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique" jsonb NOT NULL DEFAULT '{}'`); - await queryRunner.query(`CREATE TYPE "public"."__chart__active_users_span_enum" AS ENUM('hour', 'day')`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "span" "__chart__active_users_span_enum" NOT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_f091abb24193d50c653c6b77fc" ON "__chart__users" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_7c184198ecf66a8d3ecb253ab3" ON "__chart__users" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_f170de677ea75ad4533de2723e" ON "__chart__test" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_c5870993e25c3d5771f91f5003" ON "__chart__test" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_92255988735563f0fe4aba1f05" ON "__chart__test" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_66e1e1ecd2f29e57778af35b59" ON "__chart__test_unique" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_d70c86baedc68326be11f9c0ce" ON "__chart__test_unique" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_5c73bf61da4f6e6f15bae88ed1" ON "__chart__test_unique" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_84e661abb7bd1e51b690d4b017" ON "__chart__test_grouped" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_a5133470f4825902e170328ca5" ON "__chart__test_grouped" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_2be7ec6cebddc14dc11e206686" ON "__chart__test_grouped" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_e316f01a6d24eb31db27f88262" ON "__chart__per_user_reaction" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_edeb73c09c3143a81bcb34d569" ON "__chart__per_user_reaction" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_65633a106bce43fc7c5c30a5c7" ON "__chart__per_user_reaction" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_f68a5ab958f9f5fa17a32ac23b" ON "__chart__per_user_notes" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_046feeb12e9ef5f783f409866a" ON "__chart__per_user_notes" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_8d2cbbc8114d90d19b44d626b6" ON "__chart__per_user_notes" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_4db3b84c7be0d3464714f3e0b1" ON "__chart__per_user_following" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f" ON "__chart__per_user_following" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_f92dd6d03f8d994f29987f6214" ON "__chart__per_user_following" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_f2aeafde2ae6fbad38e857631b" ON "__chart__per_user_drive" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53" ON "__chart__per_user_drive" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_328f259961e60c4fa0bfcf55ca" ON "__chart__per_user_drive" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_924fc196c80ca24bae01dd37e4" ON "__chart__notes" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_0c9a159c5082cbeef3ca6706b5" ON "__chart__notes" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_e69096589f11e3baa98ddd64d0" ON "__chart__notes" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_9ff6944f01acb756fdc92d7563" ON "__chart__network" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_08fac0eb3b11f04c200c0b40dd" ON "__chart__network" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_f8dd01baeded2ffa833e0a610a" ON "__chart__network" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_f5448d9633cff74208d850aabe" ON "__chart__instance" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_d0a4f79af5a97b08f37b547197" ON "__chart__instance" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_c12f0af4a66cdd30c2287ce8aa" ON "__chart__instance" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_6d6f156ceefc6bc5f273a0e370" ON "__chart__hashtag" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_49975586f50ed7b800fdd88fbd" ON "__chart__hashtag" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_fcc181fb8283009c61cc4083ef" ON "__chart__hashtag" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_e9cd07672b37d8966cf3709283" ON "__chart__federation" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_2d416e6af791a82e338c79d480" ON "__chart__federation" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_e447064455928cf627590ef527" ON "__chart__federation" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_06690fc959f1c9fdaf21928222" ON "__chart__drive" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_6e1df243476e20cbf86572ecc0" ON "__chart__drive" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_3fa0d0f17ca72e3dc80999a032" ON "__chart__drive" ("span") `); - await queryRunner.query(`CREATE INDEX "IDX_c26e2c1cbb6e911e0554b27416" ON "__chart__active_users" ("date", "group", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_20f57cc8f142c131340ee16742" ON "__chart__active_users" ("date", "span") `); - await queryRunner.query(`CREATE INDEX "IDX_15e91a03aeeac9dbccdf43fc06" ON "__chart__active_users" ("span") `); - } + constructor() { + this.name = "chartV21615965918224"; + } + async up(queryRunner) { + await queryRunner.query( + `DELETE FROM "__chart__active_users" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__drive" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__federation" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__hashtag" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__instance" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__network" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__notes" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_drive" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_following" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_notes" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_reaction" WHERE "span" = 'day'`, + ); + await queryRunner.query(`DELETE FROM "__chart__test" WHERE "span" = 'day'`); + await queryRunner.query( + `DELETE FROM "__chart__test_grouped" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__test_unique" WHERE "span" = 'day'`, + ); + await queryRunner.query( + `DELETE FROM "__chart__users" WHERE "span" = 'day'`, + ); + await queryRunner.query(`DROP INDEX "IDX_15e91a03aeeac9dbccdf43fc06"`); + await queryRunner.query(`DROP INDEX "IDX_20f57cc8f142c131340ee16742"`); + await queryRunner.query(`DROP INDEX "IDX_c26e2c1cbb6e911e0554b27416"`); + await queryRunner.query(`DROP INDEX "IDX_3fa0d0f17ca72e3dc80999a032"`); + await queryRunner.query(`DROP INDEX "IDX_6e1df243476e20cbf86572ecc0"`); + await queryRunner.query(`DROP INDEX "IDX_06690fc959f1c9fdaf21928222"`); + await queryRunner.query(`DROP INDEX "IDX_e447064455928cf627590ef527"`); + await queryRunner.query(`DROP INDEX "IDX_2d416e6af791a82e338c79d480"`); + await queryRunner.query(`DROP INDEX "IDX_e9cd07672b37d8966cf3709283"`); + await queryRunner.query(`DROP INDEX "IDX_fcc181fb8283009c61cc4083ef"`); + await queryRunner.query(`DROP INDEX "IDX_49975586f50ed7b800fdd88fbd"`); + await queryRunner.query(`DROP INDEX "IDX_6d6f156ceefc6bc5f273a0e370"`); + await queryRunner.query(`DROP INDEX "IDX_c12f0af4a66cdd30c2287ce8aa"`); + await queryRunner.query(`DROP INDEX "IDX_d0a4f79af5a97b08f37b547197"`); + await queryRunner.query(`DROP INDEX "IDX_f5448d9633cff74208d850aabe"`); + await queryRunner.query(`DROP INDEX "IDX_f8dd01baeded2ffa833e0a610a"`); + await queryRunner.query(`DROP INDEX "IDX_08fac0eb3b11f04c200c0b40dd"`); + await queryRunner.query(`DROP INDEX "IDX_9ff6944f01acb756fdc92d7563"`); + await queryRunner.query(`DROP INDEX "IDX_e69096589f11e3baa98ddd64d0"`); + await queryRunner.query(`DROP INDEX "IDX_0c9a159c5082cbeef3ca6706b5"`); + await queryRunner.query(`DROP INDEX "IDX_924fc196c80ca24bae01dd37e4"`); + await queryRunner.query(`DROP INDEX "IDX_328f259961e60c4fa0bfcf55ca"`); + await queryRunner.query(`DROP INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53"`); + await queryRunner.query(`DROP INDEX "IDX_f2aeafde2ae6fbad38e857631b"`); + await queryRunner.query(`DROP INDEX "IDX_f92dd6d03f8d994f29987f6214"`); + await queryRunner.query(`DROP INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f"`); + await queryRunner.query(`DROP INDEX "IDX_4db3b84c7be0d3464714f3e0b1"`); + await queryRunner.query(`DROP INDEX "IDX_8d2cbbc8114d90d19b44d626b6"`); + await queryRunner.query(`DROP INDEX "IDX_046feeb12e9ef5f783f409866a"`); + await queryRunner.query(`DROP INDEX "IDX_f68a5ab958f9f5fa17a32ac23b"`); + await queryRunner.query(`DROP INDEX "IDX_65633a106bce43fc7c5c30a5c7"`); + await queryRunner.query(`DROP INDEX "IDX_edeb73c09c3143a81bcb34d569"`); + await queryRunner.query(`DROP INDEX "IDX_e316f01a6d24eb31db27f88262"`); + await queryRunner.query(`DROP INDEX "IDX_2be7ec6cebddc14dc11e206686"`); + await queryRunner.query(`DROP INDEX "IDX_a5133470f4825902e170328ca5"`); + await queryRunner.query(`DROP INDEX "IDX_84e661abb7bd1e51b690d4b017"`); + await queryRunner.query(`DROP INDEX "IDX_5c73bf61da4f6e6f15bae88ed1"`); + await queryRunner.query(`DROP INDEX "IDX_d70c86baedc68326be11f9c0ce"`); + await queryRunner.query(`DROP INDEX "IDX_66e1e1ecd2f29e57778af35b59"`); + await queryRunner.query(`DROP INDEX "IDX_92255988735563f0fe4aba1f05"`); + await queryRunner.query(`DROP INDEX "IDX_c5870993e25c3d5771f91f5003"`); + await queryRunner.query(`DROP INDEX "IDX_f170de677ea75ad4533de2723e"`); + await queryRunner.query(`DROP INDEX "IDX_7c184198ecf66a8d3ecb253ab3"`); + await queryRunner.query(`DROP INDEX "IDX_f091abb24193d50c653c6b77fc"`); + await queryRunner.query(`DROP INDEX "IDX_a770a57c70e668cc61590c9161"`); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__active_users_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___local_count"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_count"`, + ); + await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "span"`); + await queryRunner.query(`DROP TYPE "public"."__chart__drive_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__federation_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "span"`, + ); + await queryRunner.query(`DROP TYPE "public"."__chart__hashtag_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_count"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_count"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" DROP COLUMN "span"`, + ); + await queryRunner.query(`DROP TYPE "public"."__chart__instance_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__instance" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" DROP COLUMN "span"`, + ); + await queryRunner.query(`DROP TYPE "public"."__chart__network_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__network" DROP COLUMN "unique"`, + ); + await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "span"`); + await queryRunner.query(`DROP TYPE "public"."__chart__notes_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__notes" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__per_user_drive_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__per_user_following_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__per_user_notes_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__per_user_reaction_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_grouped" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__test_grouped_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_grouped" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" DROP COLUMN "span"`, + ); + await queryRunner.query( + `DROP TYPE "public"."__chart__test_unique_span_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" DROP COLUMN "unique"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" DROP COLUMN "___foo"`, + ); + await queryRunner.query(`ALTER TABLE "__chart__test" DROP COLUMN "span"`); + await queryRunner.query(`DROP TYPE "public"."__chart__test_span_enum"`); + await queryRunner.query(`ALTER TABLE "__chart__test" DROP COLUMN "unique"`); + await queryRunner.query(`ALTER TABLE "__chart__users" DROP COLUMN "span"`); + await queryRunner.query(`DROP TYPE "public"."__chart__users_span_enum"`); + await queryRunner.query( + `ALTER TABLE "__chart__users" DROP COLUMN "unique"`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__users" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__users_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ADD "span" "__chart__users_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__test_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test" ADD "span" "__chart__test_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" ADD "___foo" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__test_unique_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" ADD "span" "__chart__test_unique_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_grouped" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__test_grouped_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_grouped" ADD "span" "__chart__test_grouped_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__per_user_reaction_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ADD "span" "__chart__per_user_reaction_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__per_user_notes_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ADD "span" "__chart__per_user_notes_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__per_user_following_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ADD "span" "__chart__per_user_following_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__per_user_drive_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ADD "span" "__chart__per_user_drive_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__notes_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD "span" "__chart__notes_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__network_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ADD "span" "__chart__network_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__instance_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ADD "span" "__chart__instance_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___remote_count" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___local_count" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__hashtag_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "span" "__chart__hashtag_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__federation_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "span" "__chart__federation_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__drive_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "span" "__chart__drive_span_enum" NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___remote_count" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___local_count" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique" jsonb NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."__chart__active_users_span_enum" AS ENUM('hour', 'day')`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "span" "__chart__active_users_span_enum" NOT NULL`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a770a57c70e668cc61590c9161" ON "__chart__users" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f091abb24193d50c653c6b77fc" ON "__chart__users" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7c184198ecf66a8d3ecb253ab3" ON "__chart__users" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f170de677ea75ad4533de2723e" ON "__chart__test" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c5870993e25c3d5771f91f5003" ON "__chart__test" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_92255988735563f0fe4aba1f05" ON "__chart__test" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_66e1e1ecd2f29e57778af35b59" ON "__chart__test_unique" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d70c86baedc68326be11f9c0ce" ON "__chart__test_unique" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5c73bf61da4f6e6f15bae88ed1" ON "__chart__test_unique" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_84e661abb7bd1e51b690d4b017" ON "__chart__test_grouped" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a5133470f4825902e170328ca5" ON "__chart__test_grouped" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2be7ec6cebddc14dc11e206686" ON "__chart__test_grouped" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e316f01a6d24eb31db27f88262" ON "__chart__per_user_reaction" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_edeb73c09c3143a81bcb34d569" ON "__chart__per_user_reaction" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_65633a106bce43fc7c5c30a5c7" ON "__chart__per_user_reaction" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f68a5ab958f9f5fa17a32ac23b" ON "__chart__per_user_notes" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_046feeb12e9ef5f783f409866a" ON "__chart__per_user_notes" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8d2cbbc8114d90d19b44d626b6" ON "__chart__per_user_notes" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4db3b84c7be0d3464714f3e0b1" ON "__chart__per_user_following" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_57b5458d0d3d6d1e7f13d4e57f" ON "__chart__per_user_following" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f92dd6d03f8d994f29987f6214" ON "__chart__per_user_following" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f2aeafde2ae6fbad38e857631b" ON "__chart__per_user_drive" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_42ea9381f0fda8dfe0fa1c8b53" ON "__chart__per_user_drive" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_328f259961e60c4fa0bfcf55ca" ON "__chart__per_user_drive" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_924fc196c80ca24bae01dd37e4" ON "__chart__notes" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0c9a159c5082cbeef3ca6706b5" ON "__chart__notes" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e69096589f11e3baa98ddd64d0" ON "__chart__notes" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9ff6944f01acb756fdc92d7563" ON "__chart__network" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_08fac0eb3b11f04c200c0b40dd" ON "__chart__network" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f8dd01baeded2ffa833e0a610a" ON "__chart__network" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f5448d9633cff74208d850aabe" ON "__chart__instance" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d0a4f79af5a97b08f37b547197" ON "__chart__instance" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c12f0af4a66cdd30c2287ce8aa" ON "__chart__instance" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6d6f156ceefc6bc5f273a0e370" ON "__chart__hashtag" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_49975586f50ed7b800fdd88fbd" ON "__chart__hashtag" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fcc181fb8283009c61cc4083ef" ON "__chart__hashtag" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e9cd07672b37d8966cf3709283" ON "__chart__federation" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2d416e6af791a82e338c79d480" ON "__chart__federation" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e447064455928cf627590ef527" ON "__chart__federation" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_06690fc959f1c9fdaf21928222" ON "__chart__drive" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6e1df243476e20cbf86572ecc0" ON "__chart__drive" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3fa0d0f17ca72e3dc80999a032" ON "__chart__drive" ("span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c26e2c1cbb6e911e0554b27416" ON "__chart__active_users" ("date", "group", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_20f57cc8f142c131340ee16742" ON "__chart__active_users" ("date", "span") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_15e91a03aeeac9dbccdf43fc06" ON "__chart__active_users" ("span") `, + ); + } } diff --git a/packages/backend/migration/1615966519402-chart-v2-2.js b/packages/backend/migration/1615966519402-chart-v2-2.js index c62f1b875c..ce75961035 100644 --- a/packages/backend/migration/1615966519402-chart-v2-2.js +++ b/packages/backend/migration/1615966519402-chart-v2-2.js @@ -1,21 +1,39 @@ - - export class chartV221615966519402 { - constructor() { - this.name = 'chartV221615966519402'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___local_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___remote_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___local_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___remote_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`); - await queryRunner.query(`ALTER TABLE "__chart__test_unique" ADD "___foo" character varying array NOT NULL DEFAULT '{}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__test_unique" DROP COLUMN "___foo"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`); - } + constructor() { + this.name = "chartV221615966519402"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___local_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___remote_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___local_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___remote_users" character varying array NOT NULL DEFAULT '{}'::varchar[]`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" ADD "___foo" character varying array NOT NULL DEFAULT '{}'::varchar[]`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__test_unique" DROP COLUMN "___foo"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`, + ); + } } diff --git a/packages/backend/migration/1618637372000-user-last-active-date.js b/packages/backend/migration/1618637372000-user-last-active-date.js index 6c77ace467..0211c256bc 100644 --- a/packages/backend/migration/1618637372000-user-last-active-date.js +++ b/packages/backend/migration/1618637372000-user-last-active-date.js @@ -1,15 +1,17 @@ - - export class userLastActiveDate1618637372000 { - constructor() { - this.name = 'userLastActiveDate1618637372000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "lastActiveDate" TIMESTAMP WITH TIME ZONE DEFAULT NULL`); - await queryRunner.query(`CREATE INDEX "IDX_seoignmeoprigmkpodgrjmkpormg" ON "user" ("lastActiveDate") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_seoignmeoprigmkpodgrjmkpormg"`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "lastActiveDate"`); - } + constructor() { + this.name = "userLastActiveDate1618637372000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "lastActiveDate" TIMESTAMP WITH TIME ZONE DEFAULT NULL`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_seoignmeoprigmkpodgrjmkpormg" ON "user" ("lastActiveDate") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_seoignmeoprigmkpodgrjmkpormg"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "lastActiveDate"`); + } } diff --git a/packages/backend/migration/1618639857000-user-hide-online-status.js b/packages/backend/migration/1618639857000-user-hide-online-status.js index e63c8ae11f..8d76326084 100644 --- a/packages/backend/migration/1618639857000-user-hide-online-status.js +++ b/packages/backend/migration/1618639857000-user-hide-online-status.js @@ -1,13 +1,15 @@ - - export class userHideOnlineStatus1618639857000 { - constructor() { - this.name = 'userHideOnlineStatus1618639857000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "hideOnlineStatus" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "hideOnlineStatus"`); - } + constructor() { + this.name = "userHideOnlineStatus1618639857000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "hideOnlineStatus" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" DROP COLUMN "hideOnlineStatus"`, + ); + } } diff --git a/packages/backend/migration/1619942102890-password-reset.js b/packages/backend/migration/1619942102890-password-reset.js index 922d225dc9..e3adeb95e7 100644 --- a/packages/backend/migration/1619942102890-password-reset.js +++ b/packages/backend/migration/1619942102890-password-reset.js @@ -1,19 +1,27 @@ - - export class passwordReset1619942102890 { - constructor() { - this.name = 'passwordReset1619942102890'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "password_reset_request" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_fcf4b02eae1403a2edaf87fd074" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0b575fa9a4cfe638a925949285" ON "password_reset_request" ("token") `); - await queryRunner.query(`CREATE INDEX "IDX_4bb7fd4a34492ae0e6cc8d30ac" ON "password_reset_request" ("userId") `); - await queryRunner.query(`ALTER TABLE "password_reset_request" ADD CONSTRAINT "FK_4bb7fd4a34492ae0e6cc8d30ac8" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "password_reset_request" DROP CONSTRAINT "FK_4bb7fd4a34492ae0e6cc8d30ac8"`); - await queryRunner.query(`DROP INDEX "IDX_4bb7fd4a34492ae0e6cc8d30ac"`); - await queryRunner.query(`DROP INDEX "IDX_0b575fa9a4cfe638a925949285"`); - await queryRunner.query(`DROP TABLE "password_reset_request"`); - } + constructor() { + this.name = "passwordReset1619942102890"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "password_reset_request" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "token" character varying(256) NOT NULL, "userId" character varying(32) NOT NULL, CONSTRAINT "PK_fcf4b02eae1403a2edaf87fd074" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0b575fa9a4cfe638a925949285" ON "password_reset_request" ("token") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4bb7fd4a34492ae0e6cc8d30ac" ON "password_reset_request" ("userId") `, + ); + await queryRunner.query( + `ALTER TABLE "password_reset_request" ADD CONSTRAINT "FK_4bb7fd4a34492ae0e6cc8d30ac8" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "password_reset_request" DROP CONSTRAINT "FK_4bb7fd4a34492ae0e6cc8d30ac8"`, + ); + await queryRunner.query(`DROP INDEX "IDX_4bb7fd4a34492ae0e6cc8d30ac"`); + await queryRunner.query(`DROP INDEX "IDX_0b575fa9a4cfe638a925949285"`); + await queryRunner.query(`DROP TABLE "password_reset_request"`); + } } diff --git a/packages/backend/migration/1620019354680-ad.js b/packages/backend/migration/1620019354680-ad.js index c96d2bfb33..e39b381013 100644 --- a/packages/backend/migration/1620019354680-ad.js +++ b/packages/backend/migration/1620019354680-ad.js @@ -1,17 +1,21 @@ - - export class ad1620019354680 { - constructor() { - this.name = 'ad1620019354680'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "ad" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "place" character varying(32) NOT NULL, "priority" character varying(32) NOT NULL, "url" character varying(1024) NOT NULL, "imageUrl" character varying(1024) NOT NULL, "memo" character varying(8192) NOT NULL, CONSTRAINT "PK_0193d5ef09746e88e9ea92c634d" PRIMARY KEY ("id")); COMMENT ON COLUMN "ad"."createdAt" IS 'The created date of the Ad.'; COMMENT ON COLUMN "ad"."expiresAt" IS 'The expired date of the Ad.'`); - await queryRunner.query(`CREATE INDEX "IDX_1129c2ef687fc272df040bafaa" ON "ad" ("createdAt") `); - await queryRunner.query(`CREATE INDEX "IDX_2da24ce20ad209f1d9dc032457" ON "ad" ("expiresAt") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_2da24ce20ad209f1d9dc032457"`); - await queryRunner.query(`DROP INDEX "IDX_1129c2ef687fc272df040bafaa"`); - await queryRunner.query(`DROP TABLE "ad"`); - } + constructor() { + this.name = "ad1620019354680"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "ad" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "expiresAt" TIMESTAMP WITH TIME ZONE NOT NULL, "place" character varying(32) NOT NULL, "priority" character varying(32) NOT NULL, "url" character varying(1024) NOT NULL, "imageUrl" character varying(1024) NOT NULL, "memo" character varying(8192) NOT NULL, CONSTRAINT "PK_0193d5ef09746e88e9ea92c634d" PRIMARY KEY ("id")); COMMENT ON COLUMN "ad"."createdAt" IS 'The created date of the Ad.'; COMMENT ON COLUMN "ad"."expiresAt" IS 'The expired date of the Ad.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_1129c2ef687fc272df040bafaa" ON "ad" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_2da24ce20ad209f1d9dc032457" ON "ad" ("expiresAt") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_2da24ce20ad209f1d9dc032457"`); + await queryRunner.query(`DROP INDEX "IDX_1129c2ef687fc272df040bafaa"`); + await queryRunner.query(`DROP TABLE "ad"`); + } } diff --git a/packages/backend/migration/1620364649428-ad2.js b/packages/backend/migration/1620364649428-ad2.js index db1c3e1de1..a61c3ef088 100644 --- a/packages/backend/migration/1620364649428-ad2.js +++ b/packages/backend/migration/1620364649428-ad2.js @@ -1,13 +1,13 @@ - - export class ad21620364649428 { - constructor() { - this.name = 'ad21620364649428'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "ad" ADD "ratio" integer NOT NULL DEFAULT '1'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "ad" DROP COLUMN "ratio"`); - } + constructor() { + this.name = "ad21620364649428"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "ad" ADD "ratio" integer NOT NULL DEFAULT '1'`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "ad" DROP COLUMN "ratio"`); + } } diff --git a/packages/backend/migration/1621479946000-add-note-indexes.js b/packages/backend/migration/1621479946000-add-note-indexes.js index dcf97fa4dc..f9ffbbff17 100644 --- a/packages/backend/migration/1621479946000-add-note-indexes.js +++ b/packages/backend/migration/1621479946000-add-note-indexes.js @@ -1,15 +1,22 @@ - - export class addNoteIndexes1621479946000 { - constructor() { - this.name = 'addNoteIndexes1621479946000'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_NOTE_MENTIONS" ON "note" USING gin ("mentions")`, undefined); - await queryRunner.query(`CREATE INDEX "IDX_NOTE_VISIBLE_USER_IDS" ON "note" USING gin ("visibleUserIds")`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_NOTE_MENTIONS"`, undefined); - await queryRunner.query(`DROP INDEX "IDX_NOTE_VISIBLE_USER_IDS"`, undefined); - } + constructor() { + this.name = "addNoteIndexes1621479946000"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_NOTE_MENTIONS" ON "note" USING gin ("mentions")`, + undefined, + ); + await queryRunner.query( + `CREATE INDEX "IDX_NOTE_VISIBLE_USER_IDS" ON "note" USING gin ("visibleUserIds")`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_NOTE_MENTIONS"`, undefined); + await queryRunner.query( + `DROP INDEX "IDX_NOTE_VISIBLE_USER_IDS"`, + undefined, + ); + } } diff --git a/packages/backend/migration/1622679304522-user-profile-description-length.js b/packages/backend/migration/1622679304522-user-profile-description-length.js index 22f6c1c5d9..7c761c92a1 100644 --- a/packages/backend/migration/1622679304522-user-profile-description-length.js +++ b/packages/backend/migration/1622679304522-user-profile-description-length.js @@ -1,13 +1,17 @@ - - export class userProfileDescriptionLength1622679304522 { - constructor() { - this.name = 'userProfileDescriptionLength1622679304522'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE character varying(2048)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE character varying(1024)`, undefined); - } + constructor() { + this.name = "userProfileDescriptionLength1622679304522"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE character varying(2048)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE character varying(1024)`, + undefined, + ); + } } diff --git a/packages/backend/migration/1622681548499-log-message-length.js b/packages/backend/migration/1622681548499-log-message-length.js index ac16c0e1ba..9dfb7ed3d2 100644 --- a/packages/backend/migration/1622681548499-log-message-length.js +++ b/packages/backend/migration/1622681548499-log-message-length.js @@ -1,13 +1,17 @@ - - export class logMessageLength1622681548499 { - constructor() { - this.name = 'logMessageLength1622681548499'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "log" ALTER COLUMN "message" TYPE character varying(2048)`, undefined); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "log" ALTER COLUMN "message" TYPE character varying(1024)`, undefined); - } + constructor() { + this.name = "logMessageLength1622681548499"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "log" ALTER COLUMN "message" TYPE character varying(2048)`, + undefined, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "log" ALTER COLUMN "message" TYPE character varying(1024)`, + undefined, + ); + } } diff --git a/packages/backend/migration/1626509500668-fix-remote-file-proxy.js b/packages/backend/migration/1626509500668-fix-remote-file-proxy.js index 30c562007b..f79cfb0066 100644 --- a/packages/backend/migration/1626509500668-fix-remote-file-proxy.js +++ b/packages/backend/migration/1626509500668-fix-remote-file-proxy.js @@ -1,22 +1,31 @@ - - export 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)`); - } + 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)`, + ); + } } - diff --git a/packages/backend/migration/1626733991004-allowlist-secure-mode.js b/packages/backend/migration/1626733991004-allowlist-secure-mode.js index aa3fcf8752..6d2dd6842f 100644 --- a/packages/backend/migration/1626733991004-allowlist-secure-mode.js +++ b/packages/backend/migration/1626733991004-allowlist-secure-mode.js @@ -1,11 +1,15 @@ - - -export class allowlistSecureMode1626733991004 { - name = 'allowlistSecureMode1626733991004'; +export class allowlistSecureMode1626733991004 { + name = "allowlistSecureMode1626733991004"; async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "allowedHosts" character varying(256) [] default '{}'`); - await queryRunner.query(`ALTER TABLE "meta" ADD "secureMode" bool default false`); - await queryRunner.query(`ALTER TABLE "meta" ADD "privateMode" bool default false`); + await queryRunner.query( + `ALTER TABLE "meta" ADD "allowedHosts" character varying(256) [] default '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "secureMode" bool default false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "privateMode" bool default false`, + ); } async down(queryRunner) { @@ -14,4 +18,3 @@ export class allowlistSecureMode1626733991004 { await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "privateMode"`); } } - diff --git a/packages/backend/migration/1629004542760-chart-reindex.js b/packages/backend/migration/1629004542760-chart-reindex.js index a7d459276d..8cc564b32e 100644 --- a/packages/backend/migration/1629004542760-chart-reindex.js +++ b/packages/backend/migration/1629004542760-chart-reindex.js @@ -1,181 +1,357 @@ - - export class chartReindex1629004542760 { - constructor() { - this.name = 'chartReindex1629004542760'; - } - async up(queryRunner) { - await queryRunner.query(`DELETE FROM "__chart__active_users" a USING "__chart__active_users" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__drive" a USING "__chart__drive" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__federation" a USING "__chart__federation" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__hashtag" a USING "__chart__hashtag" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__instance" a USING "__chart__instance" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__network" a USING "__chart__network" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__notes" a USING "__chart__notes" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__per_user_drive" a USING "__chart__per_user_drive" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__per_user_following" a USING "__chart__per_user_following" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__per_user_notes" a USING "__chart__per_user_notes" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__per_user_reaction" a USING "__chart__per_user_reaction" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__test_grouped" a USING "__chart__test_grouped" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__test_unique" a USING "__chart__test_unique" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DELETE FROM "__chart__users" a USING "__chart__users" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`); - await queryRunner.query(`DROP INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc"`); - await queryRunner.query(`DROP INDEX "IDX_00ed5f86db1f7efafb1978bf21"`); - await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); - await queryRunner.query(`DROP INDEX "IDX_13565815f618a1ff53886c5b28"`); - await queryRunner.query(`DROP INDEX "IDX_7a170f67425e62a8fabb76c872"`); - await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); - await queryRunner.query(`DROP INDEX "IDX_36cb699c49580d4e6c2e6159f9"`); - await queryRunner.query(`DROP INDEX "IDX_76e87c7bfc5d925fcbba405d84"`); - await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); - await queryRunner.query(`DROP INDEX "IDX_07747a1038c05f532a718fe1de"`); - await queryRunner.query(`DROP INDEX "IDX_99a7d2faaef84a6f728d714ad6"`); - await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); - await queryRunner.query(`DROP INDEX "IDX_6b8f34a1a64b06014b6fb66824"`); - await queryRunner.query(`DROP INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63"`); - await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); - await queryRunner.query(`DROP INDEX "IDX_a1efd3e0048a5f2793a47360dc"`); - await queryRunner.query(`DROP INDEX "IDX_7b5da130992ec9df96712d4290"`); - await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); - await queryRunner.query(`DROP INDEX "IDX_42eb716a37d381cdf566192b2b"`); - await queryRunner.query(`DROP INDEX "IDX_7036f2957151588b813185c794"`); - await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); - await queryRunner.query(`DROP INDEX "IDX_5f86db6492274e07c1a3cdf286"`); - await queryRunner.query(`DROP INDEX "IDX_e496ca8096d28f6b9b509264dc"`); - await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); - await queryRunner.query(`DROP INDEX "IDX_7af07790712aa3438ff6773f3b"`); - await queryRunner.query(`DROP INDEX "IDX_4b3593098b6edc9c5afe36b18b"`); - await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); - await queryRunner.query(`DROP INDEX "IDX_84234bd1abb873f07329681c83"`); - await queryRunner.query(`DROP INDEX "IDX_55bf20f366979f2436de99206b"`); - await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); - await queryRunner.query(`DROP INDEX "IDX_f7bf4c62059764c2c2bb40fdab"`); - await queryRunner.query(`DROP INDEX "IDX_8cf3156fd7a6b15c43459c6e3b"`); - await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); - await queryRunner.query(`DROP INDEX "IDX_0c641990ecf47d2545df4edb75"`); - await queryRunner.query(`DROP INDEX "IDX_234dff3c0b56a6150b95431ab9"`); - await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); - await queryRunner.query(`DROP INDEX "IDX_437bab3c6061d90f6bb65fd2cc"`); - await queryRunner.query(`DROP INDEX "IDX_bbfa573a8181018851ed0b6357"`); - await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); - await queryRunner.query(`DROP INDEX "IDX_b070a906db04b44c67c6c2144d"`); - await queryRunner.query(`DROP INDEX "IDX_d41cce6aee1a50bfc062038f9b"`); - await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); - await queryRunner.query(`DROP INDEX "IDX_845254b3eaf708ae8a6cac3026"`); - await queryRunner.query(`DROP INDEX "IDX_ed9b95919c672a13008e9487ee"`); - await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_60c5c6e7e538c09aa274ecd1cf" ON "__chart__active_users" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d" ON "__chart__drive" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_eddfed8fb40305a04c6f941050" ON "__chart__federation" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_53a3604b939e2b479eb2cfaac8" ON "__chart__hashtag" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8111b817b9818c04d7eb8475b1" ON "__chart__instance" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_2082327b2699ce924fa654afc5" ON "__chart__network" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e60c358aaced5aab8900a4af31" ON "__chart__notes" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a9a806d466b314f253a1a611c4" ON "__chart__per_user_drive" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dabbb38a51ab86ee3cab291326" ON "__chart__per_user_following" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_583a157ed0cf0ed1b5ec2a833f" ON "__chart__per_user_notes" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_3b7697a96f522d0478972e6d6f" ON "__chart__per_user_reaction" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_da522b4008a9f5d7743b87ad55" ON "__chart__test_grouped" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_16effb2e888f6763673b579f80" ON "__chart__test_unique" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dab383a36f3c9db4a0c9b02cf3" ON "__chart__test" ("date") WHERE "group" IS NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_66feba81e1795d176d06c0b1e6" ON "__chart__users" ("date") WHERE "group" IS NULL`); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_66feba81e1795d176d06c0b1e6"`); - await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); - await queryRunner.query(`DROP INDEX "IDX_dab383a36f3c9db4a0c9b02cf3"`); - await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); - await queryRunner.query(`DROP INDEX "IDX_16effb2e888f6763673b579f80"`); - await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); - await queryRunner.query(`DROP INDEX "IDX_da522b4008a9f5d7743b87ad55"`); - await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); - await queryRunner.query(`DROP INDEX "IDX_3b7697a96f522d0478972e6d6f"`); - await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); - await queryRunner.query(`DROP INDEX "IDX_583a157ed0cf0ed1b5ec2a833f"`); - await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); - await queryRunner.query(`DROP INDEX "IDX_dabbb38a51ab86ee3cab291326"`); - await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); - await queryRunner.query(`DROP INDEX "IDX_a9a806d466b314f253a1a611c4"`); - await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); - await queryRunner.query(`DROP INDEX "IDX_e60c358aaced5aab8900a4af31"`); - await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); - await queryRunner.query(`DROP INDEX "IDX_2082327b2699ce924fa654afc5"`); - await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); - await queryRunner.query(`DROP INDEX "IDX_8111b817b9818c04d7eb8475b1"`); - await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); - await queryRunner.query(`DROP INDEX "IDX_53a3604b939e2b479eb2cfaac8"`); - await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); - await queryRunner.query(`DROP INDEX "IDX_eddfed8fb40305a04c6f941050"`); - await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); - await queryRunner.query(`DROP INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d"`); - await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); - await queryRunner.query(`DROP INDEX "IDX_60c5c6e7e538c09aa274ecd1cf"`); - await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); - await queryRunner.query(`DROP INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5"`); - await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); - await queryRunner.query(`DROP INDEX "IDX_c8cc87bd0f2f4487d17c651fbf"`); - await queryRunner.query(`DROP INDEX "IDX_754499f9b2642336433769518d"`); - await queryRunner.query(`DROP INDEX "IDX_315c779174fe8247ab324f036e"`); - await queryRunner.query(`DROP INDEX "IDX_c5d46cbfda48b1c33ed852e21b"`); - await queryRunner.query(`CREATE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_ed9b95919c672a13008e9487ee" ON "__chart__users" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_d41cce6aee1a50bfc062038f9b" ON "__chart__test" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_b070a906db04b44c67c6c2144d" ON "__chart__test" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_bbfa573a8181018851ed0b6357" ON "__chart__test_unique" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_437bab3c6061d90f6bb65fd2cc" ON "__chart__test_unique" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_234dff3c0b56a6150b95431ab9" ON "__chart__test_grouped" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_0c641990ecf47d2545df4edb75" ON "__chart__test_grouped" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_8cf3156fd7a6b15c43459c6e3b" ON "__chart__per_user_reaction" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_f7bf4c62059764c2c2bb40fdab" ON "__chart__per_user_reaction" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_55bf20f366979f2436de99206b" ON "__chart__per_user_notes" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_84234bd1abb873f07329681c83" ON "__chart__per_user_notes" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_4b3593098b6edc9c5afe36b18b" ON "__chart__per_user_following" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_7af07790712aa3438ff6773f3b" ON "__chart__per_user_following" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_e496ca8096d28f6b9b509264dc" ON "__chart__per_user_drive" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_5f86db6492274e07c1a3cdf286" ON "__chart__per_user_drive" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_7036f2957151588b813185c794" ON "__chart__notes" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_7b5da130992ec9df96712d4290" ON "__chart__network" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63" ON "__chart__instance" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_6b8f34a1a64b06014b6fb66824" ON "__chart__instance" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_99a7d2faaef84a6f728d714ad6" ON "__chart__hashtag" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_07747a1038c05f532a718fe1de" ON "__chart__hashtag" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_76e87c7bfc5d925fcbba405d84" ON "__chart__federation" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_7a170f67425e62a8fabb76c872" ON "__chart__drive" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `); - await queryRunner.query(`CREATE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `); - await queryRunner.query(`CREATE INDEX "IDX_00ed5f86db1f7efafb1978bf21" ON "__chart__active_users" ("group") `); - await queryRunner.query(`CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `); - } + constructor() { + this.name = "chartReindex1629004542760"; + } + async up(queryRunner) { + await queryRunner.query( + `DELETE FROM "__chart__active_users" a USING "__chart__active_users" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__drive" a USING "__chart__drive" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__federation" a USING "__chart__federation" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__hashtag" a USING "__chart__hashtag" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__instance" a USING "__chart__instance" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__network" a USING "__chart__network" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__notes" a USING "__chart__notes" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_drive" a USING "__chart__per_user_drive" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_following" a USING "__chart__per_user_following" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_notes" a USING "__chart__per_user_notes" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__per_user_reaction" a USING "__chart__per_user_reaction" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__test_grouped" a USING "__chart__test_grouped" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__test_unique" a USING "__chart__test_unique" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query( + `DELETE FROM "__chart__users" a USING "__chart__users" b WHERE a.id < b.id AND ((a.group IS NULL AND b.group IS NULL) OR a.group = b.group) AND a.date = b.date;`, + ); + await queryRunner.query(`DROP INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc"`); + await queryRunner.query(`DROP INDEX "IDX_00ed5f86db1f7efafb1978bf21"`); + await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); + await queryRunner.query(`DROP INDEX "IDX_13565815f618a1ff53886c5b28"`); + await queryRunner.query(`DROP INDEX "IDX_7a170f67425e62a8fabb76c872"`); + await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); + await queryRunner.query(`DROP INDEX "IDX_36cb699c49580d4e6c2e6159f9"`); + await queryRunner.query(`DROP INDEX "IDX_76e87c7bfc5d925fcbba405d84"`); + await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); + await queryRunner.query(`DROP INDEX "IDX_07747a1038c05f532a718fe1de"`); + await queryRunner.query(`DROP INDEX "IDX_99a7d2faaef84a6f728d714ad6"`); + await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); + await queryRunner.query(`DROP INDEX "IDX_6b8f34a1a64b06014b6fb66824"`); + await queryRunner.query(`DROP INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63"`); + await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); + await queryRunner.query(`DROP INDEX "IDX_a1efd3e0048a5f2793a47360dc"`); + await queryRunner.query(`DROP INDEX "IDX_7b5da130992ec9df96712d4290"`); + await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); + await queryRunner.query(`DROP INDEX "IDX_42eb716a37d381cdf566192b2b"`); + await queryRunner.query(`DROP INDEX "IDX_7036f2957151588b813185c794"`); + await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); + await queryRunner.query(`DROP INDEX "IDX_5f86db6492274e07c1a3cdf286"`); + await queryRunner.query(`DROP INDEX "IDX_e496ca8096d28f6b9b509264dc"`); + await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); + await queryRunner.query(`DROP INDEX "IDX_7af07790712aa3438ff6773f3b"`); + await queryRunner.query(`DROP INDEX "IDX_4b3593098b6edc9c5afe36b18b"`); + await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); + await queryRunner.query(`DROP INDEX "IDX_84234bd1abb873f07329681c83"`); + await queryRunner.query(`DROP INDEX "IDX_55bf20f366979f2436de99206b"`); + await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); + await queryRunner.query(`DROP INDEX "IDX_f7bf4c62059764c2c2bb40fdab"`); + await queryRunner.query(`DROP INDEX "IDX_8cf3156fd7a6b15c43459c6e3b"`); + await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); + await queryRunner.query(`DROP INDEX "IDX_0c641990ecf47d2545df4edb75"`); + await queryRunner.query(`DROP INDEX "IDX_234dff3c0b56a6150b95431ab9"`); + await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); + await queryRunner.query(`DROP INDEX "IDX_437bab3c6061d90f6bb65fd2cc"`); + await queryRunner.query(`DROP INDEX "IDX_bbfa573a8181018851ed0b6357"`); + await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); + await queryRunner.query(`DROP INDEX "IDX_b070a906db04b44c67c6c2144d"`); + await queryRunner.query(`DROP INDEX "IDX_d41cce6aee1a50bfc062038f9b"`); + await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); + await queryRunner.query(`DROP INDEX "IDX_845254b3eaf708ae8a6cac3026"`); + await queryRunner.query(`DROP INDEX "IDX_ed9b95919c672a13008e9487ee"`); + await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_60c5c6e7e538c09aa274ecd1cf" ON "__chart__active_users" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d" ON "__chart__drive" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_eddfed8fb40305a04c6f941050" ON "__chart__federation" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_53a3604b939e2b479eb2cfaac8" ON "__chart__hashtag" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_8111b817b9818c04d7eb8475b1" ON "__chart__instance" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_2082327b2699ce924fa654afc5" ON "__chart__network" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e60c358aaced5aab8900a4af31" ON "__chart__notes" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a9a806d466b314f253a1a611c4" ON "__chart__per_user_drive" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_dabbb38a51ab86ee3cab291326" ON "__chart__per_user_following" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_583a157ed0cf0ed1b5ec2a833f" ON "__chart__per_user_notes" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_3b7697a96f522d0478972e6d6f" ON "__chart__per_user_reaction" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_da522b4008a9f5d7743b87ad55" ON "__chart__test_grouped" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_16effb2e888f6763673b579f80" ON "__chart__test_unique" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_dab383a36f3c9db4a0c9b02cf3" ON "__chart__test" ("date") WHERE "group" IS NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_66feba81e1795d176d06c0b1e6" ON "__chart__users" ("date") WHERE "group" IS NULL`, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_66feba81e1795d176d06c0b1e6"`); + await queryRunner.query(`DROP INDEX "IDX_337e9599f278bd7537fe30876f"`); + await queryRunner.query(`DROP INDEX "IDX_dab383a36f3c9db4a0c9b02cf3"`); + await queryRunner.query(`DROP INDEX "IDX_a319e5dbf47e8a17497623beae"`); + await queryRunner.query(`DROP INDEX "IDX_16effb2e888f6763673b579f80"`); + await queryRunner.query(`DROP INDEX "IDX_a0cd75442dd10d0643a17c4a49"`); + await queryRunner.query(`DROP INDEX "IDX_da522b4008a9f5d7743b87ad55"`); + await queryRunner.query(`DROP INDEX "IDX_b14489029e4b3aaf4bba5fb524"`); + await queryRunner.query(`DROP INDEX "IDX_3b7697a96f522d0478972e6d6f"`); + await queryRunner.query(`DROP INDEX "IDX_229a41ad465f9205f1f5703291"`); + await queryRunner.query(`DROP INDEX "IDX_583a157ed0cf0ed1b5ec2a833f"`); + await queryRunner.query(`DROP INDEX "IDX_5048e9daccbbbc6d567bb142d3"`); + await queryRunner.query(`DROP INDEX "IDX_dabbb38a51ab86ee3cab291326"`); + await queryRunner.query(`DROP INDEX "IDX_b77d4dd9562c3a899d9a286fcd"`); + await queryRunner.query(`DROP INDEX "IDX_a9a806d466b314f253a1a611c4"`); + await queryRunner.query(`DROP INDEX "IDX_30bf67687f483ace115c5ca642"`); + await queryRunner.query(`DROP INDEX "IDX_e60c358aaced5aab8900a4af31"`); + await queryRunner.query(`DROP INDEX "IDX_f09d543e3acb16c5976bdb31fa"`); + await queryRunner.query(`DROP INDEX "IDX_2082327b2699ce924fa654afc5"`); + await queryRunner.query(`DROP INDEX "IDX_0a905b992fecd2b5c3fb98759e"`); + await queryRunner.query(`DROP INDEX "IDX_8111b817b9818c04d7eb8475b1"`); + await queryRunner.query(`DROP INDEX "IDX_39ee857ab2f23493037c6b6631"`); + await queryRunner.query(`DROP INDEX "IDX_53a3604b939e2b479eb2cfaac8"`); + await queryRunner.query(`DROP INDEX "IDX_25a97c02003338124b2b75fdbc"`); + await queryRunner.query(`DROP INDEX "IDX_eddfed8fb40305a04c6f941050"`); + await queryRunner.query(`DROP INDEX "IDX_dd907becf76104e4b656659e6b"`); + await queryRunner.query(`DROP INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d"`); + await queryRunner.query(`DROP INDEX "IDX_3313d7288855ec105b5bbf6c21"`); + await queryRunner.query(`DROP INDEX "IDX_60c5c6e7e538c09aa274ecd1cf"`); + await queryRunner.query(`DROP INDEX "IDX_9a3ed15a30ab7e3a37702e6e08"`); + await queryRunner.query(`DROP INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5"`); + await queryRunner.query(`DROP INDEX "IDX_f22169eb10657bded6d875ac8f"`); + await queryRunner.query(`DROP INDEX "IDX_c8cc87bd0f2f4487d17c651fbf"`); + await queryRunner.query(`DROP INDEX "IDX_754499f9b2642336433769518d"`); + await queryRunner.query(`DROP INDEX "IDX_315c779174fe8247ab324f036e"`); + await queryRunner.query(`DROP INDEX "IDX_c5d46cbfda48b1c33ed852e21b"`); + await queryRunner.query( + `CREATE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_ed9b95919c672a13008e9487ee" ON "__chart__users" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a319e5dbf47e8a17497623beae" ON "__chart__test" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d41cce6aee1a50bfc062038f9b" ON "__chart__test" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b070a906db04b44c67c6c2144d" ON "__chart__test" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a0cd75442dd10d0643a17c4a49" ON "__chart__test_unique" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_bbfa573a8181018851ed0b6357" ON "__chart__test_unique" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_437bab3c6061d90f6bb65fd2cc" ON "__chart__test_unique" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b14489029e4b3aaf4bba5fb524" ON "__chart__test_grouped" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_234dff3c0b56a6150b95431ab9" ON "__chart__test_grouped" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0c641990ecf47d2545df4edb75" ON "__chart__test_grouped" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8cf3156fd7a6b15c43459c6e3b" ON "__chart__per_user_reaction" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f7bf4c62059764c2c2bb40fdab" ON "__chart__per_user_reaction" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_55bf20f366979f2436de99206b" ON "__chart__per_user_notes" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_84234bd1abb873f07329681c83" ON "__chart__per_user_notes" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_4b3593098b6edc9c5afe36b18b" ON "__chart__per_user_following" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7af07790712aa3438ff6773f3b" ON "__chart__per_user_following" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_e496ca8096d28f6b9b509264dc" ON "__chart__per_user_drive" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5f86db6492274e07c1a3cdf286" ON "__chart__per_user_drive" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7036f2957151588b813185c794" ON "__chart__notes" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7b5da130992ec9df96712d4290" ON "__chart__network" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_da8a46ba84ca1d8bb5a29bfb63" ON "__chart__instance" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_6b8f34a1a64b06014b6fb66824" ON "__chart__instance" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_99a7d2faaef84a6f728d714ad6" ON "__chart__hashtag" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_07747a1038c05f532a718fe1de" ON "__chart__hashtag" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_76e87c7bfc5d925fcbba405d84" ON "__chart__federation" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7a170f67425e62a8fabb76c872" ON "__chart__drive" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_00ed5f86db1f7efafb1978bf21" ON "__chart__active_users" ("group") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `, + ); + } } diff --git a/packages/backend/migration/1629024377804-deepl-integration.js b/packages/backend/migration/1629024377804-deepl-integration.js index 19c49ffcde..1dd5465fba 100644 --- a/packages/backend/migration/1629024377804-deepl-integration.js +++ b/packages/backend/migration/1629024377804-deepl-integration.js @@ -1,13 +1,13 @@ - - export class deeplIntegration1629024377804 { - constructor() { - this.name = 'deeplIntegration1629024377804'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "deeplAuthKey" character varying(128)`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "deeplAuthKey"`); - } + constructor() { + this.name = "deeplIntegration1629024377804"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "deeplAuthKey" character varying(128)`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "deeplAuthKey"`); + } } diff --git a/packages/backend/migration/1629288472000-fix-channel-userId.js b/packages/backend/migration/1629288472000-fix-channel-userId.js index 02a1199b09..e02549b11a 100644 --- a/packages/backend/migration/1629288472000-fix-channel-userId.js +++ b/packages/backend/migration/1629288472000-fix-channel-userId.js @@ -1,13 +1,15 @@ - - export class fixChannelUserId1629288472000 { - constructor() { - this.name = 'fixChannelUserId1629288472000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" DROP NOT NULL;`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "channel" ALTER COLUMN "userId" SET NOT NULL;`); - } + constructor() { + this.name = "fixChannelUserId1629288472000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "channel" ALTER COLUMN "userId" DROP NOT NULL;`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "channel" ALTER COLUMN "userId" SET NOT NULL;`, + ); + } } diff --git a/packages/backend/migration/1629512953000-user-is-deleted.js b/packages/backend/migration/1629512953000-user-is-deleted.js index a7848d5690..448535276f 100644 --- a/packages/backend/migration/1629512953000-user-is-deleted.js +++ b/packages/backend/migration/1629512953000-user-is-deleted.js @@ -1,14 +1,16 @@ - - export class isUserDeleted1629512953000 { - constructor() { - this.name = 'isUserDeleted1629512953000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "isDeleted" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`COMMENT ON COLUMN "user"."isDeleted" IS 'Whether the User is deleted.'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isDeleted"`); - } + constructor() { + this.name = "isUserDeleted1629512953000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "isDeleted" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."isDeleted" IS 'Whether the User is deleted.'`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isDeleted"`); + } } diff --git a/packages/backend/migration/1629778475000-deepl-integration2.js b/packages/backend/migration/1629778475000-deepl-integration2.js index 699f06c768..138e00d247 100644 --- a/packages/backend/migration/1629778475000-deepl-integration2.js +++ b/packages/backend/migration/1629778475000-deepl-integration2.js @@ -1,13 +1,13 @@ - - export class deeplIntegration21629778475000 { - constructor() { - this.name = 'deeplIntegration21629778475000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "deeplIsPro" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "deeplIsPro"`); - } + constructor() { + this.name = "deeplIntegration21629778475000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "deeplIsPro" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "deeplIsPro"`); + } } diff --git a/packages/backend/migration/1629833361000-AddShowTLReplies.js b/packages/backend/migration/1629833361000-AddShowTLReplies.js index 5d4c938a7b..78e9f417b7 100644 --- a/packages/backend/migration/1629833361000-AddShowTLReplies.js +++ b/packages/backend/migration/1629833361000-AddShowTLReplies.js @@ -1,14 +1,18 @@ - - export class addShowTLReplies1629833361000 { constructor() { - this.name = 'addShowTLReplies1629833361000'; + this.name = "addShowTLReplies1629833361000"; } async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "showTimelineReplies" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`COMMENT ON COLUMN "user"."showTimelineReplies" IS 'Whether to show users replying to other users in the timeline.'`); + await queryRunner.query( + `ALTER TABLE "user" ADD "showTimelineReplies" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."showTimelineReplies" IS 'Whether to show users replying to other users in the timeline.'`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "showTimelineReplies"`); + await queryRunner.query( + `ALTER TABLE "user" DROP COLUMN "showTimelineReplies"`, + ); } } diff --git a/packages/backend/migration/1629968054000_userInstanceBlocks.js b/packages/backend/migration/1629968054000_userInstanceBlocks.js index 1f202d9f66..666aaba284 100644 --- a/packages/backend/migration/1629968054000_userInstanceBlocks.js +++ b/packages/backend/migration/1629968054000_userInstanceBlocks.js @@ -1,14 +1,18 @@ - - export class userInstanceBlocks1629968054000 { constructor() { - this.name = 'userInstanceBlocks1629968054000'; + this.name = "userInstanceBlocks1629968054000"; } async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "mutedInstances" jsonb NOT NULL DEFAULT '[]'`); - await queryRunner.query(`COMMENT ON COLUMN "user_profile"."mutedInstances" IS 'List of instances muted by the user.'`); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "mutedInstances" jsonb NOT NULL DEFAULT '[]'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user_profile"."mutedInstances" IS 'List of instances muted by the user.'`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "mutedInstances"`); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "mutedInstances"`, + ); } } diff --git a/packages/backend/migration/1633068642000-email-required-for-signup.js b/packages/backend/migration/1633068642000-email-required-for-signup.js index d592f3ca21..45c0894a75 100644 --- a/packages/backend/migration/1633068642000-email-required-for-signup.js +++ b/packages/backend/migration/1633068642000-email-required-for-signup.js @@ -1,13 +1,15 @@ - - export class emailRequiredForSignup1633068642000 { - constructor() { - this.name = 'emailRequiredForSignup1633068642000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "emailRequiredForSignup" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "emailRequiredForSignup"`); - } + constructor() { + this.name = "emailRequiredForSignup1633068642000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "emailRequiredForSignup" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "emailRequiredForSignup"`, + ); + } } diff --git a/packages/backend/migration/1633071909016-user-pending.js b/packages/backend/migration/1633071909016-user-pending.js index 17cf5c11be..b37e51629d 100644 --- a/packages/backend/migration/1633071909016-user-pending.js +++ b/packages/backend/migration/1633071909016-user-pending.js @@ -1,15 +1,17 @@ - - export class userPending1633071909016 { - constructor() { - this.name = 'userPending1633071909016'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "user_pending" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "code" character varying(128) NOT NULL, "username" character varying(128) NOT NULL, "email" character varying(128) NOT NULL, "password" character varying(128) NOT NULL, CONSTRAINT "PK_d4c84e013c98ec02d19b8fbbafa" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_4e5c4c99175638ec0761714ab0" ON "user_pending" ("code") `); - } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "IDX_4e5c4c99175638ec0761714ab0"`); - await queryRunner.query(`DROP TABLE "user_pending"`); - } + constructor() { + this.name = "userPending1633071909016"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "user_pending" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "code" character varying(128) NOT NULL, "username" character varying(128) NOT NULL, "email" character varying(128) NOT NULL, "password" character varying(128) NOT NULL, CONSTRAINT "PK_d4c84e013c98ec02d19b8fbbafa" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_4e5c4c99175638ec0761714ab0" ON "user_pending" ("code") `, + ); + } + async down(queryRunner) { + await queryRunner.query(`DROP INDEX "IDX_4e5c4c99175638ec0761714ab0"`); + await queryRunner.query(`DROP TABLE "user_pending"`); + } } diff --git a/packages/backend/migration/1634486652000-user-public-reactions.js b/packages/backend/migration/1634486652000-user-public-reactions.js index e741122491..95b957f11c 100644 --- a/packages/backend/migration/1634486652000-user-public-reactions.js +++ b/packages/backend/migration/1634486652000-user-public-reactions.js @@ -1,13 +1,15 @@ - - export class userPublicReactions1634486652000 { - constructor() { - this.name = 'userPublicReactions1634486652000'; - } - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "publicReactions" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "publicReactions"`); - } + constructor() { + this.name = "userPublicReactions1634486652000"; + } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "publicReactions" boolean NOT NULL DEFAULT false`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "publicReactions"`, + ); + } } diff --git a/packages/backend/migration/1634902659689-delete-log.js b/packages/backend/migration/1634902659689-delete-log.js index 555a0020c3..fc148f0988 100644 --- a/packages/backend/migration/1634902659689-delete-log.js +++ b/packages/backend/migration/1634902659689-delete-log.js @@ -1,12 +1,9 @@ - - export class deleteLog1634902659689 { - constructor() { - this.name = 'deleteLog1634902659689'; - } - async up(queryRunner) { - await queryRunner.query(`DROP TABLE "log"`); - } - async down(queryRunner) { - } + constructor() { + this.name = "deleteLog1634902659689"; + } + async up(queryRunner) { + await queryRunner.query(`DROP TABLE "log"`); + } + async down(queryRunner) {} } diff --git a/packages/backend/migration/1635500777168-note-thread-mute.js b/packages/backend/migration/1635500777168-note-thread-mute.js index a790cace33..5fcfa40c07 100644 --- a/packages/backend/migration/1635500777168-note-thread-mute.js +++ b/packages/backend/migration/1635500777168-note-thread-mute.js @@ -1,25 +1,47 @@ - - export class noteThreadMute1635500777168 { - constructor() { - this.name = 'noteThreadMute1635500777168'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "note_thread_muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "threadId" character varying(256) NOT NULL, CONSTRAINT "PK_ec5936d94d1a0369646d12a3a47" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_29c11c7deb06615076f8c95b80" ON "note_thread_muting" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_c426394644267453e76f036926" ON "note_thread_muting" ("threadId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_ae7aab18a2641d3e5f25e0c4ea" ON "note_thread_muting" ("userId", "threadId") `); - await queryRunner.query(`ALTER TABLE "note" ADD "threadId" character varying(256)`); - await queryRunner.query(`CREATE INDEX "IDX_d4ebdef929896d6dc4a3c5bb48" ON "note" ("threadId") `); - await queryRunner.query(`ALTER TABLE "note_thread_muting" ADD CONSTRAINT "FK_29c11c7deb06615076f8c95b80a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note_thread_muting" DROP CONSTRAINT "FK_29c11c7deb06615076f8c95b80a"`); - await queryRunner.query(`DROP INDEX "public"."IDX_d4ebdef929896d6dc4a3c5bb48"`); - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "threadId"`); - await queryRunner.query(`DROP INDEX "public"."IDX_ae7aab18a2641d3e5f25e0c4ea"`); - await queryRunner.query(`DROP INDEX "public"."IDX_c426394644267453e76f036926"`); - await queryRunner.query(`DROP INDEX "public"."IDX_29c11c7deb06615076f8c95b80"`); - await queryRunner.query(`DROP TABLE "note_thread_muting"`); - } + constructor() { + this.name = "noteThreadMute1635500777168"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "note_thread_muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "threadId" character varying(256) NOT NULL, CONSTRAINT "PK_ec5936d94d1a0369646d12a3a47" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_29c11c7deb06615076f8c95b80" ON "note_thread_muting" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c426394644267453e76f036926" ON "note_thread_muting" ("threadId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_ae7aab18a2641d3e5f25e0c4ea" ON "note_thread_muting" ("userId", "threadId") `, + ); + await queryRunner.query( + `ALTER TABLE "note" ADD "threadId" character varying(256)`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_d4ebdef929896d6dc4a3c5bb48" ON "note" ("threadId") `, + ); + await queryRunner.query( + `ALTER TABLE "note_thread_muting" ADD CONSTRAINT "FK_29c11c7deb06615076f8c95b80a" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note_thread_muting" DROP CONSTRAINT "FK_29c11c7deb06615076f8c95b80a"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_d4ebdef929896d6dc4a3c5bb48"`, + ); + await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "threadId"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_ae7aab18a2641d3e5f25e0c4ea"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_c426394644267453e76f036926"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_29c11c7deb06615076f8c95b80"`, + ); + await queryRunner.query(`DROP TABLE "note_thread_muting"`); + } } diff --git a/packages/backend/migration/1636197624383-ff-visibility.js b/packages/backend/migration/1636197624383-ff-visibility.js index 89028f3c22..a3af8f7186 100644 --- a/packages/backend/migration/1636197624383-ff-visibility.js +++ b/packages/backend/migration/1636197624383-ff-visibility.js @@ -1,15 +1,21 @@ - - export class ffVisibility1636197624383 { - constructor() { - this.name = 'ffVisibility1636197624383'; - } - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "public"."user_profile_ffvisibility_enum" AS ENUM('public', 'followers', 'private')`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "ffVisibility" "public"."user_profile_ffvisibility_enum" NOT NULL DEFAULT 'public'`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "ffVisibility"`); - await queryRunner.query(`DROP TYPE "public"."user_profile_ffvisibility_enum"`); - } + constructor() { + this.name = "ffVisibility1636197624383"; + } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "public"."user_profile_ffvisibility_enum" AS ENUM('public', 'followers', 'private')`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "ffVisibility" "public"."user_profile_ffvisibility_enum" NOT NULL DEFAULT 'public'`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "ffVisibility"`, + ); + await queryRunner.query( + `DROP TYPE "public"."user_profile_ffvisibility_enum"`, + ); + } } diff --git a/packages/backend/migration/1636697408073-remove-via-mobile.js b/packages/backend/migration/1636697408073-remove-via-mobile.js index 36e96fd21e..f862760249 100644 --- a/packages/backend/migration/1636697408073-remove-via-mobile.js +++ b/packages/backend/migration/1636697408073-remove-via-mobile.js @@ -1,13 +1,13 @@ - - export class removeViaMobile1636697408073 { - name = 'removeViaMobile1636697408073' + name = "removeViaMobile1636697408073"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "viaMobile"`); - } + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "viaMobile"`); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "note" ADD "viaMobile" boolean NOT NULL DEFAULT false`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "note" ADD "viaMobile" boolean NOT NULL DEFAULT false`, + ); + } } diff --git a/packages/backend/migration/1637320813000-forwarded-report.js b/packages/backend/migration/1637320813000-forwarded-report.js index 1e39bd5c3f..18ec172063 100644 --- a/packages/backend/migration/1637320813000-forwarded-report.js +++ b/packages/backend/migration/1637320813000-forwarded-report.js @@ -1,13 +1,15 @@ - - export class forwardedReport1637320813000 { - name = 'forwardedReport1637320813000'; + name = "forwardedReport1637320813000"; async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "abuse_user_report" ADD "forwarded" boolean NOT NULL DEFAULT false`); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ADD "forwarded" boolean NOT NULL DEFAULT false`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "abuse_user_report" DROP COLUMN "forwarded"`); + await queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP COLUMN "forwarded"`, + ); } -}; +} diff --git a/packages/backend/migration/1639325650583-chart-v3.js b/packages/backend/migration/1639325650583-chart-v3.js index e2a4e920c9..011708c0fe 100644 --- a/packages/backend/migration/1639325650583-chart-v3.js +++ b/packages/backend/migration/1639325650583-chart-v3.js @@ -1,189 +1,511 @@ - - export class chartV31639325650583 { - name = 'chartV31639325650583' + name = "chartV31639325650583"; - async up(queryRunner) { - await queryRunner.query(`DELETE FROM "__chart__per_user_drive" WHERE "group" IS NULL`); + async up(queryRunner) { + await queryRunner.query( + `DELETE FROM "__chart__per_user_drive" WHERE "group" IS NULL`, + ); - await queryRunner.query(`DROP INDEX "public"."IDX_dd907becf76104e4b656659e6b"`); - await queryRunner.query(`DROP INDEX "public"."IDX_eddfed8fb40305a04c6f941050"`); - await queryRunner.query(`DROP INDEX "public"."IDX_f09d543e3acb16c5976bdb31fa"`); - await queryRunner.query(`DROP INDEX "public"."IDX_e60c358aaced5aab8900a4af31"`); - await queryRunner.query(`DROP INDEX "public"."IDX_337e9599f278bd7537fe30876f"`); - await queryRunner.query(`DROP INDEX "public"."IDX_66feba81e1795d176d06c0b1e6"`); - await queryRunner.query(`DROP INDEX "public"."IDX_0a905b992fecd2b5c3fb98759e"`); - await queryRunner.query(`DROP INDEX "public"."IDX_2082327b2699ce924fa654afc5"`); - await queryRunner.query(`DROP INDEX "public"."IDX_9a3ed15a30ab7e3a37702e6e08"`); - await queryRunner.query(`DROP INDEX "public"."IDX_60c5c6e7e538c09aa274ecd1cf"`); - await queryRunner.query(`DROP INDEX "public"."IDX_8111b817b9818c04d7eb8475b1"`); - await queryRunner.query(`DROP INDEX "public"."IDX_583a157ed0cf0ed1b5ec2a833f"`); - await queryRunner.query(`DROP INDEX "public"."IDX_3313d7288855ec105b5bbf6c21"`); - await queryRunner.query(`DROP INDEX "public"."IDX_ceab80a6729f8e2e6f5b8a1a3d"`); - await queryRunner.query(`DROP INDEX "public"."IDX_3b7697a96f522d0478972e6d6f"`); - await queryRunner.query(`DROP INDEX "public"."IDX_53a3604b939e2b479eb2cfaac8"`); - await queryRunner.query(`DROP INDEX "public"."IDX_dabbb38a51ab86ee3cab291326"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a9a806d466b314f253a1a611c4"`); - await queryRunner.query(`CREATE TABLE "__chart_day__federation" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___instance_total" bigint NOT NULL, "___instance_inc" bigint NOT NULL, "___instance_dec" bigint NOT NULL, CONSTRAINT "UQ_617a8fe225a6e701d89e02d2c74" UNIQUE ("date"), CONSTRAINT "PK_7ca721c769f31698e0e1331e8e6" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_617a8fe225a6e701d89e02d2c7" ON "__chart_day__federation" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___local_diffs_normal" bigint NOT NULL, "___local_diffs_reply" bigint NOT NULL, "___local_diffs_renote" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, "___remote_diffs_normal" bigint NOT NULL, "___remote_diffs_reply" bigint NOT NULL, "___remote_diffs_renote" bigint NOT NULL, CONSTRAINT "UQ_1a527b423ad0858a1af5a056d43" UNIQUE ("date"), CONSTRAINT "PK_1fa4139e1f338272b758d05e090" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_1a527b423ad0858a1af5a056d4" ON "__chart_day__notes" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, CONSTRAINT "UQ_cad6e07c20037f31cdba8a350c3" UNIQUE ("date"), CONSTRAINT "PK_d7f7185abb9851f70c4726c54bd" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_cad6e07c20037f31cdba8a350c" ON "__chart_day__users" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__network" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___incomingRequests" bigint NOT NULL, "___outgoingRequests" bigint NOT NULL, "___totalTime" bigint NOT NULL, "___incomingBytes" bigint NOT NULL, "___outgoingBytes" bigint NOT NULL, CONSTRAINT "UQ_8bfa548c2b31f9e07db113773ee" UNIQUE ("date"), CONSTRAINT "PK_cac499d6f471042dfed1e7e0132" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8bfa548c2b31f9e07db113773e" ON "__chart_day__network" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__active_users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_users" character varying array NOT NULL, "___remote_users" character varying array NOT NULL, CONSTRAINT "UQ_d5954f3df5e5e3bdfc3c03f3906" UNIQUE ("date"), CONSTRAINT "PK_b1790489b14f005ae8f404f5795" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d5954f3df5e5e3bdfc3c03f390" ON "__chart_day__active_users" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__instance" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___requests_failed" bigint NOT NULL, "___requests_succeeded" bigint NOT NULL, "___requests_received" bigint NOT NULL, "___notes_total" bigint NOT NULL, "___notes_inc" bigint NOT NULL, "___notes_dec" bigint NOT NULL, "___notes_diffs_normal" bigint NOT NULL, "___notes_diffs_reply" bigint NOT NULL, "___notes_diffs_renote" bigint NOT NULL, "___users_total" bigint NOT NULL, "___users_inc" bigint NOT NULL, "___users_dec" bigint NOT NULL, "___following_total" bigint NOT NULL, "___following_inc" bigint NOT NULL, "___following_dec" bigint NOT NULL, "___followers_total" bigint NOT NULL, "___followers_inc" bigint NOT NULL, "___followers_dec" bigint NOT NULL, "___drive_totalFiles" bigint NOT NULL, "___drive_totalUsage" bigint NOT NULL, "___drive_incFiles" bigint NOT NULL, "___drive_incUsage" bigint NOT NULL, "___drive_decFiles" bigint NOT NULL, "___drive_decUsage" bigint NOT NULL, CONSTRAINT "UQ_fea7c0278325a1a2492f2d6acbf" UNIQUE ("date", "group"), CONSTRAINT "PK_479a8ff9d959274981087043023" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_fea7c0278325a1a2492f2d6acb" ON "__chart_day__instance" ("date", "group") `); - await queryRunner.query(`CREATE TABLE "__chart_day__per_user_notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___total" bigint NOT NULL, "___inc" bigint NOT NULL, "___dec" bigint NOT NULL, "___diffs_normal" bigint NOT NULL, "___diffs_reply" bigint NOT NULL, "___diffs_renote" bigint NOT NULL, CONSTRAINT "UQ_c5545d4b31cdc684034e33b81c3" UNIQUE ("date", "group"), CONSTRAINT "PK_58bab6b6d3ad9310cbc7460fd28" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_c5545d4b31cdc684034e33b81c" ON "__chart_day__per_user_notes" ("date", "group") `); - await queryRunner.query(`CREATE TABLE "__chart_day__drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_totalCount" bigint NOT NULL, "___local_totalSize" bigint NOT NULL, "___local_incCount" bigint NOT NULL, "___local_incSize" bigint NOT NULL, "___local_decCount" bigint NOT NULL, "___local_decSize" bigint NOT NULL, "___remote_totalCount" bigint NOT NULL, "___remote_totalSize" bigint NOT NULL, "___remote_incCount" bigint NOT NULL, "___remote_incSize" bigint NOT NULL, "___remote_decCount" bigint NOT NULL, "___remote_decSize" bigint NOT NULL, CONSTRAINT "UQ_0b60ebb3aa0065f10b0616c1171" UNIQUE ("date"), CONSTRAINT "PK_e7ec0de057c77c40fc8d8b62151" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0b60ebb3aa0065f10b0616c117" ON "__chart_day__drive" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__per_user_reaction" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "UQ_d54b653660d808b118e36c184c0" UNIQUE ("date", "group"), CONSTRAINT "PK_8af24e2d51ff781a354fe595eda" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_d54b653660d808b118e36c184c" ON "__chart_day__per_user_reaction" ("date", "group") `); - await queryRunner.query(`CREATE TABLE "__chart_day__hashtag" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_users" character varying array NOT NULL, "___remote_users" character varying array NOT NULL, CONSTRAINT "UQ_8f589cf056ff51f09d6096f6450" UNIQUE ("date", "group"), CONSTRAINT "PK_13d5a3b089344e5557f8e0980b4" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8f589cf056ff51f09d6096f645" ON "__chart_day__hashtag" ("date", "group") `); - await queryRunner.query(`CREATE TABLE "__chart_day__per_user_following" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_followings_total" bigint NOT NULL, "___local_followings_inc" bigint NOT NULL, "___local_followings_dec" bigint NOT NULL, "___local_followers_total" bigint NOT NULL, "___local_followers_inc" bigint NOT NULL, "___local_followers_dec" bigint NOT NULL, "___remote_followings_total" bigint NOT NULL, "___remote_followings_inc" bigint NOT NULL, "___remote_followings_dec" bigint NOT NULL, "___remote_followers_total" bigint NOT NULL, "___remote_followers_inc" bigint NOT NULL, "___remote_followers_dec" bigint NOT NULL, CONSTRAINT "UQ_e4849a3231f38281280ea4c0eee" UNIQUE ("date", "group"), CONSTRAINT "PK_68ce6b67da57166da66fc8fb27e" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e4849a3231f38281280ea4c0ee" ON "__chart_day__per_user_following" ("date", "group") `); - await queryRunner.query(`CREATE TABLE "__chart_day__per_user_drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___totalCount" bigint NOT NULL, "___totalSize" bigint NOT NULL, "___incCount" bigint NOT NULL, "___incSize" bigint NOT NULL, "___decCount" bigint NOT NULL, "___decSize" bigint NOT NULL, CONSTRAINT "UQ_62aa5047b5aec92524f24c701d7" UNIQUE ("date", "group"), CONSTRAINT "PK_1ae135254c137011645da7f4045" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_62aa5047b5aec92524f24c701d" ON "__chart_day__per_user_drive" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__users" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__network" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "group"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD CONSTRAINT "UQ_36cb699c49580d4e6c2e6159f97" UNIQUE ("date")`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD CONSTRAINT "UQ_42eb716a37d381cdf566192b2be" UNIQUE ("date")`); - await queryRunner.query(`ALTER TABLE "__chart__users" ADD CONSTRAINT "UQ_845254b3eaf708ae8a6cac30265" UNIQUE ("date")`); - await queryRunner.query(`ALTER TABLE "__chart__network" ADD CONSTRAINT "UQ_a1efd3e0048a5f2793a47360dc6" UNIQUE ("date")`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD CONSTRAINT "UQ_0ad37b7ef50f4ddc84363d7ccca" UNIQUE ("date")`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" DROP DEFAULT`); - await queryRunner.query(`DROP INDEX "public"."IDX_39ee857ab2f23493037c6b6631"`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_5048e9daccbbbc6d567bb142d3"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD CONSTRAINT "UQ_13565815f618a1ff53886c5b28a" UNIQUE ("date")`); - await queryRunner.query(`DROP INDEX "public"."IDX_229a41ad465f9205f1f5703291"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_25a97c02003338124b2b75fdbc"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" DROP DEFAULT`); - await queryRunner.query(`DROP INDEX "public"."IDX_b77d4dd9562c3a899d9a286fcd"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`DROP INDEX "public"."IDX_30bf67687f483ace115c5ca642"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "group" SET NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__instance" ADD CONSTRAINT "UQ_39ee857ab2f23493037c6b66311" UNIQUE ("date", "group")`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ADD CONSTRAINT "UQ_5048e9daccbbbc6d567bb142d34" UNIQUE ("date", "group")`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ADD CONSTRAINT "UQ_229a41ad465f9205f1f57032910" UNIQUE ("date", "group")`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD CONSTRAINT "UQ_25a97c02003338124b2b75fdbc8" UNIQUE ("date", "group")`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ADD CONSTRAINT "UQ_b77d4dd9562c3a899d9a286fcd7" UNIQUE ("date", "group")`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ADD CONSTRAINT "UQ_30bf67687f483ace115c5ca6429" UNIQUE ("date", "group")`); - } + await queryRunner.query( + `DROP INDEX "public"."IDX_dd907becf76104e4b656659e6b"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_eddfed8fb40305a04c6f941050"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_f09d543e3acb16c5976bdb31fa"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_e60c358aaced5aab8900a4af31"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_337e9599f278bd7537fe30876f"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_66feba81e1795d176d06c0b1e6"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_0a905b992fecd2b5c3fb98759e"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_2082327b2699ce924fa654afc5"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_9a3ed15a30ab7e3a37702e6e08"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_60c5c6e7e538c09aa274ecd1cf"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_8111b817b9818c04d7eb8475b1"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_583a157ed0cf0ed1b5ec2a833f"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_3313d7288855ec105b5bbf6c21"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_ceab80a6729f8e2e6f5b8a1a3d"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_3b7697a96f522d0478972e6d6f"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_53a3604b939e2b479eb2cfaac8"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_dabbb38a51ab86ee3cab291326"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_a9a806d466b314f253a1a611c4"`, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__federation" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___instance_total" bigint NOT NULL, "___instance_inc" bigint NOT NULL, "___instance_dec" bigint NOT NULL, CONSTRAINT "UQ_617a8fe225a6e701d89e02d2c74" UNIQUE ("date"), CONSTRAINT "PK_7ca721c769f31698e0e1331e8e6" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_617a8fe225a6e701d89e02d2c7" ON "__chart_day__federation" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___local_diffs_normal" bigint NOT NULL, "___local_diffs_reply" bigint NOT NULL, "___local_diffs_renote" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, "___remote_diffs_normal" bigint NOT NULL, "___remote_diffs_reply" bigint NOT NULL, "___remote_diffs_renote" bigint NOT NULL, CONSTRAINT "UQ_1a527b423ad0858a1af5a056d43" UNIQUE ("date"), CONSTRAINT "PK_1fa4139e1f338272b758d05e090" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_1a527b423ad0858a1af5a056d4" ON "__chart_day__notes" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_total" bigint NOT NULL, "___local_inc" bigint NOT NULL, "___local_dec" bigint NOT NULL, "___remote_total" bigint NOT NULL, "___remote_inc" bigint NOT NULL, "___remote_dec" bigint NOT NULL, CONSTRAINT "UQ_cad6e07c20037f31cdba8a350c3" UNIQUE ("date"), CONSTRAINT "PK_d7f7185abb9851f70c4726c54bd" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_cad6e07c20037f31cdba8a350c" ON "__chart_day__users" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__network" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___incomingRequests" bigint NOT NULL, "___outgoingRequests" bigint NOT NULL, "___totalTime" bigint NOT NULL, "___incomingBytes" bigint NOT NULL, "___outgoingBytes" bigint NOT NULL, CONSTRAINT "UQ_8bfa548c2b31f9e07db113773ee" UNIQUE ("date"), CONSTRAINT "PK_cac499d6f471042dfed1e7e0132" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_8bfa548c2b31f9e07db113773e" ON "__chart_day__network" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__active_users" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_users" character varying array NOT NULL, "___remote_users" character varying array NOT NULL, CONSTRAINT "UQ_d5954f3df5e5e3bdfc3c03f3906" UNIQUE ("date"), CONSTRAINT "PK_b1790489b14f005ae8f404f5795" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d5954f3df5e5e3bdfc3c03f390" ON "__chart_day__active_users" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__instance" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___requests_failed" bigint NOT NULL, "___requests_succeeded" bigint NOT NULL, "___requests_received" bigint NOT NULL, "___notes_total" bigint NOT NULL, "___notes_inc" bigint NOT NULL, "___notes_dec" bigint NOT NULL, "___notes_diffs_normal" bigint NOT NULL, "___notes_diffs_reply" bigint NOT NULL, "___notes_diffs_renote" bigint NOT NULL, "___users_total" bigint NOT NULL, "___users_inc" bigint NOT NULL, "___users_dec" bigint NOT NULL, "___following_total" bigint NOT NULL, "___following_inc" bigint NOT NULL, "___following_dec" bigint NOT NULL, "___followers_total" bigint NOT NULL, "___followers_inc" bigint NOT NULL, "___followers_dec" bigint NOT NULL, "___drive_totalFiles" bigint NOT NULL, "___drive_totalUsage" bigint NOT NULL, "___drive_incFiles" bigint NOT NULL, "___drive_incUsage" bigint NOT NULL, "___drive_decFiles" bigint NOT NULL, "___drive_decUsage" bigint NOT NULL, CONSTRAINT "UQ_fea7c0278325a1a2492f2d6acbf" UNIQUE ("date", "group"), CONSTRAINT "PK_479a8ff9d959274981087043023" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_fea7c0278325a1a2492f2d6acb" ON "__chart_day__instance" ("date", "group") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__per_user_notes" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___total" bigint NOT NULL, "___inc" bigint NOT NULL, "___dec" bigint NOT NULL, "___diffs_normal" bigint NOT NULL, "___diffs_reply" bigint NOT NULL, "___diffs_renote" bigint NOT NULL, CONSTRAINT "UQ_c5545d4b31cdc684034e33b81c3" UNIQUE ("date", "group"), CONSTRAINT "PK_58bab6b6d3ad9310cbc7460fd28" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_c5545d4b31cdc684034e33b81c" ON "__chart_day__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___local_totalCount" bigint NOT NULL, "___local_totalSize" bigint NOT NULL, "___local_incCount" bigint NOT NULL, "___local_incSize" bigint NOT NULL, "___local_decCount" bigint NOT NULL, "___local_decSize" bigint NOT NULL, "___remote_totalCount" bigint NOT NULL, "___remote_totalSize" bigint NOT NULL, "___remote_incCount" bigint NOT NULL, "___remote_incSize" bigint NOT NULL, "___remote_decCount" bigint NOT NULL, "___remote_decSize" bigint NOT NULL, CONSTRAINT "UQ_0b60ebb3aa0065f10b0616c1171" UNIQUE ("date"), CONSTRAINT "PK_e7ec0de057c77c40fc8d8b62151" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0b60ebb3aa0065f10b0616c117" ON "__chart_day__drive" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__per_user_reaction" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_count" bigint NOT NULL, "___remote_count" bigint NOT NULL, CONSTRAINT "UQ_d54b653660d808b118e36c184c0" UNIQUE ("date", "group"), CONSTRAINT "PK_8af24e2d51ff781a354fe595eda" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_d54b653660d808b118e36c184c" ON "__chart_day__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__hashtag" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_users" character varying array NOT NULL, "___remote_users" character varying array NOT NULL, CONSTRAINT "UQ_8f589cf056ff51f09d6096f6450" UNIQUE ("date", "group"), CONSTRAINT "PK_13d5a3b089344e5557f8e0980b4" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_8f589cf056ff51f09d6096f645" ON "__chart_day__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__per_user_following" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___local_followings_total" bigint NOT NULL, "___local_followings_inc" bigint NOT NULL, "___local_followings_dec" bigint NOT NULL, "___local_followers_total" bigint NOT NULL, "___local_followers_inc" bigint NOT NULL, "___local_followers_dec" bigint NOT NULL, "___remote_followings_total" bigint NOT NULL, "___remote_followings_inc" bigint NOT NULL, "___remote_followings_dec" bigint NOT NULL, "___remote_followers_total" bigint NOT NULL, "___remote_followers_inc" bigint NOT NULL, "___remote_followers_dec" bigint NOT NULL, CONSTRAINT "UQ_e4849a3231f38281280ea4c0eee" UNIQUE ("date", "group"), CONSTRAINT "PK_68ce6b67da57166da66fc8fb27e" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e4849a3231f38281280ea4c0ee" ON "__chart_day__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__per_user_drive" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "group" character varying(128) NOT NULL, "___totalCount" bigint NOT NULL, "___totalSize" bigint NOT NULL, "___incCount" bigint NOT NULL, "___incSize" bigint NOT NULL, "___decCount" bigint NOT NULL, "___decSize" bigint NOT NULL, CONSTRAINT "UQ_62aa5047b5aec92524f24c701d7" UNIQUE ("date", "group"), CONSTRAINT "PK_1ae135254c137011645da7f4045" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_62aa5047b5aec92524f24c701d" ON "__chart_day__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "group"`, + ); + await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "group"`); + await queryRunner.query(`ALTER TABLE "__chart__users" DROP COLUMN "group"`); + await queryRunner.query( + `ALTER TABLE "__chart__network" DROP COLUMN "group"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "group"`, + ); + await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "group"`); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD CONSTRAINT "UQ_36cb699c49580d4e6c2e6159f97" UNIQUE ("date")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD CONSTRAINT "UQ_42eb716a37d381cdf566192b2be" UNIQUE ("date")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ADD CONSTRAINT "UQ_845254b3eaf708ae8a6cac30265" UNIQUE ("date")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ADD CONSTRAINT "UQ_a1efd3e0048a5f2793a47360dc6" UNIQUE ("date")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD CONSTRAINT "UQ_0ad37b7ef50f4ddc84363d7ccca" UNIQUE ("date")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" DROP DEFAULT`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_39ee857ab2f23493037c6b6631"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_5048e9daccbbbc6d567bb142d3"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD CONSTRAINT "UQ_13565815f618a1ff53886c5b28a" UNIQUE ("date")`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_229a41ad465f9205f1f5703291"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_25a97c02003338124b2b75fdbc"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" DROP DEFAULT`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_b77d4dd9562c3a899d9a286fcd"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_30bf67687f483ace115c5ca642"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "group" SET NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_36cb699c49580d4e6c2e6159f9" ON "__chart__federation" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_42eb716a37d381cdf566192b2b" ON "__chart__notes" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_845254b3eaf708ae8a6cac3026" ON "__chart__users" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a1efd3e0048a5f2793a47360dc" ON "__chart__network" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0ad37b7ef50f4ddc84363d7ccc" ON "__chart__active_users" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_13565815f618a1ff53886c5b28" ON "__chart__drive" ("date") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ADD CONSTRAINT "UQ_39ee857ab2f23493037c6b66311" UNIQUE ("date", "group")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ADD CONSTRAINT "UQ_5048e9daccbbbc6d567bb142d34" UNIQUE ("date", "group")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ADD CONSTRAINT "UQ_229a41ad465f9205f1f57032910" UNIQUE ("date", "group")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD CONSTRAINT "UQ_25a97c02003338124b2b75fdbc8" UNIQUE ("date", "group")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ADD CONSTRAINT "UQ_b77d4dd9562c3a899d9a286fcd7" UNIQUE ("date", "group")`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ADD CONSTRAINT "UQ_30bf67687f483ace115c5ca6429" UNIQUE ("date", "group")`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" DROP CONSTRAINT "UQ_30bf67687f483ace115c5ca6429"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" DROP CONSTRAINT "UQ_b77d4dd9562c3a899d9a286fcd7"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP CONSTRAINT "UQ_25a97c02003338124b2b75fdbc8"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" DROP CONSTRAINT "UQ_229a41ad465f9205f1f57032910"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" DROP CONSTRAINT "UQ_5048e9daccbbbc6d567bb142d34"`); - await queryRunner.query(`ALTER TABLE "__chart__instance" DROP CONSTRAINT "UQ_39ee857ab2f23493037c6b66311"`); - await queryRunner.query(`DROP INDEX "public"."IDX_30bf67687f483ace115c5ca642"`); - await queryRunner.query(`DROP INDEX "public"."IDX_b77d4dd9562c3a899d9a286fcd"`); - await queryRunner.query(`DROP INDEX "public"."IDX_25a97c02003338124b2b75fdbc"`); - await queryRunner.query(`DROP INDEX "public"."IDX_229a41ad465f9205f1f5703291"`); - await queryRunner.query(`DROP INDEX "public"."IDX_13565815f618a1ff53886c5b28"`); - await queryRunner.query(`DROP INDEX "public"."IDX_5048e9daccbbbc6d567bb142d3"`); - await queryRunner.query(`DROP INDEX "public"."IDX_39ee857ab2f23493037c6b6631"`); - await queryRunner.query(`DROP INDEX "public"."IDX_0ad37b7ef50f4ddc84363d7ccc"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a1efd3e0048a5f2793a47360dc"`); - await queryRunner.query(`DROP INDEX "public"."IDX_845254b3eaf708ae8a6cac3026"`); - await queryRunner.query(`DROP INDEX "public"."IDX_42eb716a37d381cdf566192b2b"`); - await queryRunner.query(`DROP INDEX "public"."IDX_36cb699c49580d4e6c2e6159f9"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" SET DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" SET DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP CONSTRAINT "UQ_13565815f618a1ff53886c5b28a"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "group" DROP NOT NULL`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" SET DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" SET DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP CONSTRAINT "UQ_0ad37b7ef50f4ddc84363d7ccca"`); - await queryRunner.query(`ALTER TABLE "__chart__network" DROP CONSTRAINT "UQ_a1efd3e0048a5f2793a47360dc6"`); - await queryRunner.query(`ALTER TABLE "__chart__users" DROP CONSTRAINT "UQ_845254b3eaf708ae8a6cac30265"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP CONSTRAINT "UQ_42eb716a37d381cdf566192b2be"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP CONSTRAINT "UQ_36cb699c49580d4e6c2e6159f97"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "group" character varying(128)`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "group" character varying(128)`); - await queryRunner.query(`ALTER TABLE "__chart__network" ADD "group" character varying(128)`); - await queryRunner.query(`ALTER TABLE "__chart__users" ADD "group" character varying(128)`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD "group" character varying(128)`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "group" character varying(128)`); - await queryRunner.query(`DROP INDEX "public"."IDX_62aa5047b5aec92524f24c701d"`); - await queryRunner.query(`DROP TABLE "__chart_day__per_user_drive"`); - await queryRunner.query(`DROP INDEX "public"."IDX_e4849a3231f38281280ea4c0ee"`); - await queryRunner.query(`DROP TABLE "__chart_day__per_user_following"`); - await queryRunner.query(`DROP INDEX "public"."IDX_8f589cf056ff51f09d6096f645"`); - await queryRunner.query(`DROP TABLE "__chart_day__hashtag"`); - await queryRunner.query(`DROP INDEX "public"."IDX_d54b653660d808b118e36c184c"`); - await queryRunner.query(`DROP TABLE "__chart_day__per_user_reaction"`); - await queryRunner.query(`DROP INDEX "public"."IDX_0b60ebb3aa0065f10b0616c117"`); - await queryRunner.query(`DROP TABLE "__chart_day__drive"`); - await queryRunner.query(`DROP INDEX "public"."IDX_c5545d4b31cdc684034e33b81c"`); - await queryRunner.query(`DROP TABLE "__chart_day__per_user_notes"`); - await queryRunner.query(`DROP INDEX "public"."IDX_fea7c0278325a1a2492f2d6acb"`); - await queryRunner.query(`DROP TABLE "__chart_day__instance"`); - await queryRunner.query(`DROP INDEX "public"."IDX_d5954f3df5e5e3bdfc3c03f390"`); - await queryRunner.query(`DROP TABLE "__chart_day__active_users"`); - await queryRunner.query(`DROP INDEX "public"."IDX_8bfa548c2b31f9e07db113773e"`); - await queryRunner.query(`DROP TABLE "__chart_day__network"`); - await queryRunner.query(`DROP INDEX "public"."IDX_cad6e07c20037f31cdba8a350c"`); - await queryRunner.query(`DROP TABLE "__chart_day__users"`); - await queryRunner.query(`DROP INDEX "public"."IDX_1a527b423ad0858a1af5a056d4"`); - await queryRunner.query(`DROP TABLE "__chart_day__notes"`); - await queryRunner.query(`DROP INDEX "public"."IDX_617a8fe225a6e701d89e02d2c7"`); - await queryRunner.query(`DROP TABLE "__chart_day__federation"`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a9a806d466b314f253a1a611c4" ON "__chart__per_user_drive" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dabbb38a51ab86ee3cab291326" ON "__chart__per_user_following" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_53a3604b939e2b479eb2cfaac8" ON "__chart__hashtag" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_3b7697a96f522d0478972e6d6f" ON "__chart__per_user_reaction" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d" ON "__chart__drive" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_583a157ed0cf0ed1b5ec2a833f" ON "__chart__per_user_notes" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_8111b817b9818c04d7eb8475b1" ON "__chart__instance" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_60c5c6e7e538c09aa274ecd1cf" ON "__chart__active_users" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_2082327b2699ce924fa654afc5" ON "__chart__network" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_66feba81e1795d176d06c0b1e6" ON "__chart__users" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e60c358aaced5aab8900a4af31" ON "__chart__notes" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_eddfed8fb40305a04c6f941050" ON "__chart__federation" ("date") WHERE ("group" IS NULL)`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" DROP CONSTRAINT "UQ_30bf67687f483ace115c5ca6429"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" DROP CONSTRAINT "UQ_b77d4dd9562c3a899d9a286fcd7"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP CONSTRAINT "UQ_25a97c02003338124b2b75fdbc8"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" DROP CONSTRAINT "UQ_229a41ad465f9205f1f57032910"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" DROP CONSTRAINT "UQ_5048e9daccbbbc6d567bb142d34"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" DROP CONSTRAINT "UQ_39ee857ab2f23493037c6b66311"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_30bf67687f483ace115c5ca642"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_b77d4dd9562c3a899d9a286fcd"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_25a97c02003338124b2b75fdbc"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_229a41ad465f9205f1f5703291"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_13565815f618a1ff53886c5b28"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_5048e9daccbbbc6d567bb142d3"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_39ee857ab2f23493037c6b6631"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_0ad37b7ef50f4ddc84363d7ccc"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_a1efd3e0048a5f2793a47360dc"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_845254b3eaf708ae8a6cac3026"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_42eb716a37d381cdf566192b2b"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_36cb699c49580d4e6c2e6159f9"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_30bf67687f483ace115c5ca642" ON "__chart__per_user_drive" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_b77d4dd9562c3a899d9a286fcd" ON "__chart__per_user_following" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" SET DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" SET DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_25a97c02003338124b2b75fdbc" ON "__chart__hashtag" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_229a41ad465f9205f1f5703291" ON "__chart__per_user_reaction" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP CONSTRAINT "UQ_13565815f618a1ff53886c5b28a"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_5048e9daccbbbc6d567bb142d3" ON "__chart__per_user_notes" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "group" DROP NOT NULL`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_39ee857ab2f23493037c6b6631" ON "__chart__instance" ("date", "group") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" SET DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" SET DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP CONSTRAINT "UQ_0ad37b7ef50f4ddc84363d7ccca"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" DROP CONSTRAINT "UQ_a1efd3e0048a5f2793a47360dc6"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" DROP CONSTRAINT "UQ_845254b3eaf708ae8a6cac30265"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" DROP CONSTRAINT "UQ_42eb716a37d381cdf566192b2be"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP CONSTRAINT "UQ_36cb699c49580d4e6c2e6159f97"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "group" character varying(128)`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_62aa5047b5aec92524f24c701d"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__per_user_drive"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_e4849a3231f38281280ea4c0ee"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__per_user_following"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_8f589cf056ff51f09d6096f645"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__hashtag"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_d54b653660d808b118e36c184c"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__per_user_reaction"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_0b60ebb3aa0065f10b0616c117"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__drive"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_c5545d4b31cdc684034e33b81c"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__per_user_notes"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_fea7c0278325a1a2492f2d6acb"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__instance"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_d5954f3df5e5e3bdfc3c03f390"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__active_users"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_8bfa548c2b31f9e07db113773e"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__network"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_cad6e07c20037f31cdba8a350c"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__users"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_1a527b423ad0858a1af5a056d4"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__notes"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_617a8fe225a6e701d89e02d2c7"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__federation"`); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a9a806d466b314f253a1a611c4" ON "__chart__per_user_drive" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_dabbb38a51ab86ee3cab291326" ON "__chart__per_user_following" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_53a3604b939e2b479eb2cfaac8" ON "__chart__hashtag" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_3b7697a96f522d0478972e6d6f" ON "__chart__per_user_reaction" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_ceab80a6729f8e2e6f5b8a1a3d" ON "__chart__drive" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_3313d7288855ec105b5bbf6c21" ON "__chart__drive" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_583a157ed0cf0ed1b5ec2a833f" ON "__chart__per_user_notes" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_8111b817b9818c04d7eb8475b1" ON "__chart__instance" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_60c5c6e7e538c09aa274ecd1cf" ON "__chart__active_users" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_9a3ed15a30ab7e3a37702e6e08" ON "__chart__active_users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_2082327b2699ce924fa654afc5" ON "__chart__network" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_0a905b992fecd2b5c3fb98759e" ON "__chart__network" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_66feba81e1795d176d06c0b1e6" ON "__chart__users" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_337e9599f278bd7537fe30876f" ON "__chart__users" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e60c358aaced5aab8900a4af31" ON "__chart__notes" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_f09d543e3acb16c5976bdb31fa" ON "__chart__notes" ("date", "group") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_eddfed8fb40305a04c6f941050" ON "__chart__federation" ("date") WHERE ("group" IS NULL)`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_dd907becf76104e4b656659e6b" ON "__chart__federation" ("date", "group") `, + ); + } } diff --git a/packages/backend/migration/1642611822809-emoji-url.js b/packages/backend/migration/1642611822809-emoji-url.js index d38f8cc08c..e1852c0025 100644 --- a/packages/backend/migration/1642611822809-emoji-url.js +++ b/packages/backend/migration/1642611822809-emoji-url.js @@ -1,15 +1,19 @@ - - export class emojiUrl1642611822809 { - name = '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 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 "publicUrl"`); - await queryRunner.query(`ALTER TABLE "emoji" RENAME COLUMN "originalUrl" TO "url"`); - } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "publicUrl"`); + await queryRunner.query( + `ALTER TABLE "emoji" RENAME COLUMN "originalUrl" TO "url"`, + ); + } } diff --git a/packages/backend/migration/1642613870898-drive-file-webpublic-type.js b/packages/backend/migration/1642613870898-drive-file-webpublic-type.js index 15434f7d0c..df5ab7899b 100644 --- a/packages/backend/migration/1642613870898-drive-file-webpublic-type.js +++ b/packages/backend/migration/1642613870898-drive-file-webpublic-type.js @@ -1,13 +1,15 @@ - - export class driveFileWebpublicType1642613870898 { - name = 'driveFileWebpublicType1642613870898' + name = "driveFileWebpublicType1642613870898"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" ADD "webpublicType" character varying(128)`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "webpublicType" character varying(128)`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "webpublicType"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "webpublicType"`, + ); + } } diff --git a/packages/backend/migration/1643963705770-chart-v4.js b/packages/backend/migration/1643963705770-chart-v4.js index 8b320c2b41..1e7233cc72 100644 --- a/packages/backend/migration/1643963705770-chart-v4.js +++ b/packages/backend/migration/1643963705770-chart-v4.js @@ -1,63 +1,165 @@ - - export class chartV41643963705770 { - name = 'chartV41643963705770' + name = "chartV41643963705770"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__instance" DROP COLUMN "___drive_totalUsage"`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" DROP COLUMN "___drive_totalUsage"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "___local_totalCount"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "___local_totalSize"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "___remote_totalCount"`); - await queryRunner.query(`ALTER TABLE "__chart__drive" DROP COLUMN "___remote_totalSize"`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" DROP COLUMN "___local_totalCount"`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" DROP COLUMN "___local_totalSize"`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" DROP COLUMN "___remote_totalCount"`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" DROP COLUMN "___remote_totalSize"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___local_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___remote_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___local_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___remote_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___local_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___remote_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "___local_users" bigint NOT NULL DEFAULT 0`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "___remote_users" bigint NOT NULL DEFAULT 0`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__instance" DROP COLUMN "___drive_totalUsage"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" DROP COLUMN "___drive_totalUsage"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP COLUMN "___local_totalCount"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP COLUMN "___local_totalSize"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP COLUMN "___remote_totalCount"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" DROP COLUMN "___remote_totalSize"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" DROP COLUMN "___local_totalCount"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" DROP COLUMN "___local_totalSize"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" DROP COLUMN "___remote_totalCount"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" DROP COLUMN "___remote_totalSize"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___local_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___remote_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___local_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___remote_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___local_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___remote_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "___local_users" bigint NOT NULL DEFAULT 0`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "___remote_users" bigint NOT NULL DEFAULT 0`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "___remote_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "___local_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___remote_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "___local_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___remote_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___local_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___remote_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___local_users" character varying array NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ADD "___remote_totalSize" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ADD "___remote_totalCount" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ADD "___local_totalSize" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ADD "___local_totalCount" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "___remote_totalSize" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "___remote_totalCount" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "___local_totalSize" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ADD "___local_totalCount" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ADD "___drive_totalUsage" bigint NOT NULL`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ADD "___drive_totalUsage" bigint NOT NULL`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "___remote_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "___local_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___remote_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "___local_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___remote_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___local_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___remote_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___local_users" character varying array NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ADD "___remote_totalSize" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ADD "___remote_totalCount" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ADD "___local_totalSize" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ADD "___local_totalCount" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "___remote_totalSize" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "___remote_totalCount" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "___local_totalSize" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ADD "___local_totalCount" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ADD "___drive_totalUsage" bigint NOT NULL`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ADD "___drive_totalUsage" bigint NOT NULL`, + ); + } } diff --git a/packages/backend/migration/1643966656277-chart-v5.js b/packages/backend/migration/1643966656277-chart-v5.js index df84002f78..826f28ee34 100644 --- a/packages/backend/migration/1643966656277-chart-v5.js +++ b/packages/backend/migration/1643966656277-chart-v5.js @@ -1,27 +1,57 @@ - - export class chartV51643966656277 { - name = 'chartV51643966656277' + name = "chartV51643966656277"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" DROP COLUMN "unique_temp___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" DROP COLUMN "unique_temp___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___local_users"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" DROP COLUMN "unique_temp___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" DROP COLUMN "unique_temp___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___local_users"`, + ); + } } diff --git a/packages/backend/migration/1643967331284-chart-v6.js b/packages/backend/migration/1643967331284-chart-v6.js index 119198f4a5..9dfbf24bec 100644 --- a/packages/backend/migration/1643967331284-chart-v6.js +++ b/packages/backend/migration/1643967331284-chart-v6.js @@ -1,343 +1,1005 @@ - - export class chartV61643967331284 { - name = 'chartV61643967331284' + name = "chartV61643967331284"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" SET DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" SET DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" SET DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" SET DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" DROP DEFAULT`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" DROP DEFAULT`, + ); + } } diff --git a/packages/backend/migration/1644010796173-convert-hard-mutes.js b/packages/backend/migration/1644010796173-convert-hard-mutes.js index 207a759b8e..39c5b080fd 100644 --- a/packages/backend/migration/1644010796173-convert-hard-mutes.js +++ b/packages/backend/migration/1644010796173-convert-hard-mutes.js @@ -1,65 +1,70 @@ -import RE2 from 're2'; - +import RE2 from "re2"; export class convertHardMutes1644010796173 { - name = 'convertHardMutes1644010796173' + name = "convertHardMutes1644010796173"; - async up(queryRunner) { - let entries = await queryRunner.query(`SELECT "userId", "mutedWords" FROM "user_profile" WHERE "userHost" IS NULL`); - for(let i = 0; i < entries.length; i++) { - let words = entries[i].mutedWords - .map(line => { - if (typeof line === 'string') return []; - const regexp = line.join(" ").match(/^\/(.+)\/(.*)$/); - if (regexp) { - // convert regexp's - try { - new RE2(regexp[1], regexp[2]); - return `/${regexp[1]}/${regexp[2]}`; - } catch (err) { - // invalid regex, ignore it - return []; - } - } else { - // remove empty segments - return line.filter(x => x !== ''); - } - }) - // remove empty lines - .filter(x => !(Array.isArray(x) && x.length === 0)); + async up(queryRunner) { + let entries = await queryRunner.query( + `SELECT "userId", "mutedWords" FROM "user_profile" WHERE "userHost" IS NULL`, + ); + for (let i = 0; i < entries.length; i++) { + let words = entries[i].mutedWords + .map((line) => { + if (typeof line === "string") return []; + const regexp = line.join(" ").match(/^\/(.+)\/(.*)$/); + if (regexp) { + // convert regexp's + try { + new RE2(regexp[1], regexp[2]); + return `/${regexp[1]}/${regexp[2]}`; + } catch (err) { + // invalid regex, ignore it + return []; + } + } else { + // remove empty segments + return line.filter((x) => x !== ""); + } + }) + // remove empty lines + .filter((x) => !(Array.isArray(x) && x.length === 0)); - await queryRunner.connection.createQueryBuilder() - .update('user_profile') - .set({ - mutedWords: words - }) - .where('userId = :id', { id: entries[i].userId }) - .execute(); - } - } + await queryRunner.connection + .createQueryBuilder() + .update("user_profile") + .set({ + mutedWords: words, + }) + .where("userId = :id", { id: entries[i].userId }) + .execute(); + } + } - async down(queryRunner) { - let entries = await queryRunner.query(`SELECT "userId", "mutedWords" FROM "user_profile"`); - for(let i = 0; i < entries.length; i++) { - let words = entries[i].mutedWords - .map(line => { - if (Array.isArray(line)) { - return line; - } else { - // do not split regex at spaces again - return [line]; - } - }) - // remove empty lines - .filter(x => !(Array.isArray(x) && x.length === 0)); + async down(queryRunner) { + let entries = await queryRunner.query( + `SELECT "userId", "mutedWords" FROM "user_profile"`, + ); + for (let i = 0; i < entries.length; i++) { + let words = entries[i].mutedWords + .map((line) => { + if (Array.isArray(line)) { + return line; + } else { + // do not split regex at spaces again + return [line]; + } + }) + // remove empty lines + .filter((x) => !(Array.isArray(x) && x.length === 0)); - await queryRunner.connection.createQueryBuilder() - .update('user_profile') - .set({ - mutedWords: words - }) - .where('userId = :id', { id: entries[i].userId }) - .execute(); - } - } + await queryRunner.connection + .createQueryBuilder() + .update("user_profile") + .set({ + mutedWords: words, + }) + .where("userId = :id", { id: entries[i].userId }) + .execute(); + } + } } diff --git a/packages/backend/migration/1644058404077-chart-v7.js b/packages/backend/migration/1644058404077-chart-v7.js index f05ad003db..ab48c9ab38 100644 --- a/packages/backend/migration/1644058404077-chart-v7.js +++ b/packages/backend/migration/1644058404077-chart-v7.js @@ -1,501 +1,1470 @@ - - export class chartV71644058404077 { - name = 'chartV71644058404077' + name = "chartV71644058404077"; async up(queryRunner) { - await queryRunner.query(`UPDATE "__chart__federation" SET "___instance_total"=2147483647 WHERE "___instance_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__federation" SET "___instance_inc"=32767 WHERE "___instance_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__federation" SET "___instance_dec"=32767 WHERE "___instance_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__federation" SET "___instance_total"=2147483647 WHERE "___instance_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__federation" SET "___instance_inc"=32767 WHERE "___instance_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__federation" SET "___instance_dec"=32767 WHERE "___instance_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_inc"=2147483647 WHERE "___local_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_dec"=2147483647 WHERE "___local_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_diffs_normal"=2147483647 WHERE "___local_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_diffs_reply"=2147483647 WHERE "___local_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___local_diffs_renote"=2147483647 WHERE "___local_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_inc"=2147483647 WHERE "___remote_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_dec"=2147483647 WHERE "___remote_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_diffs_normal"=2147483647 WHERE "___remote_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_diffs_reply"=2147483647 WHERE "___remote_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__notes" SET "___remote_diffs_renote"=2147483647 WHERE "___remote_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_inc"=2147483647 WHERE "___local_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_dec"=2147483647 WHERE "___local_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_diffs_normal"=2147483647 WHERE "___local_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_diffs_reply"=2147483647 WHERE "___local_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___local_diffs_renote"=2147483647 WHERE "___local_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_inc"=2147483647 WHERE "___remote_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_dec"=2147483647 WHERE "___remote_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_diffs_normal"=2147483647 WHERE "___remote_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_diffs_reply"=2147483647 WHERE "___remote_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__notes" SET "___remote_diffs_renote"=2147483647 WHERE "___remote_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__users" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__users" SET "___local_inc"=32767 WHERE "___local_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__users" SET "___local_dec"=32767 WHERE "___local_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__users" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__users" SET "___remote_inc"=32767 WHERE "___remote_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__users" SET "___remote_dec"=32767 WHERE "___remote_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___local_inc"=32767 WHERE "___local_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___local_dec"=32767 WHERE "___local_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___remote_inc"=32767 WHERE "___remote_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__users" SET "___remote_dec"=32767 WHERE "___remote_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__network" SET "___incomingRequests"=2147483647 WHERE "___incomingRequests" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__network" SET "___outgoingRequests"=2147483647 WHERE "___outgoingRequests" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__network" SET "___totalTime"=2147483647 WHERE "___totalTime" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__network" SET "___incomingBytes"=2147483647 WHERE "___incomingBytes" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__network" SET "___outgoingBytes"=2147483647 WHERE "___outgoingBytes" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__network" SET "___incomingRequests"=2147483647 WHERE "___incomingRequests" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__network" SET "___outgoingRequests"=2147483647 WHERE "___outgoingRequests" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__network" SET "___totalTime"=2147483647 WHERE "___totalTime" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__network" SET "___incomingBytes"=2147483647 WHERE "___incomingBytes" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__network" SET "___outgoingBytes"=2147483647 WHERE "___outgoingBytes" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___requests_failed"=32767 WHERE "___requests_failed" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___requests_succeeded"=32767 WHERE "___requests_succeeded" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___requests_received"=32767 WHERE "___requests_received" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_total"=2147483647 WHERE "___notes_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_inc"=2147483647 WHERE "___notes_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_dec"=2147483647 WHERE "___notes_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_diffs_normal"=2147483647 WHERE "___notes_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_diffs_reply"=2147483647 WHERE "___notes_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___notes_diffs_renote"=2147483647 WHERE "___notes_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___users_total"=2147483647 WHERE "___users_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___users_inc"=32767 WHERE "___users_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___users_dec"=32767 WHERE "___users_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___following_total"=2147483647 WHERE "___following_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___following_inc"=32767 WHERE "___following_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___following_dec"=32767 WHERE "___following_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___followers_total"=2147483647 WHERE "___followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___followers_inc"=32767 WHERE "___followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___followers_dec"=32767 WHERE "___followers_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___drive_totalFiles"=2147483647 WHERE "___drive_totalFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___drive_incFiles"=2147483647 WHERE "___drive_incFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___drive_decFiles"=2147483647 WHERE "___drive_decFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___drive_incUsage"=2147483647 WHERE "___drive_incUsage" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__instance" SET "___drive_decUsage"=2147483647 WHERE "___drive_decUsage" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___requests_failed"=32767 WHERE "___requests_failed" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___requests_succeeded"=32767 WHERE "___requests_succeeded" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___requests_received"=32767 WHERE "___requests_received" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_total"=2147483647 WHERE "___notes_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_inc"=2147483647 WHERE "___notes_inc" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_dec"=2147483647 WHERE "___notes_dec" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_diffs_normal"=2147483647 WHERE "___notes_diffs_normal" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_diffs_reply"=2147483647 WHERE "___notes_diffs_reply" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___notes_diffs_renote"=2147483647 WHERE "___notes_diffs_renote" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___users_total"=2147483647 WHERE "___users_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___users_inc"=32767 WHERE "___users_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___users_dec"=32767 WHERE "___users_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___following_total"=2147483647 WHERE "___following_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___following_inc"=32767 WHERE "___following_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___following_dec"=32767 WHERE "___following_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___followers_total"=2147483647 WHERE "___followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___followers_inc"=32767 WHERE "___followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___followers_dec"=32767 WHERE "___followers_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___drive_totalFiles"=2147483647 WHERE "___drive_totalFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___drive_incFiles"=2147483647 WHERE "___drive_incFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___drive_decFiles"=2147483647 WHERE "___drive_decFiles" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___drive_incUsage"=2147483647 WHERE "___drive_incUsage" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__instance" SET "___drive_decUsage"=2147483647 WHERE "___drive_decUsage" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___total"=2147483647 WHERE "___total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___inc"=32767 WHERE "___inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___dec"=32767 WHERE "___dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___diffs_normal"=32767 WHERE "___diffs_normal" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___diffs_reply"=32767 WHERE "___diffs_reply" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_notes" SET "___diffs_renote"=32767 WHERE "___diffs_renote" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___total"=2147483647 WHERE "___total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___inc"=32767 WHERE "___inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___dec"=32767 WHERE "___dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___diffs_normal"=32767 WHERE "___diffs_normal" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___diffs_reply"=32767 WHERE "___diffs_reply" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_notes" SET "___diffs_renote"=32767 WHERE "___diffs_renote" > 32767`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___local_incCount"=2147483647 WHERE "___local_incCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___local_incSize"=2147483647 WHERE "___local_incSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___local_decCount"=2147483647 WHERE "___local_decCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___local_decSize"=2147483647 WHERE "___local_decSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___remote_incCount"=2147483647 WHERE "___remote_incCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___remote_incSize"=2147483647 WHERE "___remote_incSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___remote_decCount"=2147483647 WHERE "___remote_decCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__drive" SET "___remote_decSize"=2147483647 WHERE "___remote_decSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___local_incCount"=2147483647 WHERE "___local_incCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___local_incSize"=2147483647 WHERE "___local_incSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___local_decCount"=2147483647 WHERE "___local_decCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___local_decSize"=2147483647 WHERE "___local_decSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___remote_incCount"=2147483647 WHERE "___remote_incCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___remote_incSize"=2147483647 WHERE "___remote_incSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___remote_decCount"=2147483647 WHERE "___remote_decCount" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__drive" SET "___remote_decSize"=2147483647 WHERE "___remote_decSize" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_reaction" SET "___local_count"=32767 WHERE "___local_count" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_reaction" SET "___remote_count"=32767 WHERE "___remote_count" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_reaction" SET "___local_count"=32767 WHERE "___local_count" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_reaction" SET "___remote_count"=32767 WHERE "___remote_count" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followings_total"=2147483647 WHERE "___local_followings_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followings_inc"=32767 WHERE "___local_followings_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followings_dec"=32767 WHERE "___local_followings_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followers_total"=2147483647 WHERE "___local_followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followers_inc"=32767 WHERE "___local_followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___local_followers_dec"=32767 WHERE "___local_followers_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followings_total"=2147483647 WHERE "___remote_followings_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followings_inc"=32767 WHERE "___remote_followings_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followings_dec"=32767 WHERE "___remote_followings_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followers_total"=2147483647 WHERE "___remote_followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followers_inc"=32767 WHERE "___remote_followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart__per_user_following" SET "___remote_followers_dec"=32767 WHERE "___remote_followers_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followings_total"=2147483647 WHERE "___local_followings_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followings_inc"=32767 WHERE "___local_followings_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followings_dec"=32767 WHERE "___local_followings_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followers_total"=2147483647 WHERE "___local_followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followers_inc"=32767 WHERE "___local_followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___local_followers_dec"=32767 WHERE "___local_followers_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followings_total"=2147483647 WHERE "___remote_followings_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followings_inc"=32767 WHERE "___remote_followings_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followings_dec"=32767 WHERE "___remote_followings_dec" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followers_total"=2147483647 WHERE "___remote_followers_total" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followers_inc"=32767 WHERE "___remote_followers_inc" > 32767`); - await queryRunner.query(`UPDATE "__chart_day__per_user_following" SET "___remote_followers_dec"=32767 WHERE "___remote_followers_dec" > 32767`); + await queryRunner.query( + `UPDATE "__chart__federation" SET "___instance_total"=2147483647 WHERE "___instance_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__federation" SET "___instance_inc"=32767 WHERE "___instance_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__federation" SET "___instance_dec"=32767 WHERE "___instance_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__federation" SET "___instance_total"=2147483647 WHERE "___instance_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__federation" SET "___instance_inc"=32767 WHERE "___instance_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__federation" SET "___instance_dec"=32767 WHERE "___instance_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_inc"=2147483647 WHERE "___local_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_dec"=2147483647 WHERE "___local_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_diffs_normal"=2147483647 WHERE "___local_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_diffs_reply"=2147483647 WHERE "___local_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___local_diffs_renote"=2147483647 WHERE "___local_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_inc"=2147483647 WHERE "___remote_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_dec"=2147483647 WHERE "___remote_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_diffs_normal"=2147483647 WHERE "___remote_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_diffs_reply"=2147483647 WHERE "___remote_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__notes" SET "___remote_diffs_renote"=2147483647 WHERE "___remote_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_inc"=2147483647 WHERE "___local_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_dec"=2147483647 WHERE "___local_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_diffs_normal"=2147483647 WHERE "___local_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_diffs_reply"=2147483647 WHERE "___local_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___local_diffs_renote"=2147483647 WHERE "___local_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_inc"=2147483647 WHERE "___remote_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_dec"=2147483647 WHERE "___remote_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_diffs_normal"=2147483647 WHERE "___remote_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_diffs_reply"=2147483647 WHERE "___remote_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__notes" SET "___remote_diffs_renote"=2147483647 WHERE "___remote_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___local_inc"=32767 WHERE "___local_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___local_dec"=32767 WHERE "___local_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___remote_inc"=32767 WHERE "___remote_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__users" SET "___remote_dec"=32767 WHERE "___remote_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___local_total"=2147483647 WHERE "___local_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___local_inc"=32767 WHERE "___local_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___local_dec"=32767 WHERE "___local_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___remote_total"=2147483647 WHERE "___remote_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___remote_inc"=32767 WHERE "___remote_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__users" SET "___remote_dec"=32767 WHERE "___remote_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__network" SET "___incomingRequests"=2147483647 WHERE "___incomingRequests" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__network" SET "___outgoingRequests"=2147483647 WHERE "___outgoingRequests" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__network" SET "___totalTime"=2147483647 WHERE "___totalTime" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__network" SET "___incomingBytes"=2147483647 WHERE "___incomingBytes" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__network" SET "___outgoingBytes"=2147483647 WHERE "___outgoingBytes" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__network" SET "___incomingRequests"=2147483647 WHERE "___incomingRequests" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__network" SET "___outgoingRequests"=2147483647 WHERE "___outgoingRequests" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__network" SET "___totalTime"=2147483647 WHERE "___totalTime" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__network" SET "___incomingBytes"=2147483647 WHERE "___incomingBytes" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__network" SET "___outgoingBytes"=2147483647 WHERE "___outgoingBytes" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___requests_failed"=32767 WHERE "___requests_failed" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___requests_succeeded"=32767 WHERE "___requests_succeeded" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___requests_received"=32767 WHERE "___requests_received" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_total"=2147483647 WHERE "___notes_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_inc"=2147483647 WHERE "___notes_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_dec"=2147483647 WHERE "___notes_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_diffs_normal"=2147483647 WHERE "___notes_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_diffs_reply"=2147483647 WHERE "___notes_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___notes_diffs_renote"=2147483647 WHERE "___notes_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___users_total"=2147483647 WHERE "___users_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___users_inc"=32767 WHERE "___users_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___users_dec"=32767 WHERE "___users_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___following_total"=2147483647 WHERE "___following_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___following_inc"=32767 WHERE "___following_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___following_dec"=32767 WHERE "___following_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___followers_total"=2147483647 WHERE "___followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___followers_inc"=32767 WHERE "___followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___followers_dec"=32767 WHERE "___followers_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___drive_totalFiles"=2147483647 WHERE "___drive_totalFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___drive_incFiles"=2147483647 WHERE "___drive_incFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___drive_decFiles"=2147483647 WHERE "___drive_decFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___drive_incUsage"=2147483647 WHERE "___drive_incUsage" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__instance" SET "___drive_decUsage"=2147483647 WHERE "___drive_decUsage" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___requests_failed"=32767 WHERE "___requests_failed" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___requests_succeeded"=32767 WHERE "___requests_succeeded" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___requests_received"=32767 WHERE "___requests_received" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_total"=2147483647 WHERE "___notes_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_inc"=2147483647 WHERE "___notes_inc" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_dec"=2147483647 WHERE "___notes_dec" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_diffs_normal"=2147483647 WHERE "___notes_diffs_normal" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_diffs_reply"=2147483647 WHERE "___notes_diffs_reply" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___notes_diffs_renote"=2147483647 WHERE "___notes_diffs_renote" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___users_total"=2147483647 WHERE "___users_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___users_inc"=32767 WHERE "___users_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___users_dec"=32767 WHERE "___users_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___following_total"=2147483647 WHERE "___following_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___following_inc"=32767 WHERE "___following_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___following_dec"=32767 WHERE "___following_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___followers_total"=2147483647 WHERE "___followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___followers_inc"=32767 WHERE "___followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___followers_dec"=32767 WHERE "___followers_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___drive_totalFiles"=2147483647 WHERE "___drive_totalFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___drive_incFiles"=2147483647 WHERE "___drive_incFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___drive_decFiles"=2147483647 WHERE "___drive_decFiles" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___drive_incUsage"=2147483647 WHERE "___drive_incUsage" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__instance" SET "___drive_decUsage"=2147483647 WHERE "___drive_decUsage" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___total"=2147483647 WHERE "___total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___inc"=32767 WHERE "___inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___dec"=32767 WHERE "___dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___diffs_normal"=32767 WHERE "___diffs_normal" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___diffs_reply"=32767 WHERE "___diffs_reply" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_notes" SET "___diffs_renote"=32767 WHERE "___diffs_renote" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___total"=2147483647 WHERE "___total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___inc"=32767 WHERE "___inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___dec"=32767 WHERE "___dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___diffs_normal"=32767 WHERE "___diffs_normal" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___diffs_reply"=32767 WHERE "___diffs_reply" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_notes" SET "___diffs_renote"=32767 WHERE "___diffs_renote" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___local_incCount"=2147483647 WHERE "___local_incCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___local_incSize"=2147483647 WHERE "___local_incSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___local_decCount"=2147483647 WHERE "___local_decCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___local_decSize"=2147483647 WHERE "___local_decSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___remote_incCount"=2147483647 WHERE "___remote_incCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___remote_incSize"=2147483647 WHERE "___remote_incSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___remote_decCount"=2147483647 WHERE "___remote_decCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__drive" SET "___remote_decSize"=2147483647 WHERE "___remote_decSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___local_incCount"=2147483647 WHERE "___local_incCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___local_incSize"=2147483647 WHERE "___local_incSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___local_decCount"=2147483647 WHERE "___local_decCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___local_decSize"=2147483647 WHERE "___local_decSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___remote_incCount"=2147483647 WHERE "___remote_incCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___remote_incSize"=2147483647 WHERE "___remote_incSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___remote_decCount"=2147483647 WHERE "___remote_decCount" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__drive" SET "___remote_decSize"=2147483647 WHERE "___remote_decSize" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_reaction" SET "___local_count"=32767 WHERE "___local_count" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_reaction" SET "___remote_count"=32767 WHERE "___remote_count" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_reaction" SET "___local_count"=32767 WHERE "___local_count" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_reaction" SET "___remote_count"=32767 WHERE "___remote_count" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followings_total"=2147483647 WHERE "___local_followings_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followings_inc"=32767 WHERE "___local_followings_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followings_dec"=32767 WHERE "___local_followings_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followers_total"=2147483647 WHERE "___local_followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followers_inc"=32767 WHERE "___local_followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___local_followers_dec"=32767 WHERE "___local_followers_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followings_total"=2147483647 WHERE "___remote_followings_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followings_inc"=32767 WHERE "___remote_followings_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followings_dec"=32767 WHERE "___remote_followings_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followers_total"=2147483647 WHERE "___remote_followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followers_inc"=32767 WHERE "___remote_followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart__per_user_following" SET "___remote_followers_dec"=32767 WHERE "___remote_followers_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followings_total"=2147483647 WHERE "___local_followings_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followings_inc"=32767 WHERE "___local_followings_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followings_dec"=32767 WHERE "___local_followings_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followers_total"=2147483647 WHERE "___local_followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followers_inc"=32767 WHERE "___local_followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___local_followers_dec"=32767 WHERE "___local_followers_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followings_total"=2147483647 WHERE "___remote_followings_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followings_inc"=32767 WHERE "___remote_followings_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followings_dec"=32767 WHERE "___remote_followings_dec" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followers_total"=2147483647 WHERE "___remote_followers_total" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followers_inc"=32767 WHERE "___remote_followers_inc" > 32767`, + ); + await queryRunner.query( + `UPDATE "__chart_day__per_user_following" SET "___remote_followers_dec"=32767 WHERE "___remote_followers_dec" > 32767`, + ); await queryRunner.query(`TRUNCATE TABLE "__chart__per_user_drive"`); await queryRunner.query(`TRUNCATE TABLE "__chart_day__per_user_drive"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" TYPE integer USING "___instance_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" TYPE smallint USING "___instance_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" TYPE smallint USING "___instance_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" TYPE integer USING "___instance_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" TYPE smallint USING "___instance_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" TYPE smallint USING "___instance_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" TYPE integer USING "___local_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" TYPE integer USING "___local_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" TYPE integer USING "___local_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" TYPE integer USING "___local_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" TYPE integer USING "___local_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" TYPE integer USING "___remote_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" TYPE integer USING "___remote_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" TYPE integer USING "___remote_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" TYPE integer USING "___remote_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" TYPE integer USING "___remote_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" TYPE integer USING "___local_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" TYPE integer USING "___local_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" TYPE integer USING "___local_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" TYPE integer USING "___local_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" TYPE integer USING "___local_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" TYPE integer USING "___remote_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" TYPE integer USING "___remote_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" TYPE integer USING "___remote_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" TYPE integer USING "___remote_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" TYPE integer USING "___remote_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" TYPE smallint USING "___local_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" TYPE smallint USING "___local_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" TYPE smallint USING "___remote_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" TYPE smallint USING "___remote_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" TYPE smallint USING "___local_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" TYPE smallint USING "___local_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" TYPE smallint USING "___remote_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" TYPE smallint USING "___remote_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" TYPE integer USING "___incomingRequests"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" TYPE integer USING "___outgoingRequests"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" TYPE integer USING "___totalTime"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" TYPE integer USING "___incomingBytes"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" TYPE integer USING "___outgoingBytes"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" TYPE integer USING "___incomingRequests"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" TYPE integer USING "___outgoingRequests"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" TYPE integer USING "___totalTime"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" TYPE integer USING "___incomingBytes"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" TYPE integer USING "___outgoingBytes"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" TYPE smallint USING "___requests_failed"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" TYPE smallint USING "___requests_succeeded"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" TYPE smallint USING "___requests_received"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" TYPE integer USING "___notes_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" TYPE integer USING "___notes_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" TYPE integer USING "___notes_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" TYPE integer USING "___notes_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" TYPE integer USING "___notes_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" TYPE integer USING "___notes_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" TYPE integer USING "___users_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" TYPE smallint USING "___users_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" TYPE smallint USING "___users_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" TYPE integer USING "___following_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" TYPE smallint USING "___following_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" TYPE smallint USING "___following_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" TYPE integer USING "___followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" TYPE smallint USING "___followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" TYPE smallint USING "___followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" TYPE integer USING "___drive_totalFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" TYPE integer USING "___drive_incFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" TYPE integer USING "___drive_decFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" TYPE integer USING "___drive_incUsage"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" TYPE integer USING "___drive_decUsage"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" TYPE smallint USING "___requests_failed"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" TYPE smallint USING "___requests_succeeded"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" TYPE smallint USING "___requests_received"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" TYPE integer USING "___notes_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" TYPE integer USING "___notes_inc"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" TYPE integer USING "___notes_dec"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" TYPE integer USING "___notes_diffs_normal"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" TYPE integer USING "___notes_diffs_reply"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" TYPE integer USING "___notes_diffs_renote"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" TYPE integer USING "___users_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" TYPE smallint USING "___users_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" TYPE smallint USING "___users_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" TYPE integer USING "___following_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" TYPE smallint USING "___following_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" TYPE smallint USING "___following_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" TYPE integer USING "___followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" TYPE smallint USING "___followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" TYPE smallint USING "___followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" TYPE integer USING "___drive_totalFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" TYPE integer USING "___drive_incFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" TYPE integer USING "___drive_decFiles"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" TYPE integer USING "___drive_incUsage"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" TYPE integer USING "___drive_decUsage"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" TYPE integer USING "___total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" TYPE smallint USING "___inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" TYPE smallint USING "___dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE smallint USING "___diffs_normal"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE smallint USING "___diffs_reply"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE smallint USING "___diffs_renote"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" TYPE integer USING "___total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" TYPE smallint USING "___inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" TYPE smallint USING "___dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE smallint USING "___diffs_normal"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE smallint USING "___diffs_reply"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE smallint USING "___diffs_renote"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" TYPE integer USING "___local_incCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" TYPE integer USING "___local_incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" TYPE integer USING "___local_decCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" TYPE integer USING "___local_decSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" TYPE integer USING "___remote_incCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" TYPE integer USING "___remote_incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" TYPE integer USING "___remote_decCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" TYPE integer USING "___remote_decSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" TYPE integer USING "___local_incCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" TYPE integer USING "___local_incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" TYPE integer USING "___local_decCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" TYPE integer USING "___local_decSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" TYPE integer USING "___remote_incCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" TYPE integer USING "___remote_incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" TYPE integer USING "___remote_decCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" TYPE integer USING "___remote_decSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" TYPE smallint USING "___local_count"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" TYPE smallint USING "___remote_count"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" TYPE smallint USING "___local_count"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" TYPE smallint USING "___remote_count"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" TYPE integer USING "___local_followings_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE smallint USING "___local_followings_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE smallint USING "___local_followings_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" TYPE integer USING "___local_followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE smallint USING "___local_followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE smallint USING "___local_followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE integer USING "___remote_followings_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE smallint USING "___remote_followings_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE smallint USING "___remote_followings_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE integer USING "___remote_followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE smallint USING "___remote_followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE smallint USING "___remote_followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" TYPE integer USING "___local_followings_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE smallint USING "___local_followings_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE smallint USING "___local_followings_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" TYPE integer USING "___local_followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE smallint USING "___local_followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE smallint USING "___local_followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE integer USING "___remote_followings_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE smallint USING "___remote_followings_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE smallint USING "___remote_followings_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE integer USING "___remote_followers_total"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE smallint USING "___remote_followers_inc"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE smallint USING "___remote_followers_dec"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" TYPE integer USING "___totalCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" TYPE integer USING "___totalSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" TYPE smallint USING "___incCount"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" TYPE integer USING "___incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" TYPE smallint USING "___decCount"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" TYPE integer USING "___decSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" TYPE integer USING "___totalCount"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" TYPE integer USING "___totalSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" TYPE smallint USING "___incCount"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" TYPE integer USING "___incSize"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" TYPE smallint USING "___decCount"::smallint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" TYPE integer USING "___decSize"::integer`); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" TYPE integer USING "___instance_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" TYPE smallint USING "___instance_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" TYPE smallint USING "___instance_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" TYPE integer USING "___instance_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" TYPE smallint USING "___instance_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" TYPE smallint USING "___instance_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" TYPE integer USING "___local_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" TYPE integer USING "___local_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" TYPE integer USING "___local_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" TYPE integer USING "___local_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" TYPE integer USING "___local_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" TYPE integer USING "___remote_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" TYPE integer USING "___remote_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" TYPE integer USING "___remote_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" TYPE integer USING "___remote_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" TYPE integer USING "___remote_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" TYPE integer USING "___local_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" TYPE integer USING "___local_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" TYPE integer USING "___local_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" TYPE integer USING "___local_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" TYPE integer USING "___local_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" TYPE integer USING "___remote_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" TYPE integer USING "___remote_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" TYPE integer USING "___remote_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" TYPE integer USING "___remote_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" TYPE integer USING "___remote_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" TYPE smallint USING "___local_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" TYPE smallint USING "___local_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" TYPE smallint USING "___remote_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" TYPE smallint USING "___remote_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" TYPE integer USING "___local_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" TYPE smallint USING "___local_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" TYPE smallint USING "___local_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" TYPE integer USING "___remote_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" TYPE smallint USING "___remote_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" TYPE smallint USING "___remote_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" TYPE integer USING "___incomingRequests"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" TYPE integer USING "___outgoingRequests"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" TYPE integer USING "___totalTime"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" TYPE integer USING "___incomingBytes"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" TYPE integer USING "___outgoingBytes"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" TYPE integer USING "___incomingRequests"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" TYPE integer USING "___outgoingRequests"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" TYPE integer USING "___totalTime"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" TYPE integer USING "___incomingBytes"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" TYPE integer USING "___outgoingBytes"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" TYPE smallint USING "___requests_failed"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" TYPE smallint USING "___requests_succeeded"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" TYPE smallint USING "___requests_received"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" TYPE integer USING "___notes_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" TYPE integer USING "___notes_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" TYPE integer USING "___notes_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" TYPE integer USING "___notes_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" TYPE integer USING "___notes_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" TYPE integer USING "___notes_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" TYPE integer USING "___users_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" TYPE smallint USING "___users_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" TYPE smallint USING "___users_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" TYPE integer USING "___following_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" TYPE smallint USING "___following_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" TYPE smallint USING "___following_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" TYPE integer USING "___followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" TYPE smallint USING "___followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" TYPE smallint USING "___followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" TYPE integer USING "___drive_totalFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" TYPE integer USING "___drive_incFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" TYPE integer USING "___drive_decFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" TYPE integer USING "___drive_incUsage"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" TYPE integer USING "___drive_decUsage"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" TYPE smallint USING "___requests_failed"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" TYPE smallint USING "___requests_succeeded"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" TYPE smallint USING "___requests_received"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" TYPE integer USING "___notes_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" TYPE integer USING "___notes_inc"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" TYPE integer USING "___notes_dec"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" TYPE integer USING "___notes_diffs_normal"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" TYPE integer USING "___notes_diffs_reply"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" TYPE integer USING "___notes_diffs_renote"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" TYPE integer USING "___users_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" TYPE smallint USING "___users_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" TYPE smallint USING "___users_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" TYPE integer USING "___following_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" TYPE smallint USING "___following_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" TYPE smallint USING "___following_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" TYPE integer USING "___followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" TYPE smallint USING "___followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" TYPE smallint USING "___followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" TYPE integer USING "___drive_totalFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" TYPE integer USING "___drive_incFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" TYPE integer USING "___drive_decFiles"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" TYPE integer USING "___drive_incUsage"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" TYPE integer USING "___drive_decUsage"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" TYPE integer USING "___total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" TYPE smallint USING "___inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" TYPE smallint USING "___dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE smallint USING "___diffs_normal"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE smallint USING "___diffs_reply"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE smallint USING "___diffs_renote"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" TYPE integer USING "___total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" TYPE smallint USING "___inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" TYPE smallint USING "___dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE smallint USING "___diffs_normal"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE smallint USING "___diffs_reply"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE smallint USING "___diffs_renote"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" TYPE integer USING "___local_incCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" TYPE integer USING "___local_incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" TYPE integer USING "___local_decCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" TYPE integer USING "___local_decSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" TYPE integer USING "___remote_incCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" TYPE integer USING "___remote_incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" TYPE integer USING "___remote_decCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" TYPE integer USING "___remote_decSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" TYPE integer USING "___local_incCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" TYPE integer USING "___local_incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" TYPE integer USING "___local_decCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" TYPE integer USING "___local_decSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" TYPE integer USING "___remote_incCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" TYPE integer USING "___remote_incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" TYPE integer USING "___remote_decCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" TYPE integer USING "___remote_decSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" TYPE smallint USING "___local_count"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" TYPE smallint USING "___remote_count"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" TYPE smallint USING "___local_count"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" TYPE smallint USING "___remote_count"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" TYPE integer USING "___local_followings_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE smallint USING "___local_followings_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE smallint USING "___local_followings_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" TYPE integer USING "___local_followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE smallint USING "___local_followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE smallint USING "___local_followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE integer USING "___remote_followings_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE smallint USING "___remote_followings_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE smallint USING "___remote_followings_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE integer USING "___remote_followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE smallint USING "___remote_followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE smallint USING "___remote_followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" TYPE integer USING "___local_followings_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE smallint USING "___local_followings_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE smallint USING "___local_followings_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" TYPE integer USING "___local_followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE smallint USING "___local_followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE smallint USING "___local_followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE integer USING "___remote_followings_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE smallint USING "___remote_followings_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE smallint USING "___remote_followings_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE integer USING "___remote_followers_total"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE smallint USING "___remote_followers_inc"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE smallint USING "___remote_followers_dec"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" TYPE integer USING "___totalCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" TYPE integer USING "___totalSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" TYPE smallint USING "___incCount"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" TYPE integer USING "___incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" TYPE smallint USING "___decCount"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" TYPE integer USING "___decSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" TYPE integer USING "___totalCount"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" TYPE integer USING "___totalSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" TYPE smallint USING "___incCount"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" TYPE integer USING "___incSize"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" TYPE smallint USING "___decCount"::smallint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" TYPE integer USING "___decSize"::integer`, + ); } async down(queryRunner) { - - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" TYPE bigint USING "___instance_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" TYPE bigint USING "___instance_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" TYPE bigint USING "___instance_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" TYPE bigint USING "___instance_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" TYPE bigint USING "___instance_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" TYPE bigint USING "___instance_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" TYPE bigint USING "___local_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" TYPE bigint USING "___local_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" TYPE bigint USING "___local_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" TYPE bigint USING "___remote_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" TYPE bigint USING "___remote_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" TYPE bigint USING "___remote_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" TYPE bigint USING "___local_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" TYPE bigint USING "___local_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" TYPE bigint USING "___local_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" TYPE bigint USING "___remote_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" TYPE bigint USING "___remote_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" TYPE bigint USING "___remote_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" TYPE bigint USING "___incomingRequests"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" TYPE bigint USING "___outgoingRequests"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" TYPE bigint USING "___totalTime"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" TYPE bigint USING "___incomingBytes"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" TYPE bigint USING "___outgoingBytes"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" TYPE bigint USING "___incomingRequests"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" TYPE bigint USING "___outgoingRequests"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" TYPE bigint USING "___totalTime"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" TYPE bigint USING "___incomingBytes"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" TYPE bigint USING "___outgoingBytes"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" TYPE bigint USING "___requests_failed"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" TYPE bigint USING "___requests_succeeded"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" TYPE bigint USING "___requests_received"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" TYPE bigint USING "___notes_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" TYPE bigint USING "___notes_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" TYPE bigint USING "___notes_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" TYPE bigint USING "___notes_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" TYPE bigint USING "___notes_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" TYPE bigint USING "___notes_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" TYPE bigint USING "___users_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" TYPE bigint USING "___users_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" TYPE bigint USING "___users_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" TYPE bigint USING "___following_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" TYPE bigint USING "___following_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" TYPE bigint USING "___following_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" TYPE bigint USING "___followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" TYPE bigint USING "___followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" TYPE bigint USING "___followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" TYPE bigint USING "___drive_totalFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" TYPE bigint USING "___drive_incFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" TYPE bigint USING "___drive_decFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" TYPE bigint USING "___drive_incUsage"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" TYPE bigint USING "___drive_decUsage"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" TYPE bigint USING "___requests_failed"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" TYPE bigint USING "___requests_succeeded"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" TYPE bigint USING "___requests_received"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" TYPE bigint USING "___notes_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" TYPE bigint USING "___notes_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" TYPE bigint USING "___notes_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" TYPE bigint USING "___notes_diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" TYPE bigint USING "___notes_diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" TYPE bigint USING "___notes_diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" TYPE bigint USING "___users_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" TYPE bigint USING "___users_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" TYPE bigint USING "___users_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" TYPE bigint USING "___following_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" TYPE bigint USING "___following_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" TYPE bigint USING "___following_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" TYPE bigint USING "___followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" TYPE bigint USING "___followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" TYPE bigint USING "___followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" TYPE bigint USING "___drive_totalFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" TYPE bigint USING "___drive_incFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" TYPE bigint USING "___drive_decFiles"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" TYPE bigint USING "___drive_incUsage"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" TYPE bigint USING "___drive_decUsage"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" TYPE bigint USING "___total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" TYPE bigint USING "___inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" TYPE bigint USING "___dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE bigint USING "___diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE bigint USING "___diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE bigint USING "___diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" TYPE bigint USING "___total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" TYPE bigint USING "___inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" TYPE bigint USING "___dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE bigint USING "___diffs_normal"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE bigint USING "___diffs_reply"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE bigint USING "___diffs_renote"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" TYPE bigint USING "___local_incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" TYPE bigint USING "___local_incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" TYPE bigint USING "___local_decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" TYPE bigint USING "___local_decSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" TYPE bigint USING "___remote_incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" TYPE bigint USING "___remote_incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" TYPE bigint USING "___remote_decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" TYPE bigint USING "___remote_decSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" TYPE bigint USING "___local_incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" TYPE bigint USING "___local_incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" TYPE bigint USING "___local_decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" TYPE bigint USING "___local_decSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" TYPE bigint USING "___remote_incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" TYPE bigint USING "___remote_incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" TYPE bigint USING "___remote_decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" TYPE bigint USING "___remote_decSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" TYPE bigint USING "___local_count"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" TYPE bigint USING "___remote_count"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" TYPE bigint USING "___local_count"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" TYPE bigint USING "___remote_count"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" TYPE bigint USING "___local_followings_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE bigint USING "___local_followings_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE bigint USING "___local_followings_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" TYPE bigint USING "___local_followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE bigint USING "___local_followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE bigint USING "___local_followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE bigint USING "___remote_followings_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE bigint USING "___remote_followings_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE bigint USING "___remote_followings_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE bigint USING "___remote_followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE bigint USING "___remote_followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE bigint USING "___remote_followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" TYPE bigint USING "___local_followings_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE bigint USING "___local_followings_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE bigint USING "___local_followings_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" TYPE bigint USING "___local_followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE bigint USING "___local_followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE bigint USING "___local_followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE bigint USING "___remote_followings_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE bigint USING "___remote_followings_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE bigint USING "___remote_followings_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE bigint USING "___remote_followers_total"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE bigint USING "___remote_followers_inc"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE bigint USING "___remote_followers_dec"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" TYPE bigint USING "___totalCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" TYPE bigint USING "___totalSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" TYPE bigint USING "___incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" TYPE bigint USING "___incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" TYPE bigint USING "___decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" TYPE bigint USING "___decSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" TYPE bigint USING "___totalCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" TYPE bigint USING "___totalSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" TYPE bigint USING "___incCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" TYPE bigint USING "___incSize"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" TYPE bigint USING "___decCount"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" TYPE bigint USING "___decSize"::bigint`); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_total" TYPE bigint USING "___instance_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_inc" TYPE bigint USING "___instance_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ALTER COLUMN "___instance_dec" TYPE bigint USING "___instance_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_total" TYPE bigint USING "___instance_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_inc" TYPE bigint USING "___instance_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ALTER COLUMN "___instance_dec" TYPE bigint USING "___instance_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_normal" TYPE bigint USING "___local_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_reply" TYPE bigint USING "___local_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___local_diffs_renote" TYPE bigint USING "___local_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_normal" TYPE bigint USING "___remote_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_reply" TYPE bigint USING "___remote_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ALTER COLUMN "___remote_diffs_renote" TYPE bigint USING "___remote_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_normal" TYPE bigint USING "___local_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_reply" TYPE bigint USING "___local_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___local_diffs_renote" TYPE bigint USING "___local_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_normal" TYPE bigint USING "___remote_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_reply" TYPE bigint USING "___remote_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ALTER COLUMN "___remote_diffs_renote" TYPE bigint USING "___remote_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__users" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_total" TYPE bigint USING "___local_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_inc" TYPE bigint USING "___local_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___local_dec" TYPE bigint USING "___local_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_total" TYPE bigint USING "___remote_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_inc" TYPE bigint USING "___remote_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__users" ALTER COLUMN "___remote_dec" TYPE bigint USING "___remote_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingRequests" TYPE bigint USING "___incomingRequests"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingRequests" TYPE bigint USING "___outgoingRequests"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___totalTime" TYPE bigint USING "___totalTime"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___incomingBytes" TYPE bigint USING "___incomingBytes"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__network" ALTER COLUMN "___outgoingBytes" TYPE bigint USING "___outgoingBytes"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingRequests" TYPE bigint USING "___incomingRequests"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingRequests" TYPE bigint USING "___outgoingRequests"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___totalTime" TYPE bigint USING "___totalTime"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___incomingBytes" TYPE bigint USING "___incomingBytes"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__network" ALTER COLUMN "___outgoingBytes" TYPE bigint USING "___outgoingBytes"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_failed" TYPE bigint USING "___requests_failed"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_succeeded" TYPE bigint USING "___requests_succeeded"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___requests_received" TYPE bigint USING "___requests_received"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_total" TYPE bigint USING "___notes_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_inc" TYPE bigint USING "___notes_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_dec" TYPE bigint USING "___notes_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_normal" TYPE bigint USING "___notes_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_reply" TYPE bigint USING "___notes_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___notes_diffs_renote" TYPE bigint USING "___notes_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_total" TYPE bigint USING "___users_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_inc" TYPE bigint USING "___users_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___users_dec" TYPE bigint USING "___users_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_total" TYPE bigint USING "___following_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_inc" TYPE bigint USING "___following_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___following_dec" TYPE bigint USING "___following_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_total" TYPE bigint USING "___followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_inc" TYPE bigint USING "___followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___followers_dec" TYPE bigint USING "___followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_totalFiles" TYPE bigint USING "___drive_totalFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incFiles" TYPE bigint USING "___drive_incFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decFiles" TYPE bigint USING "___drive_decFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_incUsage" TYPE bigint USING "___drive_incUsage"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ALTER COLUMN "___drive_decUsage" TYPE bigint USING "___drive_decUsage"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_failed" TYPE bigint USING "___requests_failed"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_succeeded" TYPE bigint USING "___requests_succeeded"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___requests_received" TYPE bigint USING "___requests_received"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_total" TYPE bigint USING "___notes_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_inc" TYPE bigint USING "___notes_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_dec" TYPE bigint USING "___notes_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_normal" TYPE bigint USING "___notes_diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_reply" TYPE bigint USING "___notes_diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___notes_diffs_renote" TYPE bigint USING "___notes_diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_total" TYPE bigint USING "___users_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_inc" TYPE bigint USING "___users_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___users_dec" TYPE bigint USING "___users_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_total" TYPE bigint USING "___following_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_inc" TYPE bigint USING "___following_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___following_dec" TYPE bigint USING "___following_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_total" TYPE bigint USING "___followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_inc" TYPE bigint USING "___followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___followers_dec" TYPE bigint USING "___followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_totalFiles" TYPE bigint USING "___drive_totalFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incFiles" TYPE bigint USING "___drive_incFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decFiles" TYPE bigint USING "___drive_decFiles"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_incUsage" TYPE bigint USING "___drive_incUsage"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ALTER COLUMN "___drive_decUsage" TYPE bigint USING "___drive_decUsage"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___total" TYPE bigint USING "___total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___inc" TYPE bigint USING "___inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___dec" TYPE bigint USING "___dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE bigint USING "___diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE bigint USING "___diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE bigint USING "___diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___total" TYPE bigint USING "___total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___inc" TYPE bigint USING "___inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___dec" TYPE bigint USING "___dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_normal" TYPE bigint USING "___diffs_normal"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_reply" TYPE bigint USING "___diffs_reply"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ALTER COLUMN "___diffs_renote" TYPE bigint USING "___diffs_renote"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incCount" TYPE bigint USING "___local_incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_incSize" TYPE bigint USING "___local_incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decCount" TYPE bigint USING "___local_decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___local_decSize" TYPE bigint USING "___local_decSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incCount" TYPE bigint USING "___remote_incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_incSize" TYPE bigint USING "___remote_incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decCount" TYPE bigint USING "___remote_decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__drive" ALTER COLUMN "___remote_decSize" TYPE bigint USING "___remote_decSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incCount" TYPE bigint USING "___local_incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_incSize" TYPE bigint USING "___local_incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decCount" TYPE bigint USING "___local_decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___local_decSize" TYPE bigint USING "___local_decSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incCount" TYPE bigint USING "___remote_incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_incSize" TYPE bigint USING "___remote_incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decCount" TYPE bigint USING "___remote_decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__drive" ALTER COLUMN "___remote_decSize" TYPE bigint USING "___remote_decSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___local_count" TYPE bigint USING "___local_count"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_reaction" ALTER COLUMN "___remote_count" TYPE bigint USING "___remote_count"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___local_count" TYPE bigint USING "___local_count"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_reaction" ALTER COLUMN "___remote_count" TYPE bigint USING "___remote_count"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_total" TYPE bigint USING "___local_followings_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE bigint USING "___local_followings_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE bigint USING "___local_followings_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_total" TYPE bigint USING "___local_followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE bigint USING "___local_followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE bigint USING "___local_followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE bigint USING "___remote_followings_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE bigint USING "___remote_followings_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE bigint USING "___remote_followings_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE bigint USING "___remote_followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE bigint USING "___remote_followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE bigint USING "___remote_followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_total" TYPE bigint USING "___local_followings_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_inc" TYPE bigint USING "___local_followings_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followings_dec" TYPE bigint USING "___local_followings_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_total" TYPE bigint USING "___local_followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_inc" TYPE bigint USING "___local_followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___local_followers_dec" TYPE bigint USING "___local_followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_total" TYPE bigint USING "___remote_followings_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_inc" TYPE bigint USING "___remote_followings_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followings_dec" TYPE bigint USING "___remote_followings_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_total" TYPE bigint USING "___remote_followers_total"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_inc" TYPE bigint USING "___remote_followers_inc"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_following" ALTER COLUMN "___remote_followers_dec" TYPE bigint USING "___remote_followers_dec"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalCount" TYPE bigint USING "___totalCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___totalSize" TYPE bigint USING "___totalSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incCount" TYPE bigint USING "___incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___incSize" TYPE bigint USING "___incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decCount" TYPE bigint USING "___decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_drive" ALTER COLUMN "___decSize" TYPE bigint USING "___decSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalCount" TYPE bigint USING "___totalCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___totalSize" TYPE bigint USING "___totalSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incCount" TYPE bigint USING "___incCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___incSize" TYPE bigint USING "___incSize"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decCount" TYPE bigint USING "___decCount"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_drive" ALTER COLUMN "___decSize" TYPE bigint USING "___decSize"::bigint`, + ); } } diff --git a/packages/backend/migration/1644059847460-chart-v8.js b/packages/backend/migration/1644059847460-chart-v8.js index a5339c0ebd..f9357c8ca1 100644 --- a/packages/backend/migration/1644059847460-chart-v8.js +++ b/packages/backend/migration/1644059847460-chart-v8.js @@ -1,25 +1,46 @@ - - export class chartV81644059847460 { - name = 'chartV81644059847460' + name = "chartV81644059847460"; - async up(queryRunner) { - await queryRunner.query(`UPDATE "__chart__active_users" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__active_users" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__active_users" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__active_users" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`); + async up(queryRunner) { + await queryRunner.query( + `UPDATE "__chart__active_users" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__active_users" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__active_users" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__active_users" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`, + ); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`); - } - - async down(queryRunner) { - - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`); - } + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`, + ); + } } diff --git a/packages/backend/migration/1644060125705-chart-v9.js b/packages/backend/migration/1644060125705-chart-v9.js index da35d42315..7d7934e319 100644 --- a/packages/backend/migration/1644060125705-chart-v9.js +++ b/packages/backend/migration/1644060125705-chart-v9.js @@ -1,25 +1,46 @@ - - export class chartV91644060125705 { - name = 'chartV91644060125705' + name = "chartV91644060125705"; - async up(queryRunner) { - await queryRunner.query(`UPDATE "__chart__hashtag" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart__hashtag" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__hashtag" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`); - await queryRunner.query(`UPDATE "__chart_day__hashtag" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`); + async up(queryRunner) { + await queryRunner.query( + `UPDATE "__chart__hashtag" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart__hashtag" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__hashtag" SET "___local_users"=2147483647 WHERE "___local_users" > 2147483647`, + ); + await queryRunner.query( + `UPDATE "__chart_day__hashtag" SET "___remote_users"=2147483647 WHERE "___remote_users" > 2147483647`, + ); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`); - } - - async down(queryRunner) { - - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`); - await queryRunner.query(`ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`); - } + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___local_users" TYPE integer USING "___local_users"::integer`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___remote_users" TYPE integer USING "___remote_users"::integer`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__hashtag" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___local_users" TYPE bigint USING "___local_users"::bigint`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__hashtag" ALTER COLUMN "___remote_users" TYPE bigint USING "___remote_users"::bigint`, + ); + } } diff --git a/packages/backend/migration/1644073149413-chart-v10.js b/packages/backend/migration/1644073149413-chart-v10.js index 7260bbeca4..8038dad156 100644 --- a/packages/backend/migration/1644073149413-chart-v10.js +++ b/packages/backend/migration/1644073149413-chart-v10.js @@ -1,35 +1,77 @@ - - export class chartV101644073149413 { - name = 'chartV101644073149413' + name = "chartV101644073149413"; - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "__chart__ap_request" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___deliverFailed" integer NOT NULL DEFAULT '0', "___deliverSucceeded" integer NOT NULL DEFAULT '0', "___inboxReceived" integer NOT NULL DEFAULT '0', CONSTRAINT "UQ_e56f4beac5746d44bc3e19c80d0" UNIQUE ("date"), CONSTRAINT "PK_56a25cd447c7ee08876b3baf8d8" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_e56f4beac5746d44bc3e19c80d" ON "__chart__ap_request" ("date") `); - await queryRunner.query(`CREATE TABLE "__chart_day__ap_request" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___deliverFailed" integer NOT NULL DEFAULT '0', "___deliverSucceeded" integer NOT NULL DEFAULT '0', "___inboxReceived" integer NOT NULL DEFAULT '0', CONSTRAINT "UQ_a848f66d6cec11980a5dd595822" UNIQUE ("date"), CONSTRAINT "PK_9318b49daee320194e23f712e69" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_a848f66d6cec11980a5dd59582" ON "__chart_day__ap_request" ("date") `); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "unique_temp___deliveredInstances" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___deliveredInstances" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "unique_temp___inboxInstances" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___inboxInstances" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "unique_temp___deliveredInstances" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___deliveredInstances" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "unique_temp___inboxInstances" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___inboxInstances" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "__chart__ap_request" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___deliverFailed" integer NOT NULL DEFAULT '0', "___deliverSucceeded" integer NOT NULL DEFAULT '0', "___inboxReceived" integer NOT NULL DEFAULT '0', CONSTRAINT "UQ_e56f4beac5746d44bc3e19c80d0" UNIQUE ("date"), CONSTRAINT "PK_56a25cd447c7ee08876b3baf8d8" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_e56f4beac5746d44bc3e19c80d" ON "__chart__ap_request" ("date") `, + ); + await queryRunner.query( + `CREATE TABLE "__chart_day__ap_request" ("id" SERIAL NOT NULL, "date" integer NOT NULL, "___deliverFailed" integer NOT NULL DEFAULT '0', "___deliverSucceeded" integer NOT NULL DEFAULT '0', "___inboxReceived" integer NOT NULL DEFAULT '0', CONSTRAINT "UQ_a848f66d6cec11980a5dd595822" UNIQUE ("date"), CONSTRAINT "PK_9318b49daee320194e23f712e69" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_a848f66d6cec11980a5dd59582" ON "__chart_day__ap_request" ("date") `, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "unique_temp___deliveredInstances" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___deliveredInstances" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "unique_temp___inboxInstances" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___inboxInstances" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "unique_temp___deliveredInstances" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___deliveredInstances" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "unique_temp___inboxInstances" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___inboxInstances" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___inboxInstances"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___inboxInstances"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___deliveredInstances"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___deliveredInstances"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___inboxInstances"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___inboxInstances"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___deliveredInstances"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___deliveredInstances"`); - await queryRunner.query(`DROP INDEX "public"."IDX_a848f66d6cec11980a5dd59582"`); - await queryRunner.query(`DROP TABLE "__chart_day__ap_request"`); - await queryRunner.query(`DROP INDEX "public"."IDX_e56f4beac5746d44bc3e19c80d"`); - await queryRunner.query(`DROP TABLE "__chart__ap_request"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___inboxInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___inboxInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___deliveredInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___deliveredInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___inboxInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___inboxInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___deliveredInstances"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___deliveredInstances"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_a848f66d6cec11980a5dd59582"`, + ); + await queryRunner.query(`DROP TABLE "__chart_day__ap_request"`); + await queryRunner.query( + `DROP INDEX "public"."IDX_e56f4beac5746d44bc3e19c80d"`, + ); + await queryRunner.query(`DROP TABLE "__chart__ap_request"`); + } } diff --git a/packages/backend/migration/1644095659741-chart-v11.js b/packages/backend/migration/1644095659741-chart-v11.js index 309fff1d9a..8db122d4f1 100644 --- a/packages/backend/migration/1644095659741-chart-v11.js +++ b/packages/backend/migration/1644095659741-chart-v11.js @@ -1,91 +1,249 @@ - - export class chartV111644095659741 { - name = 'chartV111644095659741' + name = "chartV111644095659741"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___local_users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___remote_users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinWeek" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredWithinWeek" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinMonth" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredWithinMonth" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinYear" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredWithinYear" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideWeek" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredOutsideWeek" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideMonth" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredOutsideMonth" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideYear" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___registeredOutsideYear" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinWeek" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinWeek" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinMonth" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinMonth" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinYear" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinYear" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideWeek" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideWeek" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideMonth" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideMonth" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideYear" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideYear" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___local_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___remote_users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinWeek" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredWithinWeek" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinMonth" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredWithinMonth" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredWithinYear" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredWithinYear" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideWeek" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredOutsideWeek" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideMonth" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredOutsideMonth" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___registeredOutsideYear" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___registeredOutsideYear" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinWeek" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinWeek" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinMonth" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinMonth" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredWithinYear" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredWithinYear" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideWeek" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideWeek" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideMonth" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideMonth" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___registeredOutsideYear" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___registeredOutsideYear" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideYear"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideYear"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideMonth"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideMonth"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideWeek"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideWeek"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinYear"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinYear"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinMonth"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinMonth"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinWeek"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinWeek"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideYear"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideYear"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideMonth"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideMonth"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideWeek"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideWeek"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinYear"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinYear"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinMonth"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinMonth"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinWeek"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinWeek"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___remote_users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___local_users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___remote_users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___local_users" integer NOT NULL DEFAULT '0'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredOutsideWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredOutsideWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___registeredWithinWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___registeredWithinWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredOutsideWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredOutsideWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinYear"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinMonth"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___registeredWithinWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___registeredWithinWeek"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___remote_users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___local_users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___remote_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___local_users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___remote_users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___local_users" integer NOT NULL DEFAULT '0'`, + ); + } } diff --git a/packages/backend/migration/1644328606241-chart-v12.js b/packages/backend/migration/1644328606241-chart-v12.js index c3c7e44f95..ea363e12fd 100644 --- a/packages/backend/migration/1644328606241-chart-v12.js +++ b/packages/backend/migration/1644328606241-chart-v12.js @@ -1,27 +1,57 @@ - - export class chartV121644328606241 { - name = 'chartV121644328606241' + name = "chartV121644328606241"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD "___local_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__notes" ADD "___remote_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ADD "___local_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" ADD "___remote_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__instance" ADD "___notes_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" ADD "___notes_diffs_withFile" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" ADD "___diffs_withFile" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" ADD "___diffs_withFile" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD "___local_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" ADD "___remote_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ADD "___local_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" ADD "___remote_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" ADD "___notes_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" ADD "___notes_diffs_withFile" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" ADD "___diffs_withFile" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" ADD "___diffs_withFile" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__per_user_notes" DROP COLUMN "___diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart__per_user_notes" DROP COLUMN "___diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart_day__instance" DROP COLUMN "___notes_diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart__instance" DROP COLUMN "___notes_diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" DROP COLUMN "___remote_diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart_day__notes" DROP COLUMN "___local_diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "___remote_diffs_withFile"`); - await queryRunner.query(`ALTER TABLE "__chart__notes" DROP COLUMN "___local_diffs_withFile"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__per_user_notes" DROP COLUMN "___diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__per_user_notes" DROP COLUMN "___diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__instance" DROP COLUMN "___notes_diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__instance" DROP COLUMN "___notes_diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" DROP COLUMN "___remote_diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__notes" DROP COLUMN "___local_diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" DROP COLUMN "___remote_diffs_withFile"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__notes" DROP COLUMN "___local_diffs_withFile"`, + ); + } } diff --git a/packages/backend/migration/1644331238153-chart-v13.js b/packages/backend/migration/1644331238153-chart-v13.js index 639f7b4e20..cbb1830f50 100644 --- a/packages/backend/migration/1644331238153-chart-v13.js +++ b/packages/backend/migration/1644331238153-chart-v13.js @@ -1,19 +1,33 @@ - - export class chartV131644331238153 { - name = 'chartV131644331238153' + name = "chartV131644331238153"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "unique_temp___stalled" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___stalled" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "unique_temp___stalled" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___stalled" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "unique_temp___stalled" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___stalled" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "unique_temp___stalled" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___stalled" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___stalled"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___stalled"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___stalled"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___stalled"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___stalled"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "unique_temp___stalled"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___stalled"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "unique_temp___stalled"`, + ); + } } diff --git a/packages/backend/migration/1644344266289-chart-v14.js b/packages/backend/migration/1644344266289-chart-v14.js index a0d9cfc38c..6e6c030833 100644 --- a/packages/backend/migration/1644344266289-chart-v14.js +++ b/packages/backend/migration/1644344266289-chart-v14.js @@ -1,47 +1,117 @@ - - export class chartV141644344266289 { - name = 'chartV141644344266289' + name = "chartV141644344266289"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___users"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___users"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___notedUsers"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___readWrite" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___read" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___read" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___write" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___write" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___readWrite" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___read" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___read" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___write" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___write" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___users"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___notedUsers"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___readWrite" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___read" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___read" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___write" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___write" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___readWrite" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___read" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___read" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___write" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___write" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___write"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___write"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___read"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___read"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" DROP COLUMN "___readWrite"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___write"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___write"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___read"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___read"`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" DROP COLUMN "___readWrite"`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___write"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___write"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___read"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "unique_temp___read"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" DROP COLUMN "___readWrite"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___write"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___write"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___read"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "unique_temp___read"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" DROP COLUMN "___readWrite"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___notedUsers" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___notedUsers" character varying array NOT NULL DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "___users" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__active_users" ADD "unique_temp___users" character varying array NOT NULL DEFAULT '{}'`, + ); + } } diff --git a/packages/backend/migration/1644395759931-instance-theme-color.js b/packages/backend/migration/1644395759931-instance-theme-color.js index 8f335ad210..1e0ee04bc2 100644 --- a/packages/backend/migration/1644395759931-instance-theme-color.js +++ b/packages/backend/migration/1644395759931-instance-theme-color.js @@ -1,13 +1,13 @@ - - export class instanceThemeColor1644395759931 { - name = 'instanceThemeColor1644395759931' + name = "instanceThemeColor1644395759931"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "themeColor" character varying(512)`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "themeColor" character varying(512)`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "themeColor"`); - } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "themeColor"`); + } } diff --git a/packages/backend/migration/1644481657998-chart-v15.js b/packages/backend/migration/1644481657998-chart-v15.js index b50ca87c40..a8e1b89cb1 100644 --- a/packages/backend/migration/1644481657998-chart-v15.js +++ b/packages/backend/migration/1644481657998-chart-v15.js @@ -1,31 +1,69 @@ - - export class chartV151644481657998 { - name = 'chartV151644481657998' + name = "chartV151644481657998"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___instance_total"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___instance_inc"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___instance_dec"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_total"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_inc"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_dec"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___sub" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___pub" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___sub" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___pub" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___instance_total"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___instance_inc"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___instance_dec"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_total"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_inc"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___instance_dec"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___sub" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___pub" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___sub" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___pub" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___pub"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___sub"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___pub"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___sub"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___instance_dec" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___instance_inc" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___instance_total" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___instance_dec" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___instance_inc" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___instance_total" integer NOT NULL DEFAULT '0'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___pub"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___sub"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___pub"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___sub"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___instance_dec" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___instance_inc" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___instance_total" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___instance_dec" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___instance_inc" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___instance_total" integer NOT NULL DEFAULT '0'`, + ); + } } diff --git a/packages/backend/migration/1644551208096-following-indexes.js b/packages/backend/migration/1644551208096-following-indexes.js index 276473ff6c..b06f764e58 100644 --- a/packages/backend/migration/1644551208096-following-indexes.js +++ b/packages/backend/migration/1644551208096-following-indexes.js @@ -1,15 +1,21 @@ - - export class followingIndexes1644551208096 { - name = 'followingIndexes1644551208096' + name = "followingIndexes1644551208096"; - async up(queryRunner) { - await queryRunner.query(`CREATE INDEX "IDX_4ccd2239268ebbd1b35e318754" ON "following" ("followerHost") `); - await queryRunner.query(`CREATE INDEX "IDX_fcdafee716dfe9c3b5fde90f30" ON "following" ("followeeHost") `); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE INDEX "IDX_4ccd2239268ebbd1b35e318754" ON "following" ("followerHost") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fcdafee716dfe9c3b5fde90f30" ON "following" ("followeeHost") `, + ); + } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "public"."IDX_fcdafee716dfe9c3b5fde90f30"`); - await queryRunner.query(`DROP INDEX "public"."IDX_4ccd2239268ebbd1b35e318754"`); - } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "public"."IDX_fcdafee716dfe9c3b5fde90f30"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_4ccd2239268ebbd1b35e318754"`, + ); + } } diff --git a/packages/backend/migration/1645340161439-remove-max-note-text-length.js b/packages/backend/migration/1645340161439-remove-max-note-text-length.js index c88cb70bfb..d17ef8c124 100644 --- a/packages/backend/migration/1645340161439-remove-max-note-text-length.js +++ b/packages/backend/migration/1645340161439-remove-max-note-text-length.js @@ -1,13 +1,15 @@ - - export class removeMaxNoteTextLength1645340161439 { - name = 'removeMaxNoteTextLength1645340161439' + name = "removeMaxNoteTextLength1645340161439"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "maxNoteTextLength"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "maxNoteTextLength"`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "maxNoteTextLength" integer NOT NULL DEFAULT '500'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "maxNoteTextLength" integer NOT NULL DEFAULT '500'`, + ); + } } diff --git a/packages/backend/migration/1645599900873-federation-chart-pubsub.js b/packages/backend/migration/1645599900873-federation-chart-pubsub.js index fd7cb6d5a1..58e2b4c00d 100644 --- a/packages/backend/migration/1645599900873-federation-chart-pubsub.js +++ b/packages/backend/migration/1645599900873-federation-chart-pubsub.js @@ -1,15 +1,21 @@ - - export class federationChartPubsub1645599900873 { - name = 'federationChartPubsub1645599900873' + name = "federationChartPubsub1645599900873"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___pubsub" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___pubsub" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___pubsub" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___pubsub" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___pubsub"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___pubsub"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___pubsub"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___pubsub"`, + ); + } } diff --git a/packages/backend/migration/1646143552768-instance-default-theme.js b/packages/backend/migration/1646143552768-instance-default-theme.js index 029354fd92..d97efcaa6e 100644 --- a/packages/backend/migration/1646143552768-instance-default-theme.js +++ b/packages/backend/migration/1646143552768-instance-default-theme.js @@ -1,13 +1,21 @@ export class instanceDefaultTheme1646143552768 { - name = 'instanceDefaultTheme1646143552768' + name = "instanceDefaultTheme1646143552768"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "defaultLightTheme" character varying(8192)`); - await queryRunner.query(`ALTER TABLE "meta" ADD "defaultDarkTheme" character varying(8192)`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "defaultLightTheme" character varying(8192)`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "defaultDarkTheme" character varying(8192)`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "defaultDarkTheme"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "defaultLightTheme"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "defaultDarkTheme"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "defaultLightTheme"`, + ); + } } diff --git a/packages/backend/migration/1646387162108-mute-expires-at.js b/packages/backend/migration/1646387162108-mute-expires-at.js index c8be8f3c54..52fe101bd1 100644 --- a/packages/backend/migration/1646387162108-mute-expires-at.js +++ b/packages/backend/migration/1646387162108-mute-expires-at.js @@ -1,13 +1,19 @@ export class muteExpiresAt1646387162108 { - name = 'muteExpiresAt1646387162108' + name = "muteExpiresAt1646387162108"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "muting" ADD "expiresAt" TIMESTAMP WITH TIME ZONE`); - await queryRunner.query(`CREATE INDEX "IDX_c1fd1c3dfb0627aa36c253fd14" ON "muting" ("expiresAt") `); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "muting" ADD "expiresAt" TIMESTAMP WITH TIME ZONE`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_c1fd1c3dfb0627aa36c253fd14" ON "muting" ("expiresAt") `, + ); + } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "public"."IDX_c1fd1c3dfb0627aa36c253fd14"`); - await queryRunner.query(`ALTER TABLE "muting" DROP COLUMN "expiresAt"`); - } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "public"."IDX_c1fd1c3dfb0627aa36c253fd14"`, + ); + await queryRunner.query(`ALTER TABLE "muting" DROP COLUMN "expiresAt"`); + } } diff --git a/packages/backend/migration/1646549089451-poll-ended-notification.js b/packages/backend/migration/1646549089451-poll-ended-notification.js index 38a38ce64d..cc96a62a7e 100644 --- a/packages/backend/migration/1646549089451-poll-ended-notification.js +++ b/packages/backend/migration/1646549089451-poll-ended-notification.js @@ -1,18 +1,29 @@ - export class pollEndedNotification1646549089451 { - name = 'pollEndedNotification1646549089451' + name = "pollEndedNotification1646549089451"; - async up(queryRunner) { - await queryRunner.query(`ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`); - await queryRunner.query(`CREATE TYPE "public"."notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "public"."notification_type_enum" USING "type"::"text"::"public"."notification_type_enum"`); - await queryRunner.query(`DROP TYPE "public"."notification_type_enum_old"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TYPE "public"."notification_type_enum" RENAME TO "notification_type_enum_old"`, + ); + await queryRunner.query( + `CREATE TYPE "public"."notification_type_enum" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "public"."notification_type_enum" USING "type"::"text"::"public"."notification_type_enum"`, + ); + await queryRunner.query(`DROP TYPE "public"."notification_type_enum_old"`); + } - async down(queryRunner) { - await queryRunner.query(`CREATE TYPE "public"."notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`); - await queryRunner.query(`ALTER TABLE "notification" ALTER COLUMN "type" TYPE "public"."notification_type_enum_old" USING "type"::"text"::"public"."notification_type_enum_old"`); - await queryRunner.query(`DROP TYPE "public"."notification_type_enum"`); - await queryRunner.query(`ALTER TYPE "public"."notification_type_enum_old" RENAME TO "notification_type_enum"`); - } + async down(queryRunner) { + await queryRunner.query( + `CREATE TYPE "public"."notification_type_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER COLUMN "type" TYPE "public"."notification_type_enum_old" USING "type"::"text"::"public"."notification_type_enum_old"`, + ); + await queryRunner.query(`DROP TYPE "public"."notification_type_enum"`); + await queryRunner.query( + `ALTER TYPE "public"."notification_type_enum_old" RENAME TO "notification_type_enum"`, + ); + } } diff --git a/packages/backend/migration/1646633030285-chart-federation-active.js b/packages/backend/migration/1646633030285-chart-federation-active.js index 952289c8f8..3cb2dffe3f 100644 --- a/packages/backend/migration/1646633030285-chart-federation-active.js +++ b/packages/backend/migration/1646633030285-chart-federation-active.js @@ -1,13 +1,21 @@ export class chartFederationActive1646633030285 { - name = 'chartFederationActive1646633030285' + name = "chartFederationActive1646633030285"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___active"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___active"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___active"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___active"`, + ); + } } diff --git a/packages/backend/migration/1646655454495-remove-instance-drive-columns.js b/packages/backend/migration/1646655454495-remove-instance-drive-columns.js index a0ee1b2c43..12f56bc2d7 100644 --- a/packages/backend/migration/1646655454495-remove-instance-drive-columns.js +++ b/packages/backend/migration/1646655454495-remove-instance-drive-columns.js @@ -1,13 +1,17 @@ export class removeInstanceDriveColumns1646655454495 { - name = 'removeInstanceDriveColumns1646655454495' + name = "removeInstanceDriveColumns1646655454495"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveUsage"`); - await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveFiles"`); - } + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveUsage"`); + await queryRunner.query(`ALTER TABLE "instance" DROP COLUMN "driveFiles"`); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "instance" ADD "driveFiles" integer NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "instance" ADD "driveUsage" bigint NOT NULL DEFAULT '0'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "instance" ADD "driveFiles" integer NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ADD "driveUsage" bigint NOT NULL DEFAULT '0'`, + ); + } } diff --git a/packages/backend/migration/1646732390560-chart-federation-active-sub-pub.js b/packages/backend/migration/1646732390560-chart-federation-active-sub-pub.js index c9a847cbcf..e34b9a22e9 100644 --- a/packages/backend/migration/1646732390560-chart-federation-active-sub-pub.js +++ b/packages/backend/migration/1646732390560-chart-federation-active-sub-pub.js @@ -1,21 +1,45 @@ export class chartFederationActiveSubPub1646732390560 { - name = 'chartFederationActiveSubPub1646732390560' + name = "chartFederationActiveSubPub1646732390560"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___active"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___active"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___subActive" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___pubActive" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___subActive" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___pubActive" smallint NOT NULL DEFAULT '0'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___active"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___active"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___subActive" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___pubActive" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___subActive" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___pubActive" smallint NOT NULL DEFAULT '0'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___pubActive"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" DROP COLUMN "___subActive"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___pubActive"`); - await queryRunner.query(`ALTER TABLE "__chart__federation" DROP COLUMN "___subActive"`); - await queryRunner.query(`ALTER TABLE "__chart_day__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`); - await queryRunner.query(`ALTER TABLE "__chart__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___pubActive"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" DROP COLUMN "___subActive"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___pubActive"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" DROP COLUMN "___subActive"`, + ); + await queryRunner.query( + `ALTER TABLE "__chart_day__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`, + ); + await queryRunner.query( + `ALTER TABLE "__chart__federation" ADD "___active" smallint NOT NULL DEFAULT '0'`, + ); + } } diff --git a/packages/backend/migration/1648548247382-webhook.js b/packages/backend/migration/1648548247382-webhook.js index aea369a5cc..3e7160e2b2 100644 --- a/packages/backend/migration/1648548247382-webhook.js +++ b/packages/backend/migration/1648548247382-webhook.js @@ -1,19 +1,37 @@ export class webhook1648548247382 { - name = 'webhook1648548247382' + name = "webhook1648548247382"; - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "webhook" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "on" character varying(128) array NOT NULL DEFAULT '{}', "url" character varying(1024) NOT NULL, "secret" character varying(1024) NOT NULL, "active" boolean NOT NULL DEFAULT true, CONSTRAINT "PK_e6765510c2d078db49632b59020" PRIMARY KEY ("id")); COMMENT ON COLUMN "webhook"."createdAt" IS 'The created date of the Antenna.'; COMMENT ON COLUMN "webhook"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "webhook"."name" IS 'The name of the Antenna.'`); - await queryRunner.query(`CREATE INDEX "IDX_f272c8c8805969e6a6449c77b3" ON "webhook" ("userId") `); - await queryRunner.query(`CREATE INDEX "IDX_8063a0586ed1dfbe86e982d961" ON "webhook" ("on") `); - await queryRunner.query(`CREATE INDEX "IDX_5a056076f76b2efe08216ba655" ON "webhook" ("active") `); - await queryRunner.query(`ALTER TABLE "webhook" ADD CONSTRAINT "FK_f272c8c8805969e6a6449c77b3c" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "webhook" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "name" character varying(128) NOT NULL, "on" character varying(128) array NOT NULL DEFAULT '{}', "url" character varying(1024) NOT NULL, "secret" character varying(1024) NOT NULL, "active" boolean NOT NULL DEFAULT true, CONSTRAINT "PK_e6765510c2d078db49632b59020" PRIMARY KEY ("id")); COMMENT ON COLUMN "webhook"."createdAt" IS 'The created date of the Antenna.'; COMMENT ON COLUMN "webhook"."userId" IS 'The owner ID.'; COMMENT ON COLUMN "webhook"."name" IS 'The name of the Antenna.'`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_f272c8c8805969e6a6449c77b3" ON "webhook" ("userId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8063a0586ed1dfbe86e982d961" ON "webhook" ("on") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_5a056076f76b2efe08216ba655" ON "webhook" ("active") `, + ); + await queryRunner.query( + `ALTER TABLE "webhook" ADD CONSTRAINT "FK_f272c8c8805969e6a6449c77b3c" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "webhook" DROP CONSTRAINT "FK_f272c8c8805969e6a6449c77b3c"`); - await queryRunner.query(`DROP INDEX "public"."IDX_5a056076f76b2efe08216ba655"`); - await queryRunner.query(`DROP INDEX "public"."IDX_8063a0586ed1dfbe86e982d961"`); - await queryRunner.query(`DROP INDEX "public"."IDX_f272c8c8805969e6a6449c77b3"`); - await queryRunner.query(`DROP TABLE "webhook"`); + await queryRunner.query( + `ALTER TABLE "webhook" DROP CONSTRAINT "FK_f272c8c8805969e6a6449c77b3c"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_5a056076f76b2efe08216ba655"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_8063a0586ed1dfbe86e982d961"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_f272c8c8805969e6a6449c77b3"`, + ); + await queryRunner.query(`DROP TABLE "webhook"`); } } diff --git a/packages/backend/migration/1648816172177-webhook-2.js b/packages/backend/migration/1648816172177-webhook-2.js index 2feb68d611..a4ab4ef8f8 100644 --- a/packages/backend/migration/1648816172177-webhook-2.js +++ b/packages/backend/migration/1648816172177-webhook-2.js @@ -1,14 +1,15 @@ - export class webhook21648816172177 { - name = 'webhook21648816172177' + name = "webhook21648816172177"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "webhook" ADD "latestSentAt" TIMESTAMP WITH TIME ZONE`); - await queryRunner.query(`ALTER TABLE "webhook" ADD "latestStatus" integer`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "webhook" ADD "latestSentAt" TIMESTAMP WITH TIME ZONE`, + ); + await queryRunner.query(`ALTER TABLE "webhook" ADD "latestStatus" integer`); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "webhook" DROP COLUMN "latestStatus"`); - await queryRunner.query(`ALTER TABLE "webhook" DROP COLUMN "latestSentAt"`); - } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "webhook" DROP COLUMN "latestStatus"`); + await queryRunner.query(`ALTER TABLE "webhook" DROP COLUMN "latestSentAt"`); + } } diff --git a/packages/backend/migration/1651224615271-foreign-key.js b/packages/backend/migration/1651224615271-foreign-key.js index 535d21731a..7e6bc79623 100644 --- a/packages/backend/migration/1651224615271-foreign-key.js +++ b/packages/backend/migration/1651224615271-foreign-key.js @@ -1,89 +1,187 @@ export class foreignKeyReports1651224615271 { - name = 'foreignKeyReports1651224615271' + name = "foreignKeyReports1651224615271"; - async up(queryRunner) { - await Promise.all([ - queryRunner.query(`ALTER INDEX "public"."IDX_seoignmeoprigmkpodgrjmkpormg" RENAME TO "IDX_c8cc87bd0f2f4487d17c651fbf"`), - queryRunner.query(`DROP INDEX "public"."IDX_note_on_channelId_and_id_desc"`), + async up(queryRunner) { + await Promise.all([ + queryRunner.query( + `ALTER INDEX "public"."IDX_seoignmeoprigmkpodgrjmkpormg" RENAME TO "IDX_c8cc87bd0f2f4487d17c651fbf"`, + ), + queryRunner.query( + `DROP INDEX "public"."IDX_note_on_channelId_and_id_desc"`, + ), - // remove unnecessary default null, see also down - queryRunner.query(`ALTER TABLE "user" ALTER COLUMN "followersUri" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "session" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "appId" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "name" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "description" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "access_token" ALTER COLUMN "iconUrl" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "softwareName" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "softwareVersion" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "name" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "description" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "maintainerName" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "maintainerEmail" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "iconUrl" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "faviconUrl" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "instance" ALTER COLUMN "themeColor" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "clip" ALTER COLUMN "description" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "channelId" DROP DEFAULT`), - queryRunner.query(`ALTER TABLE "abuse_user_report" ALTER COLUMN "comment" DROP DEFAULT`), + // remove unnecessary default null, see also down + queryRunner.query( + `ALTER TABLE "user" ALTER COLUMN "followersUri" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "session" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "appId" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "name" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "description" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "access_token" ALTER COLUMN "iconUrl" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "softwareName" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "softwareVersion" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "name" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "description" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "maintainerName" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "maintainerEmail" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "iconUrl" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "faviconUrl" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "instance" ALTER COLUMN "themeColor" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "clip" ALTER COLUMN "description" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "note" ALTER COLUMN "channelId" DROP DEFAULT`, + ), + queryRunner.query( + `ALTER TABLE "abuse_user_report" ALTER COLUMN "comment" DROP DEFAULT`, + ), - queryRunner.query(`CREATE INDEX "IDX_315c779174fe8247ab324f036e" ON "drive_file" ("isLink")`), - queryRunner.query(`CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`), - //queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`), + queryRunner.query( + `CREATE INDEX "IDX_315c779174fe8247ab324f036e" ON "drive_file" ("isLink")`, + ), + queryRunner.query( + `CREATE INDEX "IDX_f22169eb10657bded6d875ac8f" ON "note" ("channelId")`, + ), + //queryRunner.query(`CREATE INDEX "IDX_a9021cc2e1feb5f72d3db6e9f5" ON "abuse_user_report" ("targetUserId")`), - //queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => { - // queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); - //}), + //queryRunner.query(`DELETE FROM "abuse_user_report" WHERE "targetUserId" NOT IN (SELECT "id" FROM "user")`).then(() => { + // queryRunner.query(`ALTER TABLE "abuse_user_report" ADD CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f" FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`); + //}), - queryRunner.query(`ALTER TABLE "poll" ADD CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b" UNIQUE ("noteId")`), - queryRunner.query(`ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`), - queryRunner.query(`ALTER TABLE "user_profile" ADD CONSTRAINT "UQ_51cb79b5555effaf7d69ba1cff9" UNIQUE ("userId")`), - queryRunner.query(`ALTER TABLE "user_publickey" ADD CONSTRAINT "UQ_10c146e4b39b443ede016f6736d" UNIQUE ("userId")`), - queryRunner.query(`ALTER TABLE "promo_note" ADD CONSTRAINT "UQ_e263909ca4fe5d57f8d4230dd5c" UNIQUE ("noteId")`), + queryRunner.query( + `ALTER TABLE "poll" ADD CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b" UNIQUE ("noteId")`, + ), + queryRunner.query( + `ALTER TABLE "user_keypair" ADD CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6" UNIQUE ("userId")`, + ), + queryRunner.query( + `ALTER TABLE "user_profile" ADD CONSTRAINT "UQ_51cb79b5555effaf7d69ba1cff9" UNIQUE ("userId")`, + ), + queryRunner.query( + `ALTER TABLE "user_publickey" ADD CONSTRAINT "UQ_10c146e4b39b443ede016f6736d" UNIQUE ("userId")`, + ), + queryRunner.query( + `ALTER TABLE "promo_note" ADD CONSTRAINT "UQ_e263909ca4fe5d57f8d4230dd5c" UNIQUE ("noteId")`, + ), - queryRunner.query(`ALTER TABLE "page" RENAME CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" TO "FK_a9ca79ad939bf06066b81c9d3aa"`), + queryRunner.query( + `ALTER TABLE "page" RENAME CONSTRAINT "FK_3126dd7c502c9e4d7597ef7ef10" TO "FK_a9ca79ad939bf06066b81c9d3aa"`, + ), - queryRunner.query(`ALTER TYPE "public"."user_profile_mutingnotificationtypes_enum" ADD VALUE 'pollEnded' AFTER 'pollVote'`), - ]); - } + queryRunner.query( + `ALTER TYPE "public"."user_profile_mutingnotificationtypes_enum" ADD VALUE 'pollEnded' AFTER 'pollVote'`, + ), + ]); + } - async down(queryRunner) { - await Promise.all([ - // There is no ALTER TYPE REMOVE VALUE query, so the reverse operation is a bit more complex - queryRunner.query(`UPDATE "user_profile" SET "mutingNotificationTypes" = array_remove("mutingNotificationTypes", 'pollEnded')`) - .then(() => - queryRunner.query(`CREATE TYPE "public"."user_profile_mutingnotificationtypes_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`) - ).then(() => - queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" DROP DEFAULT`) - ).then(() => - queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" TYPE "public"."user_profile_mutingnotificationtypes_enum_old"[] USING "mutingNotificationTypes"::"text"::"public"."user_profile_mutingnotificationtypes_enum_old"[]`) - ).then(() => - queryRunner.query(`ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" SET DEFAULT '{}'`) - ).then(() => - queryRunner.query(`DROP TYPE "public"."user_profile_mutingnotificationtypes_enum"`) - ).then(() => - queryRunner.query(`ALTER TYPE "public"."user_profile_mutingnotificationtypes_enum_old" RENAME TO "user_profile_mutingnotificationtypes_enum"`) - ), + async down(queryRunner) { + await Promise.all([ + // There is no ALTER TYPE REMOVE VALUE query, so the reverse operation is a bit more complex + queryRunner + .query( + `UPDATE "user_profile" SET "mutingNotificationTypes" = array_remove("mutingNotificationTypes", 'pollEnded')`, + ) + .then(() => + queryRunner.query( + `CREATE TYPE "public"."user_profile_mutingnotificationtypes_enum_old" AS ENUM('follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app')`, + ), + ) + .then(() => + queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" DROP DEFAULT`, + ), + ) + .then(() => + queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" TYPE "public"."user_profile_mutingnotificationtypes_enum_old"[] USING "mutingNotificationTypes"::"text"::"public"."user_profile_mutingnotificationtypes_enum_old"[]`, + ), + ) + .then(() => + queryRunner.query( + `ALTER TABLE "user_profile" ALTER COLUMN "mutingNotificationTypes" SET DEFAULT '{}'`, + ), + ) + .then(() => + queryRunner.query( + `DROP TYPE "public"."user_profile_mutingnotificationtypes_enum"`, + ), + ) + .then(() => + queryRunner.query( + `ALTER TYPE "public"."user_profile_mutingnotificationtypes_enum_old" RENAME TO "user_profile_mutingnotificationtypes_enum"`, + ), + ), - queryRunner.query(`ALTER TABLE "page" RENAME CONSTRAINT "FK_a9ca79ad939bf06066b81c9d3aa" TO "FK_3126dd7c502c9e4d7597ef7ef10"`), + queryRunner.query( + `ALTER TABLE "page" RENAME CONSTRAINT "FK_a9ca79ad939bf06066b81c9d3aa" TO "FK_3126dd7c502c9e4d7597ef7ef10"`, + ), - queryRunner.query(`ALTER TABLE "promo_note" DROP CONSTRAINT "UQ_e263909ca4fe5d57f8d4230dd5c"`), - queryRunner.query(`ALTER TABLE "user_publickey" DROP CONSTRAINT "UQ_10c146e4b39b443ede016f6736d"`), - queryRunner.query(`ALTER TABLE "user_profile" DROP CONSTRAINT "UQ_51cb79b5555effaf7d69ba1cff9"`), - queryRunner.query(`ALTER TABLE "user_keypair" DROP CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6"`), - queryRunner.query(`ALTER TABLE "poll" DROP CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b"`), + queryRunner.query( + `ALTER TABLE "promo_note" DROP CONSTRAINT "UQ_e263909ca4fe5d57f8d4230dd5c"`, + ), + queryRunner.query( + `ALTER TABLE "user_publickey" DROP CONSTRAINT "UQ_10c146e4b39b443ede016f6736d"`, + ), + queryRunner.query( + `ALTER TABLE "user_profile" DROP CONSTRAINT "UQ_51cb79b5555effaf7d69ba1cff9"`, + ), + queryRunner.query( + `ALTER TABLE "user_keypair" DROP CONSTRAINT "UQ_f4853eb41ab722fe05f81cedeb6"`, + ), + queryRunner.query( + `ALTER TABLE "poll" DROP CONSTRAINT "UQ_da851e06d0dfe2ef397d8b1bf1b"`, + ), - queryRunner.query(`ALTER TABLE "abuse_user_report" ALTER COLUMN "comment" SET DEFAULT '{}'`), - queryRunner.query(`ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f"`), + queryRunner.query( + `ALTER TABLE "abuse_user_report" ALTER COLUMN "comment" SET DEFAULT '{}'`, + ), + queryRunner.query( + `ALTER TABLE "abuse_user_report" DROP CONSTRAINT "FK_a9021cc2e1feb5f72d3db6e9f5f"`, + ), - queryRunner.query(`DROP INDEX "public"."IDX_a9021cc2e1feb5f72d3db6e9f5"`), - queryRunner.query(`DROP INDEX "public"."IDX_f22169eb10657bded6d875ac8f"`), - queryRunner.query(`DROP INDEX "public"."IDX_315c779174fe8247ab324f036e"`), + queryRunner.query(`DROP INDEX "public"."IDX_a9021cc2e1feb5f72d3db6e9f5"`), + queryRunner.query(`DROP INDEX "public"."IDX_f22169eb10657bded6d875ac8f"`), + queryRunner.query(`DROP INDEX "public"."IDX_315c779174fe8247ab324f036e"`), - /* DEFAULT's are not set again because if the column can be NULL, then DEFAULT NULL is not necessary. + /* DEFAULT's are not set again because if the column can be NULL, then DEFAULT NULL is not necessary. see also https://github.com/typeorm/typeorm/issues/7579#issuecomment-835423615 */ - queryRunner.query(`CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("id", "channelId") `), - queryRunner.query(`ALTER INDEX "public"."IDX_c8cc87bd0f2f4487d17c651fbf" RENAME TO "IDX_seoignmeoprigmkpodgrjmkpormg"`), - ]); - } + queryRunner.query( + `CREATE INDEX "IDX_note_on_channelId_and_id_desc" ON "note" ("id", "channelId") `, + ), + queryRunner.query( + `ALTER INDEX "public"."IDX_c8cc87bd0f2f4487d17c651fbf" RENAME TO "IDX_seoignmeoprigmkpodgrjmkpormg"`, + ), + ]); + } } diff --git a/packages/backend/migration/1652859567549-uniform-themecolor.js b/packages/backend/migration/1652859567549-uniform-themecolor.js index 8da1fd7fbb..8c91854d53 100644 --- a/packages/backend/migration/1652859567549-uniform-themecolor.js +++ b/packages/backend/migration/1652859567549-uniform-themecolor.js @@ -1,7 +1,7 @@ -import tinycolor from 'tinycolor2'; +import tinycolor from "tinycolor2"; export class uniformThemecolor1652859567549 { - name = 'uniformThemecolor1652859567549' + name = "uniformThemecolor1652859567549"; async up(queryRunner) { const formatColor = (color) => { @@ -13,20 +13,35 @@ export class uniformThemecolor1652859567549 { } }; - await queryRunner.query('SELECT "id", "themeColor" FROM "instance" WHERE "themeColor" IS NOT NULL') - .then(instances => Promise.all(instances.map(instance => { - // update theme color to uniform format, e.g. #00ff00 - // invalid theme colors get set to null - return queryRunner.query('UPDATE "instance" SET "themeColor" = $1 WHERE "id" = $2', [formatColor(instance.themeColor), instance.id]); - }))); + await queryRunner + .query( + 'SELECT "id", "themeColor" FROM "instance" WHERE "themeColor" IS NOT NULL', + ) + .then((instances) => + Promise.all( + instances.map((instance) => { + // update theme color to uniform format, e.g. #00ff00 + // invalid theme colors get set to null + return queryRunner.query( + 'UPDATE "instance" SET "themeColor" = $1 WHERE "id" = $2', + [formatColor(instance.themeColor), instance.id], + ); + }), + ), + ); // also fix own theme color - await queryRunner.query('SELECT "themeColor" FROM "meta" WHERE "themeColor" IS NOT NULL LIMIT 1') - .then(metas => { - if (metas.length > 0) { - return queryRunner.query('UPDATE "meta" SET "themeColor" = $1', [formatColor(metas[0].themeColor)]); - } - }); + await queryRunner + .query( + 'SELECT "themeColor" FROM "meta" WHERE "themeColor" IS NOT NULL LIMIT 1', + ) + .then((metas) => { + if (metas.length > 0) { + return queryRunner.query('UPDATE "meta" SET "themeColor" = $1', [ + formatColor(metas[0].themeColor), + ]); + } + }); } async down(queryRunner) { diff --git a/packages/backend/migration/1655368940105-nsfw-detection.js b/packages/backend/migration/1655368940105-nsfw-detection.js index 9268f43407..f1bcda50e5 100644 --- a/packages/backend/migration/1655368940105-nsfw-detection.js +++ b/packages/backend/migration/1655368940105-nsfw-detection.js @@ -1,23 +1,51 @@ export class nsfwDetection1655368940105 { - name = 'nsfwDetection1655368940105' + name = "nsfwDetection1655368940105"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`); - await queryRunner.query(`ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`); - await queryRunner.query(`CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `, + ); + } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetection_enum"`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`); - } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetection_enum"`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."predictedIsSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`, + ); + } } diff --git a/packages/backend/migration/1655371960534-nsfw-detection-2.js b/packages/backend/migration/1655371960534-nsfw-detection-2.js index aac6f37dad..236cd70913 100644 --- a/packages/backend/migration/1655371960534-nsfw-detection-2.js +++ b/packages/backend/migration/1655371960534-nsfw-detection-2.js @@ -1,15 +1,27 @@ export class nsfwDetection21655371960534 { - name = 'nsfwDetection21655371960534' + name = "nsfwDetection21655371960534"; - async up(queryRunner) { - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`); - await queryRunner.query(`ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`, + ); + } } diff --git a/packages/backend/migration/1655388169582-nsfw-detection-3.js b/packages/backend/migration/1655388169582-nsfw-detection-3.js index a5c80cf968..6a6ceeafba 100644 --- a/packages/backend/migration/1655388169582-nsfw-detection-3.js +++ b/packages/backend/migration/1655388169582-nsfw-detection-3.js @@ -1,21 +1,45 @@ export class nsfwDetection31655388169582 { - name = 'nsfwDetection31655388169582' + name = "nsfwDetection31655388169582"; - async up(queryRunner) { - await queryRunner.query(`ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum_old"`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum"`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum_old"`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old"`, + ); + } - async down(queryRunner) { - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" AS ENUM('medium', 'low', 'high')`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum_old"`); - await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`); - await queryRunner.query(`ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum"`); - } + async down(queryRunner) { + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" AS ENUM('medium', 'low', 'high')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" DROP DEFAULT`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" USING "sensitiveImageDetectionSensitivity"::"text"::"public"."meta_sensitiveimagedetectionsensitivity_enum_old"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ALTER COLUMN "sensitiveImageDetectionSensitivity" SET DEFAULT 'medium'`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`, + ); + await queryRunner.query( + `ALTER TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum_old" RENAME TO "meta_sensitiveimagedetectionsensitivity_enum"`, + ); + } } diff --git a/packages/backend/migration/1655393015659-nsfw-detection-4.js b/packages/backend/migration/1655393015659-nsfw-detection-4.js index e780732623..3e45897327 100644 --- a/packages/backend/migration/1655393015659-nsfw-detection-4.js +++ b/packages/backend/migration/1655393015659-nsfw-detection-4.js @@ -1,25 +1,57 @@ export class nsfwDetection41655393015659 { - name = 'nsfwDetection41655393015659' + name = "nsfwDetection41655393015659"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetection_enum"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetection_enum" AS ENUM('none', 'all', 'local', 'remote')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetection" "public"."meta_sensitivemediadetection_enum" NOT NULL DEFAULT 'none'`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitivemediadetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveMediaDetectionSensitivity" "public"."meta_sensitivemediadetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetection"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetection_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveImageDetectionSensitivity"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum"`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitivemediadetection_enum" AS ENUM('none', 'all', 'local', 'remote')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveMediaDetection" "public"."meta_sensitivemediadetection_enum" NOT NULL DEFAULT 'none'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitivemediadetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveMediaDetectionSensitivity" "public"."meta_sensitivemediadetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetectionSensitivity"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetectionsensitivity_enum"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetection"`); - await queryRunner.query(`DROP TYPE "public"."meta_sensitivemediadetection_enum"`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`); - await queryRunner.query(`CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`); - await queryRunner.query(`ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetectionSensitivity"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitivemediadetectionsensitivity_enum"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "sensitiveMediaDetection"`, + ); + await queryRunner.query( + `DROP TYPE "public"."meta_sensitivemediadetection_enum"`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetectionsensitivity_enum" AS ENUM('medium', 'low', 'high', 'veryLow', 'veryHigh')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveImageDetectionSensitivity" "public"."meta_sensitiveimagedetectionsensitivity_enum" NOT NULL DEFAULT 'medium'`, + ); + await queryRunner.query( + `CREATE TYPE "public"."meta_sensitiveimagedetection_enum" AS ENUM('none', 'all', 'local', 'remote')`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "sensitiveImageDetection" "public"."meta_sensitiveimagedetection_enum" NOT NULL DEFAULT 'none'`, + ); + } } diff --git a/packages/backend/migration/1655813815729-driveCapacityOverrideMb.js b/packages/backend/migration/1655813815729-driveCapacityOverrideMb.js index f257cd112f..e43f0af5c1 100644 --- a/packages/backend/migration/1655813815729-driveCapacityOverrideMb.js +++ b/packages/backend/migration/1655813815729-driveCapacityOverrideMb.js @@ -1,13 +1,21 @@ export class driveCapacityOverrideMb1655813815729 { - name = 'driveCapacityOverrideMb1655813815729' + name = "driveCapacityOverrideMb1655813815729"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "driveCapacityOverrideMb" integer`); - await queryRunner.query(`COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user" ADD "driveCapacityOverrideMb" integer`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "driveCapacityOverrideMb"`); - } + async down(queryRunner) { + await queryRunner.query( + `COMMENT ON COLUMN "user"."driveCapacityOverrideMb" IS 'Overrides user drive capacity limit'`, + ); + await queryRunner.query( + `ALTER TABLE "user" DROP COLUMN "driveCapacityOverrideMb"`, + ); + } } diff --git a/packages/backend/migration/1655918165614-user-ip.js b/packages/backend/migration/1655918165614-user-ip.js index 2294fbaf19..2c5dc1c821 100644 --- a/packages/backend/migration/1655918165614-user-ip.js +++ b/packages/backend/migration/1655918165614-user-ip.js @@ -1,17 +1,31 @@ export class userIp1655918165614 { - name = 'userIp1655918165614' + name = "userIp1655918165614"; - async up(queryRunner) { - await queryRunner.query(`CREATE TABLE "user_ip" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "ip" character varying(128) NOT NULL, CONSTRAINT "PK_2c44ddfbf7c0464d028dcef325e" PRIMARY KEY ("id"))`); - await queryRunner.query(`CREATE INDEX "IDX_7f7f1c66f48e9a8e18a33bc515" ON "user_ip" ("userId") `); - await queryRunner.query(`CREATE UNIQUE INDEX "IDX_361b500e06721013c124b7b6c5" ON "user_ip" ("userId", "ip") `); - await queryRunner.query(`ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "user_ip" ("id" SERIAL NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "ip" character varying(128) NOT NULL, CONSTRAINT "PK_2c44ddfbf7c0464d028dcef325e" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_7f7f1c66f48e9a8e18a33bc515" ON "user_ip" ("userId") `, + ); + await queryRunner.query( + `CREATE UNIQUE INDEX "IDX_361b500e06721013c124b7b6c5" ON "user_ip" ("userId", "ip") `, + ); + await queryRunner.query( + `ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`); - await queryRunner.query(`DROP INDEX "public"."IDX_361b500e06721013c124b7b6c5"`); - await queryRunner.query(`DROP INDEX "public"."IDX_7f7f1c66f48e9a8e18a33bc515"`); - await queryRunner.query(`DROP TABLE "user_ip"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_361b500e06721013c124b7b6c5"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_7f7f1c66f48e9a8e18a33bc515"`, + ); + await queryRunner.query(`DROP TABLE "user_ip"`); + } } diff --git a/packages/backend/migration/1656122560740-file-ip.js b/packages/backend/migration/1656122560740-file-ip.js index b59e7a911f..534097adb3 100644 --- a/packages/backend/migration/1656122560740-file-ip.js +++ b/packages/backend/migration/1656122560740-file-ip.js @@ -1,13 +1,19 @@ export class fileIp1656122560740 { - name = 'fileIp1656122560740' + name = "fileIp1656122560740"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" ADD "requestHeaders" jsonb DEFAULT '{}'`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "requestIp" character varying(128)`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "requestHeaders" jsonb DEFAULT '{}'`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "requestIp" character varying(128)`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "requestIp"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "requestHeaders"`); - } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "requestIp"`); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "requestHeaders"`, + ); + } } diff --git a/packages/backend/migration/1656251734807-nsfw-detection-5.js b/packages/backend/migration/1656251734807-nsfw-detection-5.js index 6f0c536907..7a2206e018 100644 --- a/packages/backend/migration/1656251734807-nsfw-detection-5.js +++ b/packages/backend/migration/1656251734807-nsfw-detection-5.js @@ -1,33 +1,79 @@ export class nsfwDetection51656251734807 { - name = 'nsfwDetection51656251734807' + name = "nsfwDetection51656251734807"; - async up(queryRunner) { - await queryRunner.query(`DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "maybeSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "maybePorn" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "meta" ADD "setSensitiveFlagAutomatically" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "user_profile" ADD "autoSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`CREATE INDEX "IDX_3b33dff77bb64b23c88151d23e" ON "drive_file" ("maybeSensitive") `); - await queryRunner.query(`CREATE INDEX "IDX_8bdcd3dd2bddb78014999a16ce" ON "drive_file" ("maybePorn") `); - } + async up(queryRunner) { + await queryRunner.query( + `DROP INDEX "public"."IDX_fc2d74a6d7d8b11292a851d8f8"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "forceIsSensitive"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "predictedIsSensitive"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "forceIsSensitiveWhenPredicted"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "disallowUploadWhenPredictedAsPorn"`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "maybeSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "maybePorn" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "setSensitiveFlagAutomatically" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "autoSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_3b33dff77bb64b23c88151d23e" ON "drive_file" ("maybeSensitive") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_8bdcd3dd2bddb78014999a16ce" ON "drive_file" ("maybePorn") `, + ); + } - async down(queryRunner) { - await queryRunner.query(`DROP INDEX "public"."IDX_8bdcd3dd2bddb78014999a16ce"`); - await queryRunner.query(`DROP INDEX "public"."IDX_3b33dff77bb64b23c88151d23e"`); - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "autoSensitive"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "setSensitiveFlagAutomatically"`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "maybePorn"`); - await queryRunner.query(`COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`); - await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "maybeSensitive"`); - await queryRunner.query(`ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`); - await queryRunner.query(`CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `); - } + async down(queryRunner) { + await queryRunner.query( + `DROP INDEX "public"."IDX_8bdcd3dd2bddb78014999a16ce"`, + ); + await queryRunner.query( + `DROP INDEX "public"."IDX_3b33dff77bb64b23c88151d23e"`, + ); + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "autoSensitive"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "setSensitiveFlagAutomatically"`, + ); + await queryRunner.query(`ALTER TABLE "drive_file" DROP COLUMN "maybePorn"`); + await queryRunner.query( + `COMMENT ON COLUMN "drive_file"."maybeSensitive" IS 'Whether the DriveFile is NSFW. (predict)'`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" DROP COLUMN "maybeSensitive"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "disallowUploadWhenPredictedAsPorn" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "forceIsSensitiveWhenPredicted" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "predictedIsSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ADD "forceIsSensitive" boolean NOT NULL DEFAULT false`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_fc2d74a6d7d8b11292a851d8f8" ON "drive_file" ("predictedIsSensitive") `, + ); + } } diff --git a/packages/backend/migration/1656328812281-ip-2.js b/packages/backend/migration/1656328812281-ip-2.js index b0ee1ebfc7..ab4096e9c6 100644 --- a/packages/backend/migration/1656328812281-ip-2.js +++ b/packages/backend/migration/1656328812281-ip-2.js @@ -1,13 +1,19 @@ export class ip21656328812281 { - name = 'ip21656328812281' + name = "ip21656328812281"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`); - await queryRunner.query(`ALTER TABLE "meta" ADD "enableIpLogging" boolean NOT NULL DEFAULT false`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_ip" DROP CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableIpLogging" boolean NOT NULL DEFAULT false`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableIpLogging"`); - await queryRunner.query(`ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`); - } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableIpLogging"`); + await queryRunner.query( + `ALTER TABLE "user_ip" ADD CONSTRAINT "FK_7f7f1c66f48e9a8e18a33bc5150" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE NO ACTION ON UPDATE NO ACTION`, + ); + } } diff --git a/packages/backend/migration/1656408772602-nsfw-detection-6.js b/packages/backend/migration/1656408772602-nsfw-detection-6.js index 7ef223a4c6..4ef237308f 100644 --- a/packages/backend/migration/1656408772602-nsfw-detection-6.js +++ b/packages/backend/migration/1656408772602-nsfw-detection-6.js @@ -1,11 +1,15 @@ export class nsfwDetection61656408772602 { - name = 'nsfwDetection61656408772602' + name = "nsfwDetection61656408772602"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "enableSensitiveMediaDetectionForVideos" boolean NOT NULL DEFAULT false`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableSensitiveMediaDetectionForVideos" boolean NOT NULL DEFAULT false`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableSensitiveMediaDetectionForVideos"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "enableSensitiveMediaDetectionForVideos"`, + ); + } } diff --git a/packages/backend/migration/1656772790599-user-moderation-note.js b/packages/backend/migration/1656772790599-user-moderation-note.js index 133bcffe1a..11d3124aeb 100644 --- a/packages/backend/migration/1656772790599-user-moderation-note.js +++ b/packages/backend/migration/1656772790599-user-moderation-note.js @@ -1,11 +1,15 @@ export class userModerationNote1656772790599 { - name = 'userModerationNote1656772790599' + name = "userModerationNote1656772790599"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" ADD "moderationNote" character varying(8192) NOT NULL DEFAULT ''`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" ADD "moderationNote" character varying(8192) NOT NULL DEFAULT ''`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "moderationNote"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "user_profile" DROP COLUMN "moderationNote"`, + ); + } } diff --git a/packages/backend/migration/1657346559800-active-email-validation.js b/packages/backend/migration/1657346559800-active-email-validation.js index f8e03eeb07..4e3fd3f820 100644 --- a/packages/backend/migration/1657346559800-active-email-validation.js +++ b/packages/backend/migration/1657346559800-active-email-validation.js @@ -1,11 +1,15 @@ export class activeEmailValidation1657346559800 { - name = 'activeEmailValidation1657346559800' + name = "activeEmailValidation1657346559800"; - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "enableActiveEmailValidation" boolean NOT NULL DEFAULT true`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableActiveEmailValidation" boolean NOT NULL DEFAULT true`, + ); + } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableActiveEmailValidation"`); - } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "enableActiveEmailValidation"`, + ); + } } diff --git a/packages/backend/migration/1658203170545calckey.js b/packages/backend/migration/1658203170545calckey.js index eb5913e811..95c3f05d3d 100644 --- a/packages/backend/migration/1658203170545calckey.js +++ b/packages/backend/migration/1658203170545calckey.js @@ -1,15 +1,27 @@ export class calckey1658203170545 { - name = 'calckey1658203170545' + name = "calckey1658203170545"; - async up(queryRunner) { - await queryRunner.query(`UPDATE meta SET "useStarForReactionFallback" = TRUE;`); - await queryRunner.query(`UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); - } + async up(queryRunner) { + await queryRunner.query( + `UPDATE meta SET "useStarForReactionFallback" = TRUE;`, + ); + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`UPDATE meta SET "useStarForReactionFallback" = FALSE;`); - await queryRunner.query(`UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); - } + async down(queryRunner) { + await queryRunner.query( + `UPDATE meta SET "useStarForReactionFallback" = FALSE;`, + ); + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); + } } diff --git a/packages/backend/migration/1658656633972-note-replies-function.js b/packages/backend/migration/1658656633972-note-replies-function.js index de2e28c6f2..810e238439 100644 --- a/packages/backend/migration/1658656633972-note-replies-function.js +++ b/packages/backend/migration/1658656633972-note-replies-function.js @@ -1,5 +1,5 @@ export class noteRepliesFunction1658656633972 { - name = 'noteRepliesFunction1658656633972' + name = "noteRepliesFunction1658656633972"; async up(queryRunner) { await queryRunner.query(` diff --git a/packages/backend/migration/1658939464003CustomMOTD.js b/packages/backend/migration/1658939464003CustomMOTD.js index eac03451dc..ee1b182e5d 100644 --- a/packages/backend/migration/1658939464003CustomMOTD.js +++ b/packages/backend/migration/1658939464003CustomMOTD.js @@ -1,8 +1,10 @@ export class CustomMOTD1658939464003 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "customMOTD" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "customMOTD"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "customMOTD" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`, + ); + } + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "customMOTD"`); + } } diff --git a/packages/backend/migration/1658941974648CustomSplashIcons.js b/packages/backend/migration/1658941974648CustomSplashIcons.js index fce5eb7671..5c6a874d0f 100644 --- a/packages/backend/migration/1658941974648CustomSplashIcons.js +++ b/packages/backend/migration/1658941974648CustomSplashIcons.js @@ -1,8 +1,12 @@ export class CustomSplashIcons1658941974648 { - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "customSplashIcons" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "customSplashIcons"`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "customSplashIcons" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`, + ); + } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "customSplashIcons"`, + ); + } } diff --git a/packages/backend/migration/1658981842728FixCalckey.js b/packages/backend/migration/1658981842728FixCalckey.js index 7d8750634b..1a0305538d 100644 --- a/packages/backend/migration/1658981842728FixCalckey.js +++ b/packages/backend/migration/1658981842728FixCalckey.js @@ -1,15 +1,27 @@ export class FixCalckey1658981842728 { - name = 'FixCalckey1658981842728' + name = "FixCalckey1658981842728"; - async up(queryRunner) { - await queryRunner.query(`UPDATE "meta" SET "useStarForReactionFallback" = TRUE;`); - await queryRunner.query(`UPDATE "meta" SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE "meta" SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); + async up(queryRunner) { + await queryRunner.query( + `UPDATE "meta" SET "useStarForReactionFallback" = TRUE;`, + ); + await queryRunner.query( + `UPDATE "meta" SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE "meta" SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); } async down(queryRunner) { - await queryRunner.query(`UPDATE "meta" SET "useStarForReactionFallback" = FALSE;`); - await queryRunner.query(`UPDATE "meta" SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE "meta" SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); + await queryRunner.query( + `UPDATE "meta" SET "useStarForReactionFallback" = FALSE;`, + ); + await queryRunner.query( + `UPDATE "meta" SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE "meta" SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); } } diff --git a/packages/backend/migration/1659042130648RecommendedTimeline.js b/packages/backend/migration/1659042130648RecommendedTimeline.js index 39c9b41636..01d28b2f38 100644 --- a/packages/backend/migration/1659042130648RecommendedTimeline.js +++ b/packages/backend/migration/1659042130648RecommendedTimeline.js @@ -1,11 +1,19 @@ export class RecommendedTimeline1659042130648 { - name = 'RecommendedTimeline1659042130648' - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "disableRecommendedTimeline" boolean NOT NULL DEFAULT true`); - await queryRunner.query(`ALTER TABLE "meta" ADD "recommendedInstances" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "disableRecommendedTimeline"`); - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "recommendedInstances"`); - } + name = "RecommendedTimeline1659042130648"; + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "disableRecommendedTimeline" boolean NOT NULL DEFAULT true`, + ); + await queryRunner.query( + `ALTER TABLE "meta" ADD "recommendedInstances" character varying(256) array NOT NULL DEFAULT '{}'::varchar[]`, + ); } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "disableRecommendedTimeline"`, + ); + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "recommendedInstances"`, + ); + } +} diff --git a/packages/backend/migration/1660068273737GuestTimeline.js b/packages/backend/migration/1660068273737GuestTimeline.js index 23d3bc51b0..9a42f602da 100644 --- a/packages/backend/migration/1660068273737GuestTimeline.js +++ b/packages/backend/migration/1660068273737GuestTimeline.js @@ -1,9 +1,13 @@ export class GuestTimeline1660068273737 { - name = 'GuestTimeline1660068273737' - async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "enableGuestTimeline" boolean NOT NULL DEFAULT false`); - } - async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "enableGuestTimeline"`); - } + name = "GuestTimeline1660068273737"; + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" ADD "enableGuestTimeline" boolean NOT NULL DEFAULT false`, + ); } + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "meta" DROP COLUMN "enableGuestTimeline"`, + ); + } +} diff --git a/packages/backend/migration/1665091090561-add-renote-muting.js b/packages/backend/migration/1665091090561-add-renote-muting.js new file mode 100644 index 0000000000..2c76aaff5f --- /dev/null +++ b/packages/backend/migration/1665091090561-add-renote-muting.js @@ -0,0 +1,22 @@ +export class addRenoteMuting1665091090561 { + constructor() { + this.name = "addRenoteMuting1665091090561"; + } + + async up(queryRunner) { + await queryRunner.query( + `CREATE TABLE "renote_muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "muteeId" character varying(32) NOT NULL, "muterId" character varying(32) NOT NULL, CONSTRAINT "PK_renoteMuting_id" PRIMARY KEY ("id"))`, + ); + await queryRunner.query( + `CREATE INDEX "IDX_renote_muting_createdAt" ON "muting" ("createdAt") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_renote_muting_muteeId" ON "muting" ("muteeId") `, + ); + await queryRunner.query( + `CREATE INDEX "IDX_renote_muting_muterId" ON "muting" ("muterId") `, + ); + } + + async down(queryRunner) {} +} diff --git a/packages/backend/migration/1668828368510PageDraft.js b/packages/backend/migration/1668828368510PageDraft.js index 4a68189120..a5cc88b26e 100644 --- a/packages/backend/migration/1668828368510PageDraft.js +++ b/packages/backend/migration/1668828368510PageDraft.js @@ -1,8 +1,10 @@ export class Page1668828368510 { async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" ADD "isPublic" boolean NOT NULL DEFAULT true`); + await queryRunner.query( + `ALTER TABLE "page" ADD "isPublic" boolean NOT NULL DEFAULT true`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "isPublic"`); + await queryRunner.query(`ALTER TABLE "page" DROP COLUMN "isPublic"`); } } diff --git a/packages/backend/migration/1668831378728FixCalckeyAgain.js b/packages/backend/migration/1668831378728FixCalckeyAgain.js index d5e67a48c3..c65dd54cd7 100644 --- a/packages/backend/migration/1668831378728FixCalckeyAgain.js +++ b/packages/backend/migration/1668831378728FixCalckeyAgain.js @@ -1,11 +1,15 @@ export class FixCalckeyAgain1668831378728 { - name = 'FixCalckeyAgain1668831378728' + name = "FixCalckeyAgain1668831378728"; async up(queryRunner) { - await queryRunner.query(`UPDATE "meta" SET "useStarForReactionFallback" = TRUE`); + await queryRunner.query( + `UPDATE "meta" SET "useStarForReactionFallback" = TRUE`, + ); } async down(queryRunner) { - await queryRunner.query(`UPDATE "meta" SET "useStarForReactionFallback" = FALSE`); + await queryRunner.query( + `UPDATE "meta" SET "useStarForReactionFallback" = FALSE`, + ); } } diff --git a/packages/backend/migration/1669138716634-whetherPushNotifyToSendReadMessage.js b/packages/backend/migration/1669138716634-whetherPushNotifyToSendReadMessage.js new file mode 100644 index 0000000000..101972a68c --- /dev/null +++ b/packages/backend/migration/1669138716634-whetherPushNotifyToSendReadMessage.js @@ -0,0 +1,15 @@ +export class whetherPushNotifyToSendReadMessage1669138716634 { + name = "whetherPushNotifyToSendReadMessage1669138716634"; + + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "sw_subscription" ADD "sendReadMessage" boolean NOT NULL DEFAULT false`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "sw_subscription" DROP COLUMN "sendReadMessage"`, + ); + } +} diff --git a/packages/backend/migration/1669288094000-AddMovedToAndKnownAs.js b/packages/backend/migration/1669288094000-AddMovedToAndKnownAs.js index 8b3c770acb..c34764e0b0 100644 --- a/packages/backend/migration/1669288094000-AddMovedToAndKnownAs.js +++ b/packages/backend/migration/1669288094000-AddMovedToAndKnownAs.js @@ -1,16 +1,21 @@ export class addMovedToAndKnownAs1669288094000 { - name = 'addMovedToAndKnownAs1669288094000' + name = "addMovedToAndKnownAs1669288094000"; async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" ADD "movedToUri" character varying(512)`); - await queryRunner.query(`ALTER TABLE "user" ADD "alsoKnownAs" TEXT`); - await queryRunner.query(`COMMENT ON COLUMN "user"."movedToUri" IS 'The URI of the new account of the User'`); - await queryRunner.query(`COMMENT ON COLUMN "user"."alsoKnownAs" IS 'URIs the user is known as too'`); + await queryRunner.query( + `ALTER TABLE "user" ADD "movedToUri" character varying(512)`, + ); + await queryRunner.query(`ALTER TABLE "user" ADD "alsoKnownAs" TEXT`); + await queryRunner.query( + `COMMENT ON COLUMN "user"."movedToUri" IS 'The URI of the new account of the User'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "user"."alsoKnownAs" IS 'URIs the user is known as too'`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "movedToUri"`); - await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "alsoKnownAs"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "movedToUri"`); + await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "alsoKnownAs"`); } - } diff --git a/packages/backend/migration/1671199573000-AddFkAbuseUserReportTargetUserIdToUserId.js b/packages/backend/migration/1671199573000-AddFkAbuseUserReportTargetUserIdToUserId.js index 68f560b478..96ed8e1d6b 100644 --- a/packages/backend/migration/1671199573000-AddFkAbuseUserReportTargetUserIdToUserId.js +++ b/packages/backend/migration/1671199573000-AddFkAbuseUserReportTargetUserIdToUserId.js @@ -1,12 +1,18 @@ export class addFkAbuseUserReportTargetUserIdToUserId1671199573000 { - name = 'addFkAbuseUserReportTargetUserIdToUserId1671199573000' + name = "addFkAbuseUserReportTargetUserIdToUserId1671199573000"; async up(queryRunner) { - await queryRunner.query(`DELETE FROM abuse_user_report WHERE NOT EXISTS (SELECT 1 FROM "user" WHERE "user"."id" = "abuse_user_report"."targetUserId")`); - await queryRunner.query(`ALTER TABLE abuse_user_report ADD CONSTRAINT fk_7f4e851a35d81b64dda28eee0 FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE`); + await queryRunner.query( + `DELETE FROM abuse_user_report WHERE NOT EXISTS (SELECT 1 FROM "user" WHERE "user"."id" = "abuse_user_report"."targetUserId")`, + ); + await queryRunner.query( + `ALTER TABLE abuse_user_report ADD CONSTRAINT fk_7f4e851a35d81b64dda28eee0 FOREIGN KEY ("targetUserId") REFERENCES "user"("id") ON DELETE CASCADE`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE abuse_user_report DROP CONSTRAINT fk_7f4e851a35d81b64dda28eee0`); + await queryRunner.query( + `ALTER TABLE abuse_user_report DROP CONSTRAINT fk_7f4e851a35d81b64dda28eee0`, + ); } } diff --git a/packages/backend/migration/1671388343000-CalckeyRepoMove.js b/packages/backend/migration/1671388343000-CalckeyRepoMove.js index df933bcb97..60550f0446 100644 --- a/packages/backend/migration/1671388343000-CalckeyRepoMove.js +++ b/packages/backend/migration/1671388343000-CalckeyRepoMove.js @@ -1,15 +1,23 @@ /* "CalckeyRepoMove1671388343000" is a class that updates the "useStarForReactionFallback" column in the "meta" table to TRUE */ export class CalckeyRepoMove1671388343000 { - name = 'CalckeyRepoMove1671388343000' + name = "CalckeyRepoMove1671388343000"; async up(queryRunner) { - await queryRunner.query(`UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); } async down(queryRunner) { - await queryRunner.query(`UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`); - await queryRunner.query(`UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`); + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg/calckey/calckey/issues'`, + ); } } diff --git a/packages/backend/migration/1672882664294-DefaultReaction.js b/packages/backend/migration/1672882664294-DefaultReaction.js index 498a1810d6..6ce1146ecb 100644 --- a/packages/backend/migration/1672882664294-DefaultReaction.js +++ b/packages/backend/migration/1672882664294-DefaultReaction.js @@ -1,9 +1,13 @@ export class DefaultReaction1672882664294 { - name = 'DefaultReaction1672882664294' + name = "DefaultReaction1672882664294"; async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "meta" ADD "defaultReaction" character varying(256) NOT NULL DEFAULT '⭐'`); - await queryRunner.query(`COMMENT ON COLUMN "meta"."defaultReaction" IS 'The fallback reaction for emoji reacts'`); + await queryRunner.query( + `ALTER TABLE "meta" ADD "defaultReaction" character varying(256) NOT NULL DEFAULT '⭐'`, + ); + await queryRunner.query( + `COMMENT ON COLUMN "meta"."defaultReaction" IS 'The fallback reaction for emoji reacts'`, + ); } async down(queryRunner) { diff --git a/packages/backend/migration/1673336077243-PollChoiceLength.js b/packages/backend/migration/1673336077243-PollChoiceLength.js index 13db7dd963..a0e3350162 100644 --- a/packages/backend/migration/1673336077243-PollChoiceLength.js +++ b/packages/backend/migration/1673336077243-PollChoiceLength.js @@ -1,11 +1,15 @@ export class PollChoiceLength1673336077243 { - name = 'PollChoiceLength1673336077243' + name = "PollChoiceLength1673336077243"; async up(queryRunner) { - await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(256) array`); + await queryRunner.query( + `ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(256) array`, + ); } async down(queryRunner) { - await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(128) array`); + await queryRunner.query( + `ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(128) array`, + ); } } diff --git a/packages/backend/migration/1676093997212-AntennaInstances.js b/packages/backend/migration/1676093997212-AntennaInstances.js index 7553e12557..ffd428f7dc 100644 --- a/packages/backend/migration/1676093997212-AntennaInstances.js +++ b/packages/backend/migration/1676093997212-AntennaInstances.js @@ -1,17 +1,27 @@ export class AntennaInstances1676093997212 { - name = 'AntennaInstances1676093997212' + name = "AntennaInstances1676093997212"; - async up(queryRunner) { - await queryRunner.query(`ALTER TYPE "antenna_src_enum" ADD VALUE 'instances'`); - await queryRunner.query(`ALTER TABLE "antenna" ADD "instances" jsonb NOT NULL DEFAULT '[]'`); - } + async up(queryRunner) { + await queryRunner.query( + `ALTER TYPE "antenna_src_enum" ADD VALUE 'instances'`, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ADD "instances" jsonb NOT NULL DEFAULT '[]'`, + ); + } - async down(queryRunner) { - await queryRunner.query(`DELETE FROM "antenna" WHERE "src" = 'instances'`); - await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "instances"`); - await queryRunner.query(`CREATE TYPE "public"."antenna_src_enum_old" AS ENUM('home', 'all', 'users', 'list', 'group')`); - await queryRunner.query(`ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "public"."antenna_src_enum_old" USING "src"::"text"::"public"."antenna_src_enum_old"`); - await queryRunner.query(`DROP TYPE "public"."antenna_src_enum"`); - await queryRunner.query(`ALTER TYPE "public"."antenna_src_enum_old" RENAME TO "antenna_src_enum"`); - } + async down(queryRunner) { + await queryRunner.query(`DELETE FROM "antenna" WHERE "src" = 'instances'`); + await queryRunner.query(`ALTER TABLE "antenna" DROP COLUMN "instances"`); + await queryRunner.query( + `CREATE TYPE "public"."antenna_src_enum_old" AS ENUM('home', 'all', 'users', 'list', 'group')`, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER COLUMN "src" TYPE "public"."antenna_src_enum_old" USING "src"::"text"::"public"."antenna_src_enum_old"`, + ); + await queryRunner.query(`DROP TYPE "public"."antenna_src_enum"`); + await queryRunner.query( + `ALTER TYPE "public"."antenna_src_enum_old" RENAME TO "antenna_src_enum"`, + ); + } } diff --git a/packages/backend/migration/1677935903517-DriveComment.js b/packages/backend/migration/1677935903517-DriveComment.js new file mode 100644 index 0000000000..571958f294 --- /dev/null +++ b/packages/backend/migration/1677935903517-DriveComment.js @@ -0,0 +1,15 @@ +export class DriveComment1677935903517 { + name = "DriveComment1677935903517"; + + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ALTER "comment" TYPE character varying(8192)`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `ALTER TABLE "drive_file" ALTER "comment" TYPE character varying(512)`, + ); + } +} diff --git a/packages/backend/migration/1678945242650-add-props-for-custom-emoji.js b/packages/backend/migration/1678945242650-add-props-for-custom-emoji.js new file mode 100644 index 0000000000..f3de7ce278 --- /dev/null +++ b/packages/backend/migration/1678945242650-add-props-for-custom-emoji.js @@ -0,0 +1,13 @@ +export class addPropsForCustomEmoji1678945242650 { + name = "addPropsForCustomEmoji1678945242650"; + + async up(queryRunner) { + await queryRunner.query( + `ALTER TABLE "emoji" ADD "license" character varying(1024)`, + ); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "emoji" DROP COLUMN "license"`); + } +} diff --git a/packages/backend/migration/1679269929000-fix-repo.js b/packages/backend/migration/1679269929000-fix-repo.js new file mode 100644 index 0000000000..3571da4f51 --- /dev/null +++ b/packages/backend/migration/1679269929000-fix-repo.js @@ -0,0 +1,21 @@ +export class FixRepo1679269929000 { + name = "FixRepo1679269929000"; + + async up(queryRunner) { + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg.org/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg.org/calckey/calckey/issues'`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `UPDATE meta SET "repositoryUrl" = 'https://codeberg.org/calckey/calckey'`, + ); + await queryRunner.query( + `UPDATE meta SET "feedbackUrl" = 'https://codeberg.org/calckey/calckey/issues'`, + ); + } +} diff --git a/packages/backend/migration/1680375641101-clean-charts.js b/packages/backend/migration/1680375641101-clean-charts.js new file mode 100644 index 0000000000..bfb8aa9d92 --- /dev/null +++ b/packages/backend/migration/1680375641101-clean-charts.js @@ -0,0 +1,25 @@ +export class CleanCharts1680375641101 { + constructor() { + this.name = "CleanCharts1680375641101"; + } + async up(queryRunner) { + await queryRunner.query( + `delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`, + ); + await queryRunner.query( + `delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`, + ); + await queryRunner.query(`COMMIT;`); + await queryRunner.query(`vacuum __chart__hashtag;`); + await queryRunner.query(`vacuum __chart_day__hashtag;`); + await queryRunner.query(`COMMIT;`); + } + async down(queryRunner) { + await queryRunner.query( + `delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`, + ); + await queryRunner.query( + `delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`, + ); + } +} diff --git a/packages/backend/migration/1680426269172-SpeakAsCat.js b/packages/backend/migration/1680426269172-SpeakAsCat.js new file mode 100644 index 0000000000..375098542c --- /dev/null +++ b/packages/backend/migration/1680426269172-SpeakAsCat.js @@ -0,0 +1,20 @@ +export class SpeakAsCat1680426269172 { + name = "SpeakAsCat1680426269172"; + + async up(queryRunner) { + await queryRunner.query(` + ALTER TABLE "user" + ADD "speakAsCat" boolean NOT NULL DEFAULT true + `); + await queryRunner.query(` + COMMENT ON COLUMN "user"."speakAsCat" + IS 'Whether to speak as a cat if isCat.' + `); + } + + async down(queryRunner) { + await queryRunner.query(` + ALTER TABLE "user" DROP COLUMN "speakAsCat" + `); + } +} diff --git a/packages/backend/native-utils/.cargo/config.toml b/packages/backend/native-utils/.cargo/config.toml new file mode 100644 index 0000000000..7ede30ee04 --- /dev/null +++ b/packages/backend/native-utils/.cargo/config.toml @@ -0,0 +1,3 @@ +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-musl-gcc" +rustflags = ["-C", "target-feature=-crt-static"] \ No newline at end of file diff --git a/packages/backend/native-utils/.gitignore b/packages/backend/native-utils/.gitignore new file mode 100644 index 0000000000..78b75d55ad --- /dev/null +++ b/packages/backend/native-utils/.gitignore @@ -0,0 +1,200 @@ +# Created by https://www.toptal.com/developers/gitignore/api/node +# Edit at https://www.toptal.com/developers/gitignore?templates=node + +### Node ### +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# TypeScript v1 declaration files +typings/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache + +# Next.js build output +.next + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# End of https://www.toptal.com/developers/gitignore/api/node + +# Created by https://www.toptal.com/developers/gitignore/api/macos +# Edit at https://www.toptal.com/developers/gitignore?templates=macos + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/macos + +# Created by https://www.toptal.com/developers/gitignore/api/windows +# Edit at https://www.toptal.com/developers/gitignore?templates=windows + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows + +# napi-rs generated files +built/ + +#Added by cargo + +/target +Cargo.lock + +.pnp.* +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions + +*.node diff --git a/packages/backend/native-utils/.npmignore b/packages/backend/native-utils/.npmignore new file mode 100644 index 0000000000..ec144db2a7 --- /dev/null +++ b/packages/backend/native-utils/.npmignore @@ -0,0 +1,13 @@ +target +Cargo.lock +.cargo +.github +npm +.eslintrc +.prettierignore +rustfmt.toml +yarn.lock +*.node +.yarn +__test__ +renovate.json diff --git a/packages/backend/native-utils/Cargo.toml b/packages/backend/native-utils/Cargo.toml new file mode 100644 index 0000000000..4f7fb4c39a --- /dev/null +++ b/packages/backend/native-utils/Cargo.toml @@ -0,0 +1,18 @@ +[package] +edition = "2021" +name = "native-utils" +version = "0.0.0" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +# Default enable napi4 feature, see https://nodejs.org/api/n-api.html#node-api-version-matrix +napi = { version = "2.12.0", default-features = false, features = ["napi4"] } +napi-derive = "2.12.0" + +[build-dependencies] +napi-build = "2.0.1" + +[profile.release] +lto = true diff --git a/packages/backend/native-utils/__test__/index.spec.mjs b/packages/backend/native-utils/__test__/index.spec.mjs new file mode 100644 index 0000000000..0d41e012dd --- /dev/null +++ b/packages/backend/native-utils/__test__/index.spec.mjs @@ -0,0 +1,7 @@ +import test from "ava"; + +import { sum } from "../index.js"; + +test("sum from native", (t) => { + t.is(sum(1, 2), 3); +}); diff --git a/packages/backend/native-utils/build.rs b/packages/backend/native-utils/build.rs new file mode 100644 index 0000000000..1f866b6a3c --- /dev/null +++ b/packages/backend/native-utils/build.rs @@ -0,0 +1,5 @@ +extern crate napi_build; + +fn main() { + napi_build::setup(); +} diff --git a/packages/backend/native-utils/npm/android-arm-eabi/README.md b/packages/backend/native-utils/npm/android-arm-eabi/README.md new file mode 100644 index 0000000000..10199cb8ec --- /dev/null +++ b/packages/backend/native-utils/npm/android-arm-eabi/README.md @@ -0,0 +1,3 @@ +# `native-utils-android-arm-eabi` + +This is the **armv7-linux-androideabi** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/android-arm-eabi/package.json b/packages/backend/native-utils/npm/android-arm-eabi/package.json new file mode 100644 index 0000000000..b4404c410a --- /dev/null +++ b/packages/backend/native-utils/npm/android-arm-eabi/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-android-arm-eabi", + "version": "0.0.0", + "os": [ + "android" + ], + "cpu": [ + "arm" + ], + "main": "native-utils.android-arm-eabi.node", + "files": [ + "native-utils.android-arm-eabi.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/android-arm64/README.md b/packages/backend/native-utils/npm/android-arm64/README.md new file mode 100644 index 0000000000..c32c2fe710 --- /dev/null +++ b/packages/backend/native-utils/npm/android-arm64/README.md @@ -0,0 +1,3 @@ +# `native-utils-android-arm64` + +This is the **aarch64-linux-android** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/android-arm64/package.json b/packages/backend/native-utils/npm/android-arm64/package.json new file mode 100644 index 0000000000..9050ef37bd --- /dev/null +++ b/packages/backend/native-utils/npm/android-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-android-arm64", + "version": "0.0.0", + "os": [ + "android" + ], + "cpu": [ + "arm64" + ], + "main": "native-utils.android-arm64.node", + "files": [ + "native-utils.android-arm64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/darwin-arm64/README.md b/packages/backend/native-utils/npm/darwin-arm64/README.md new file mode 100644 index 0000000000..8703902223 --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `native-utils-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-arm64/package.json b/packages/backend/native-utils/npm/darwin-arm64/package.json new file mode 100644 index 0000000000..a7fcef289f --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-arm64/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-darwin-arm64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "arm64" + ], + "main": "native-utils.darwin-arm64.node", + "files": [ + "native-utils.darwin-arm64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/darwin-universal/README.md b/packages/backend/native-utils/npm/darwin-universal/README.md new file mode 100644 index 0000000000..098bb35906 --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-universal/README.md @@ -0,0 +1,3 @@ +# `native-utils-darwin-universal` + +This is the **universal-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-universal/package.json b/packages/backend/native-utils/npm/darwin-universal/package.json new file mode 100644 index 0000000000..a46061d421 --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-universal/package.json @@ -0,0 +1,15 @@ +{ + "name": "native-utils-darwin-universal", + "version": "0.0.0", + "os": [ + "darwin" + ], + "main": "native-utils.darwin-universal.node", + "files": [ + "native-utils.darwin-universal.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/darwin-x64/README.md b/packages/backend/native-utils/npm/darwin-x64/README.md new file mode 100644 index 0000000000..0acf363352 --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `native-utils-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-x64/package.json b/packages/backend/native-utils/npm/darwin-x64/package.json new file mode 100644 index 0000000000..6bbcf1d232 --- /dev/null +++ b/packages/backend/native-utils/npm/darwin-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-darwin-x64", + "version": "0.0.0", + "os": [ + "darwin" + ], + "cpu": [ + "x64" + ], + "main": "native-utils.darwin-x64.node", + "files": [ + "native-utils.darwin-x64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/freebsd-x64/README.md b/packages/backend/native-utils/npm/freebsd-x64/README.md new file mode 100644 index 0000000000..2b74996de7 --- /dev/null +++ b/packages/backend/native-utils/npm/freebsd-x64/README.md @@ -0,0 +1,3 @@ +# `native-utils-freebsd-x64` + +This is the **x86_64-unknown-freebsd** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/freebsd-x64/package.json b/packages/backend/native-utils/npm/freebsd-x64/package.json new file mode 100644 index 0000000000..654b8abf38 --- /dev/null +++ b/packages/backend/native-utils/npm/freebsd-x64/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-freebsd-x64", + "version": "0.0.0", + "os": [ + "freebsd" + ], + "cpu": [ + "x64" + ], + "main": "native-utils.freebsd-x64.node", + "files": [ + "native-utils.freebsd-x64.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md b/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md new file mode 100644 index 0000000000..2203036de0 --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md @@ -0,0 +1,3 @@ +# `native-utils-linux-arm-gnueabihf` + +This is the **armv7-unknown-linux-gnueabihf** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json b/packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json new file mode 100644 index 0000000000..1e206c078d --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-linux-arm-gnueabihf", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm" + ], + "main": "native-utils.linux-arm-gnueabihf.node", + "files": [ + "native-utils.linux-arm-gnueabihf.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/linux-arm64-gnu/README.md b/packages/backend/native-utils/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000000..ad3a9333f5 --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `native-utils-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm64-gnu/package.json b/packages/backend/native-utils/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000000..aa0b2a805f --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "native-utils-linux-arm64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "native-utils.linux-arm64-gnu.node", + "files": [ + "native-utils.linux-arm64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/linux-arm64-musl/README.md b/packages/backend/native-utils/npm/linux-arm64-musl/README.md new file mode 100644 index 0000000000..df282532ff --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `native-utils-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm64-musl/package.json b/packages/backend/native-utils/npm/linux-arm64-musl/package.json new file mode 100644 index 0000000000..99e9387ee6 --- /dev/null +++ b/packages/backend/native-utils/npm/linux-arm64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "native-utils-linux-arm64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "arm64" + ], + "main": "native-utils.linux-arm64-musl.node", + "files": [ + "native-utils.linux-arm64-musl.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "musl" + ] +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/linux-x64-gnu/README.md b/packages/backend/native-utils/npm/linux-x64-gnu/README.md new file mode 100644 index 0000000000..52eea85aab --- /dev/null +++ b/packages/backend/native-utils/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `native-utils-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-x64-gnu/package.json b/packages/backend/native-utils/npm/linux-x64-gnu/package.json new file mode 100644 index 0000000000..f99a5f664e --- /dev/null +++ b/packages/backend/native-utils/npm/linux-x64-gnu/package.json @@ -0,0 +1,21 @@ +{ + "name": "native-utils-linux-x64-gnu", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "native-utils.linux-x64-gnu.node", + "files": [ + "native-utils.linux-x64-gnu.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "glibc" + ] +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/linux-x64-musl/README.md b/packages/backend/native-utils/npm/linux-x64-musl/README.md new file mode 100644 index 0000000000..6664b23783 --- /dev/null +++ b/packages/backend/native-utils/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `native-utils-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-x64-musl/package.json b/packages/backend/native-utils/npm/linux-x64-musl/package.json new file mode 100644 index 0000000000..56b520fff4 --- /dev/null +++ b/packages/backend/native-utils/npm/linux-x64-musl/package.json @@ -0,0 +1,21 @@ +{ + "name": "native-utils-linux-x64-musl", + "version": "0.0.0", + "os": [ + "linux" + ], + "cpu": [ + "x64" + ], + "main": "native-utils.linux-x64-musl.node", + "files": [ + "native-utils.linux-x64-musl.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + }, + "libc": [ + "musl" + ] +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/win32-arm64-msvc/README.md b/packages/backend/native-utils/npm/win32-arm64-msvc/README.md new file mode 100644 index 0000000000..7aec7e0a55 --- /dev/null +++ b/packages/backend/native-utils/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `native-utils-win32-arm64-msvc` + +This is the **aarch64-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-arm64-msvc/package.json b/packages/backend/native-utils/npm/win32-arm64-msvc/package.json new file mode 100644 index 0000000000..865a771052 --- /dev/null +++ b/packages/backend/native-utils/npm/win32-arm64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-win32-arm64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "arm64" + ], + "main": "native-utils.win32-arm64-msvc.node", + "files": [ + "native-utils.win32-arm64-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/win32-ia32-msvc/README.md b/packages/backend/native-utils/npm/win32-ia32-msvc/README.md new file mode 100644 index 0000000000..690de1975d --- /dev/null +++ b/packages/backend/native-utils/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `native-utils-win32-ia32-msvc` + +This is the **i686-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-ia32-msvc/package.json b/packages/backend/native-utils/npm/win32-ia32-msvc/package.json new file mode 100644 index 0000000000..994eff12fd --- /dev/null +++ b/packages/backend/native-utils/npm/win32-ia32-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-win32-ia32-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "ia32" + ], + "main": "native-utils.win32-ia32-msvc.node", + "files": [ + "native-utils.win32-ia32-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/win32-x64-msvc/README.md b/packages/backend/native-utils/npm/win32-x64-msvc/README.md new file mode 100644 index 0000000000..e34a5ff172 --- /dev/null +++ b/packages/backend/native-utils/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `native-utils-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-x64-msvc/package.json b/packages/backend/native-utils/npm/win32-x64-msvc/package.json new file mode 100644 index 0000000000..33b259b132 --- /dev/null +++ b/packages/backend/native-utils/npm/win32-x64-msvc/package.json @@ -0,0 +1,18 @@ +{ + "name": "native-utils-win32-x64-msvc", + "version": "0.0.0", + "os": [ + "win32" + ], + "cpu": [ + "x64" + ], + "main": "native-utils.win32-x64-msvc.node", + "files": [ + "native-utils.win32-x64-msvc.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} \ No newline at end of file diff --git a/packages/backend/native-utils/package.json b/packages/backend/native-utils/package.json new file mode 100644 index 0000000000..787d1bd89f --- /dev/null +++ b/packages/backend/native-utils/package.json @@ -0,0 +1,44 @@ +{ + "name": "native-utils", + "version": "0.0.0", + "main": "built/index.js", + "types": "built/index.d.ts", + "napi": { + "name": "native-utils", + "triples": { + "additional": [ + "aarch64-apple-darwin", + "aarch64-linux-android", + "aarch64-unknown-linux-gnu", + "aarch64-unknown-linux-musl", + "aarch64-pc-windows-msvc", + "armv7-unknown-linux-gnueabihf", + "x86_64-unknown-linux-musl", + "x86_64-unknown-freebsd", + "i686-pc-windows-msvc", + "armv7-linux-androideabi", + "universal-apple-darwin" + ] + } + }, + "license": "MIT", + "devDependencies": { + "@napi-rs/cli": "^2.15.0", + "ava": "^5.1.1" + }, + "ava": { + "timeout": "3m" + }, + "engines": { + "node": ">= 10" + }, + "scripts": { + "artifacts": "napi artifacts", + "build": "napi build --platform --release ./built/", + "build:debug": "napi build --platform", + "prepublishOnly": "napi prepublish -t npm", + "test": "ava", + "universal": "napi universal", + "version": "napi version" + } +} diff --git a/packages/backend/native-utils/rustfmt.toml b/packages/backend/native-utils/rustfmt.toml new file mode 100644 index 0000000000..cab5731eda --- /dev/null +++ b/packages/backend/native-utils/rustfmt.toml @@ -0,0 +1,2 @@ +tab_spaces = 2 +edition = "2021" diff --git a/packages/backend/native-utils/src/lib.rs b/packages/backend/native-utils/src/lib.rs new file mode 100644 index 0000000000..bc5b9fc7cf --- /dev/null +++ b/packages/backend/native-utils/src/lib.rs @@ -0,0 +1,2 @@ + +pub mod mastodon_api; diff --git a/packages/backend/native-utils/src/mastodon_api.rs b/packages/backend/native-utils/src/mastodon_api.rs new file mode 100644 index 0000000000..36b4eb9849 --- /dev/null +++ b/packages/backend/native-utils/src/mastodon_api.rs @@ -0,0 +1,70 @@ +use napi::{bindgen_prelude::*, Error, Status}; +use napi_derive::napi; + +static CHAR_COLLECTION: &str = "0123456789abcdefghijklmnopqrstuvwxyz"; + +// -- NAPI exports -- + +#[napi] +pub enum IdConvertType { + MastodonId, + CalckeyId, +} + +#[napi] +pub fn convert_id(in_id: String, id_convert_type: IdConvertType) -> napi::Result { + use IdConvertType::*; + match id_convert_type { + MastodonId => { + let mut out: i64 = 0; + for (i, c) in in_id.to_lowercase().chars().rev().enumerate() { + out += num_from_char(c)? as i64 * 36_i64.pow(i as u32); + } + + Ok(out.to_string()) + } + CalckeyId => { + let mut input: i64 = match in_id.parse() { + Ok(s) => s, + Err(_) => { + return Err(Error::new( + Status::InvalidArg, + "Unable to parse ID as MasstodonId", + )) + } + }; + let mut out = String::new(); + + while input != 0 { + out.insert(0, char_from_num((input % 36) as u8)?); + input /= 36; + } + + Ok(out) + } + } +} + +// -- end -- + +#[inline(always)] +fn num_from_char(character: char) -> napi::Result { + for (i, c) in CHAR_COLLECTION.chars().enumerate() { + if c == character { + return Ok(i as u8); + } + } + + Err(Error::new( + Status::InvalidArg, + "Invalid character in parsed base36 id", + )) +} + +#[inline(always)] +fn char_from_num(number: u8) -> napi::Result { + CHAR_COLLECTION + .chars() + .nth(number as usize) + .ok_or(Error::from_status(Status::Unknown)) +} diff --git a/packages/backend/ormconfig.js b/packages/backend/ormconfig.js index a4e903abad..5f85cead8a 100644 --- a/packages/backend/ormconfig.js +++ b/packages/backend/ormconfig.js @@ -1,9 +1,9 @@ -import { DataSource } from 'typeorm'; -import config from './built/config/index.js'; -import { entities } from './built/db/postgre.js'; +import { DataSource } from "typeorm"; +import config from "./built/config/index.js"; +import { entities } from "./built/db/postgre.js"; export default new DataSource({ - type: 'postgres', + type: "postgres", host: config.db.host, port: config.db.port, username: config.db.user, @@ -11,5 +11,5 @@ export default new DataSource({ database: config.db.db, extra: config.db.extra, entities: entities, - migrations: ['migration/*.js'], + migrations: ["migration/*.js"], }); diff --git a/packages/backend/package.json b/packages/backend/package.json index 55a64191a3..7b92b8311c 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -8,7 +8,8 @@ "start:test": "NODE_ENV=test pnpm node ./built/index.js", "migrate": "typeorm migration:run -d ormconfig.js", "revertmigration": "typeorm migration:revert -d ormconfig.js", - "build": "pnpm swc src -d built -D", + "check:connect": "node ./check_connect.js", + "build": "napi build --platform --release --cargo-cwd native-utils ./native-utils/built/ && pnpm swc src -d built -D", "watch": "pnpm swc src -d built -D -w", "lint": "pnpm rome check \"src/**/*.ts\"", "mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", @@ -25,6 +26,7 @@ "@bull-board/api": "^4.6.4", "@bull-board/koa": "^4.6.4", "@bull-board/ui": "^4.6.4", + "@calckey/megalodon": "5.1.24", "@discordapp/twemoji": "14.0.2", "@elastic/elasticsearch": "7.17.0", "@koa/cors": "3.4.3", @@ -37,17 +39,17 @@ "@tensorflow/tfjs": "^4.2.0", "ajv": "8.11.2", "archiver": "5.3.1", - "koa-body": "^6.0.1", + "argon2": "^0.30.3", "autobind-decorator": "2.4.0", "autolinker": "4.0.0", - "axios": "^1.3.2", "autwh": "0.1.0", "aws-sdk": "2.1277.0", + "axios": "^1.3.2", "bcryptjs": "2.4.3", "blurhash": "1.1.5", "bull": "4.10.2", "cacheable-lookup": "7.0.0", - "calckey-js": "^0.0.22", + "calckey-js": "workspace:*", "cbor": "8.1.0", "chalk": "5.2.0", "chalk-template": "0.4.0", @@ -71,18 +73,20 @@ "jsonld": "6.0.0", "jsrsasign": "10.6.1", "koa": "2.13.4", + "koa-body": "^6.0.1", "koa-bodyparser": "4.3.0", "koa-favicon": "2.1.0", "koa-json-body": "5.3.0", "koa-logger": "3.2.1", "koa-mount": "4.0.0", + "koa-remove-trailing-slashes": "2.0.3", "koa-send": "5.0.1", "koa-slow": "2.1.0", "koa-views": "7.0.2", - "@calckey/megalodon": "5.1.2", "mfm-js": "0.23.2", "mime-types": "2.1.35", "multer": "1.4.4-lts.1", + "native-utils": "link:native-utils", "nested-property": "4.0.0", "node-fetch": "3.3.0", "nodemailer": "6.8.0", @@ -97,6 +101,7 @@ "punycode": "2.1.1", "pureimage": "0.3.15", "qrcode": "1.5.1", + "qs": "6.9.7", "random-seed": "0.3.0", "ratelimiter": "3.4.1", "re2": "1.18.0", @@ -109,6 +114,7 @@ "seedrandom": "^3.0.5", "semver": "7.3.8", "sharp": "0.31.3", + "sonic-channel": "^1.3.1", "speakeasy": "2.0.0", "stringz": "2.1.0", "summaly": "2.7.0", @@ -127,8 +133,8 @@ "xev": "3.0.2" }, "devDependencies": { - "@swc/cli": "^0.1.59", - "@swc/core": "^1.3.26", + "@swc/cli": "^0.1.62", + "@swc/core": "^1.3.50", "@types/bcryptjs": "2.4.2", "@types/bull": "3.15.9", "@types/cbor": "6.0.0", @@ -157,6 +163,7 @@ "@types/pug": "2.0.6", "@types/punycode": "2.1.0", "@types/qrcode": "1.5.0", + "@types/qs": "6.9.7", "@types/random-seed": "0.3.3", "@types/ratelimiter": "3.4.4", "@types/redis": "4.0.11", diff --git a/packages/backend/src/@types/koa-remove-trailing-slashes/index.d.ts b/packages/backend/src/@types/koa-remove-trailing-slashes/index.d.ts new file mode 100644 index 0000000000..429d1d53e0 --- /dev/null +++ b/packages/backend/src/@types/koa-remove-trailing-slashes/index.d.ts @@ -0,0 +1 @@ +declare module "koa-remove-trailing-slashes"; diff --git a/packages/backend/src/boot/index.ts b/packages/backend/src/boot/index.ts index 4e1d947656..e4f2ed7b1b 100644 --- a/packages/backend/src/boot/index.ts +++ b/packages/backend/src/boot/index.ts @@ -9,6 +9,7 @@ import { envOption } from "../env.js"; import "reflect-metadata"; import { masterMain } from "./master.js"; import { workerMain } from "./worker.js"; +import os from "node:os"; const logger = new Logger("core", "cyan"); const clusterLogger = logger.createSubLogger("cluster", "orange", false); @@ -31,6 +32,16 @@ export default async function () { await workerMain(); } + if (cluster.isPrimary) { + // Leave the master process with a marginally lower priority but not too low. + os.setPriority(2); + } + if (cluster.isWorker) { + // Set workers to a much lower priority so that the master process will be + // able to respond to api calls even if the workers gank everything. + os.setPriority(10); + } + // For when Calckey is started in a child process during unit testing. // Otherwise, process.send cannot be used, so start it. if (process.send) { diff --git a/packages/backend/src/config/types.ts b/packages/backend/src/config/types.ts index e9c42c08f6..4f367debe0 100644 --- a/packages/backend/src/config/types.ts +++ b/packages/backend/src/config/types.ts @@ -32,6 +32,13 @@ export type Source = { pass?: string; index?: string; }; + sonic: { + host: string; + port: number; + auth?: string; + collection?: string; + bucket?: string; + }; proxy?: string; proxySmtp?: string; @@ -70,10 +77,13 @@ export type Source = { sha256CertFingerprints?: string[]; }; + reservedUsernames?: string[]; + // Managed hosting stuff maxUserSignups?: number; isManagedHosting?: boolean; maxNoteLength?: number; + maxCaptionLength?: number; deepl: { managed?: boolean; authKey?: string; diff --git a/packages/backend/src/const.ts b/packages/backend/src/const.ts index 82a093100b..7e8f96444e 100644 --- a/packages/backend/src/const.ts +++ b/packages/backend/src/const.ts @@ -1,7 +1,12 @@ import config from "@/config/index.js"; +import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js"; export const MAX_NOTE_TEXT_LENGTH = config.maxNoteLength != null ? config.maxNoteLength : 3000; // <- should we increase this? +export const MAX_CAPTION_TEXT_LENGTH = Math.min( + config.maxCaptionLength ?? 1500, + DB_MAX_IMAGE_COMMENT_LENGTH, +); export const SECOND = 1000; export const SEC = 1000; // why do we need this duplicate here? diff --git a/packages/backend/src/db/postgre.ts b/packages/backend/src/db/postgre.ts index f95bd2594d..bdeb910e84 100644 --- a/packages/backend/src/db/postgre.ts +++ b/packages/backend/src/db/postgre.ts @@ -23,6 +23,7 @@ import { Meta } from "@/models/entities/meta.js"; import { Following } from "@/models/entities/following.js"; import { Instance } from "@/models/entities/instance.js"; import { Muting } from "@/models/entities/muting.js"; +import { RenoteMuting } from "@/models/entities/renote-muting.js"; import { SwSubscription } from "@/models/entities/sw-subscription.js"; import { Blocking } from "@/models/entities/blocking.js"; import { UserList } from "@/models/entities/user-list.js"; @@ -136,6 +137,7 @@ export const entities = [ Following, FollowRequest, Muting, + RenoteMuting, Blocking, Note, NoteFavorite, diff --git a/packages/backend/src/db/sonic.ts b/packages/backend/src/db/sonic.ts new file mode 100644 index 0000000000..590c479247 --- /dev/null +++ b/packages/backend/src/db/sonic.ts @@ -0,0 +1,49 @@ +import * as SonicChannel from "sonic-channel"; +import { dbLogger } from "./logger.js"; + +import config from "@/config/index.js"; + +const logger = dbLogger.createSubLogger("sonic", "gray", false); + +logger.info("Connecting to Sonic"); + +const handlers = (type: string): SonicChannel.Handlers => ({ + connected: () => { + logger.succ(`Connected to Sonic ${type}`); + }, + disconnected: (error) => { + logger.warn(`Disconnected from Sonic ${type}, error: ${error}`); + }, + error: (error) => { + logger.warn(`Sonic ${type} error: ${error}`); + }, + retrying: () => { + logger.info(`Sonic ${type} retrying`); + }, + timeout: () => { + logger.warn(`Sonic ${type} timeout`); + }, +}); + +const hasConfig = + config.sonic && (config.sonic.host || config.sonic.port || config.sonic.auth); + +const host = hasConfig ? config.sonic.host ?? "localhost" : ""; +const port = hasConfig ? config.sonic.port ?? 1491 : 0; +const auth = hasConfig ? config.sonic.auth ?? "SecretPassword" : ""; +const collection = hasConfig ? config.sonic.collection ?? "main" : ""; +const bucket = hasConfig ? config.sonic.bucket ?? "default" : ""; + +export default hasConfig + ? { + search: new SonicChannel.Search({ host, port, auth }).connect( + handlers("search"), + ), + ingest: new SonicChannel.Ingest({ host, port, auth }).connect( + handlers("ingest"), + ), + + collection, + bucket, + } + : null; diff --git a/packages/backend/src/misc/check-word-mute.ts b/packages/backend/src/misc/check-word-mute.ts index ffdf3caf84..53193d851a 100644 --- a/packages/backend/src/misc/check-word-mute.ts +++ b/packages/backend/src/misc/check-word-mute.ts @@ -5,46 +5,74 @@ import type { User } from "@/models/entities/user.js"; type NoteLike = { userId: Note["userId"]; text: Note["text"]; + cw?: Note["cw"]; }; type UserLike = { id: User["id"]; }; -export async function checkWordMute( +export type Muted = { + muted: boolean; + matched: string[]; +}; + +const NotMuted = { muted: false, matched: [] }; + +function escapeRegExp(x: string) { + return x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string +} + +export async function getWordMute( note: NoteLike, me: UserLike | null | undefined, mutedWords: Array, -): Promise { +): Promise { // 自分自身 - if (me && note.userId === me.id) return false; + if (me && note.userId === me.id) { + return NotMuted; + } if (mutedWords.length > 0) { const text = ((note.cw ?? "") + "\n" + (note.text ?? "")).trim(); - if (text === "") return false; + if (text === "") { + return NotMuted; + } - const matched = mutedWords.some((filter) => { - if (Array.isArray(filter)) { - return filter.every((keyword) => text.includes(keyword)); - } else { - // represents RegExp - const regexp = filter.match(/^\/(.+)\/(.*)$/); + for (const mutePattern of mutedWords) { + let mute: RE2; + let matched: string[]; + if (Array.isArray(mutePattern)) { + matched = mutePattern.filter((keyword) => keyword !== ""); - // This should never happen due to input sanitisation. - if (!regexp) return false; - - try { - return new RE2(regexp[1], regexp[2]).test(text); - } catch (err) { - // This should never happen due to input sanitisation. - return false; + if (matched.length === 0) { + continue; } + mute = new RE2( + `\\b${matched.map(escapeRegExp).join("\\b.*\\b")}\\b`, + "g", + ); + } else { + const regexp = mutePattern.match(/^\/(.+)\/(.*)$/); + // This should never happen due to input sanitisation. + if (!regexp) { + console.warn(`Found invalid regex in word mutes: ${mutePattern}`); + continue; + } + mute = new RE2(regexp[1], regexp[2]); + matched = [mutePattern]; } - }); - if (matched) return true; + try { + if (mute.test(text)) { + return { muted: true, matched }; + } + } catch (err) { + // This should never happen due to input sanitisation. + } + } } - return false; + return NotMuted; } diff --git a/packages/backend/src/misc/gen-identicon.ts b/packages/backend/src/misc/gen-identicon.ts index 79297f8f2c..1e51dfe2ac 100644 --- a/packages/backend/src/misc/gen-identicon.ts +++ b/packages/backend/src/misc/gen-identicon.ts @@ -11,26 +11,41 @@ const size = 128; // px const n = 5; // resolution const margin = size / 4; const colors = [ - ["#FF512F", "#DD2476"], - ["#FF61D2", "#FE9090"], - ["#72FFB6", "#10D164"], - ["#FD8451", "#FFBD6F"], - ["#305170", "#6DFC6B"], - ["#00C0FF", "#4218B8"], - ["#009245", "#FCEE21"], - ["#0100EC", "#FB36F4"], - ["#FDABDD", "#374A5A"], - ["#38A2D7", "#561139"], - ["#121C84", "#8278DA"], - ["#5761B2", "#1FC5A8"], - ["#FFDB01", "#0E197D"], - ["#FF3E9D", "#0E1F40"], - ["#766eff", "#00d4ff"], - ["#9bff6e", "#00d4ff"], - ["#ff6e94", "#00d4ff"], - ["#ffa96e", "#00d4ff"], - ["#ffa96e", "#ff009d"], - ["#ffdd6e", "#ff009d"], + ["#eb6f92", "#b4637a"], + ["#f6c177", "#ea9d34"], + ["#ebbcba", "#d7827e"], + ["#9ccfd8", "#56949f"], + ["#c4a7e7", "#907aa9"], + ["#eb6f92", "#f6c177"], + ["#eb6f92", "#ebbcba"], + ["#eb6f92", "#31748f"], + ["#eb6f92", "#9ccfd8"], + ["#eb6f92", "#c4a7e7"], + ["#f6c177", "#eb6f92"], + ["#f6c177", "#ebbcba"], + ["#f6c177", "#31748f"], + ["#f6c177", "#9ccfd8"], + ["#f6c177", "#c4a7e7"], + ["#ebbcba", "#eb6f92"], + ["#ebbcba", "#f6c177"], + ["#ebbcba", "#31748f"], + ["#ebbcba", "#9ccfd8"], + ["#ebbcba", "#c4a7e7"], + ["#31748f", "#eb6f92"], + ["#31748f", "#f6c177"], + ["#31748f", "#ebbcba"], + ["#31748f", "#9ccfd8"], + ["#31748f", "#c4a7e7"], + ["#9ccfd8", "#eb6f92"], + ["#9ccfd8", "#f6c177"], + ["#9ccfd8", "#ebbcba"], + ["#9ccfd8", "#31748f"], + ["#9ccfd8", "#c4a7e7"], + ["#c4a7e7", "#eb6f92"], + ["#c4a7e7", "#f6c177"], + ["#c4a7e7", "#ebbcba"], + ["#c4a7e7", "#31748f"], + ["#c4a7e7", "#9ccfd8"], ]; const actualSize = size - margin * 2; diff --git a/packages/backend/src/misc/hard-limits.ts b/packages/backend/src/misc/hard-limits.ts index 4ba90293cf..51d2c0f5d2 100644 --- a/packages/backend/src/misc/hard-limits.ts +++ b/packages/backend/src/misc/hard-limits.ts @@ -10,4 +10,4 @@ export const DB_MAX_NOTE_TEXT_LENGTH = 8192; * Maximum image description length that can be stored in DB. * Surrogate pairs count as one */ -export const DB_MAX_IMAGE_COMMENT_LENGTH = 512; +export const DB_MAX_IMAGE_COMMENT_LENGTH = 8192; diff --git a/packages/backend/src/misc/password.ts b/packages/backend/src/misc/password.ts new file mode 100644 index 0000000000..c63f89f5c9 --- /dev/null +++ b/packages/backend/src/misc/password.ts @@ -0,0 +1,20 @@ +import bcrypt from "bcryptjs"; +import * as argon2 from "argon2"; + +export async function hashPassword(password: string): Promise { + return argon2.hash(password); +} + +export async function comparePassword( + password: string, + hash: string, +): Promise { + if (isOldAlgorithm(hash)) return bcrypt.compare(password, hash); + + return argon2.verify(hash, password); +} + +export function isOldAlgorithm(hash: string): boolean { + // bcrypt hashes start with $2[ab]$ + return hash.startsWith("$2"); +} diff --git a/packages/backend/src/misc/post.ts b/packages/backend/src/misc/post.ts new file mode 100644 index 0000000000..90f4f75283 --- /dev/null +++ b/packages/backend/src/misc/post.ts @@ -0,0 +1,19 @@ +export type Post = { + text: string | null; + cw: string | null; + localOnly: boolean; + createdAt: Date; +}; + +export function parse(acct: any): Post { + return { + text: acct.text, + cw: acct.cw, + localOnly: acct.localOnly, + createdAt: new Date(acct.createdAt), + }; +} + +export function toJson(acct: Post): string { + return { text: acct.text, cw: acct.cw, localOnly: acct.localOnly }.toString(); +} diff --git a/packages/backend/src/misc/reaction-lib.ts b/packages/backend/src/misc/reaction-lib.ts index a61c0a1198..e25b2d6614 100644 --- a/packages/backend/src/misc/reaction-lib.ts +++ b/packages/backend/src/misc/reaction-lib.ts @@ -4,73 +4,71 @@ import { Emojis } from "@/models/index.js"; import { toPunyNullable } from "./convert-host.js"; import { IsNull } from "typeorm"; -const legacies: Record = { - like: "👍", - love: "❤️", // ここに記述する場合は異体字セレクタを入れない <- not that good because modern browsers just display it as the red heart so just convert it to it to not end up with two seperate reactions of "the same emoji" for the user - laugh: "😆", - hmm: "🤔", - surprise: "😮", - congrats: "🎉", - angry: "💢", - confused: "😥", - rip: "😇", - pudding: "🍮", - star: "⭐", -}; +const legacies = new Map([ + ["like", "👍"], + ["love", "❤️"], + ["laugh", "😆"], + ["hmm", "🤔"], + ["surprise", "😮"], + ["congrats", "🎉"], + ["angry", "💢"], + ["confused", "😥"], + ["rip", "😇"], + ["pudding", "🍮"], + ["star", "⭐"], +]); -export async function getFallbackReaction(): Promise { +export async function getFallbackReaction() { const meta = await fetchMeta(); return meta.defaultReaction; } export function convertLegacyReactions(reactions: Record) { - const _reactions = {} as Record; + const _reactions = new Map(); + const decodedReactions = new Map(); - for (const reaction of Object.keys(reactions)) { + for (const reaction in reactions) { if (reactions[reaction] <= 0) continue; - if (Object.keys(legacies).includes(reaction)) { - if (_reactions[legacies[reaction]]) { - _reactions[legacies[reaction]] += reactions[reaction]; - } else { - _reactions[legacies[reaction]] = reactions[reaction]; - } - } else if (reaction === "♥️") { - if (_reactions["❤️"]) { - _reactions["❤️"] += reactions[reaction]; - } else { - _reactions["❤️"] = reactions[reaction]; - } + let decodedReaction; + if (decodedReactions.has(reaction)) { + decodedReaction = decodedReactions.get(reaction); } else { - if (_reactions[reaction]) { - _reactions[reaction] += reactions[reaction]; - } else { - _reactions[reaction] = reactions[reaction]; - } + decodedReaction = decodeReaction(reaction); + decodedReactions.set(reaction, decodedReaction); + } + + let emoji = legacies.get(decodedReaction.reaction); + if (emoji) { + _reactions.set(emoji, (_reactions.get(emoji) || 0) + reactions[reaction]); + } else { + _reactions.set( + reaction, + (_reactions.get(reaction) || 0) + reactions[reaction], + ); } } - const _reactions2 = {} as Record; - - for (const reaction of Object.keys(_reactions)) { - _reactions2[decodeReaction(reaction).reaction] = _reactions[reaction]; + const _reactions2 = new Map(); + for (const [reaction, count] of _reactions) { + const decodedReaction = decodedReactions.get(reaction); + _reactions2.set(decodedReaction.reaction, count); } - return _reactions2; + return Object.fromEntries(_reactions2); } export async function toDbReaction( reaction?: string | null, reacterHost?: string | null, ): Promise { - if (reaction == null) return await getFallbackReaction(); + if (!reaction) return await getFallbackReaction(); reacterHost = toPunyNullable(reacterHost); // Convert string-type reactions to unicode - if (Object.keys(legacies).includes(reaction)) return legacies[reaction]; - // Convert old heart to new - if (reaction === "♥️") return "❤️"; + const emoji = legacies.get(reaction) || (reaction === "♥️" ? "❤️" : null); + if (emoji) return emoji; // Allow unicode reactions const match = emojiRegex.exec(reaction); @@ -83,7 +81,7 @@ export async function toDbReaction( if (custom) { const name = custom[1]; const emoji = await Emojis.findOneBy({ - host: reacterHost ?? IsNull(), + host: reacterHost || IsNull(), name, }); @@ -132,7 +130,7 @@ export function decodeReaction(str: string): DecodedReaction { } export function convertLegacyReaction(reaction: string): string { - reaction = decodeReaction(reaction).reaction; - if (Object.keys(legacies).includes(reaction)) return legacies[reaction]; - return reaction; + const decoded = decodeReaction(reaction).reaction; + if (legacies.has(decoded)) return legacies.get(decoded)!; + return decoded; } diff --git a/packages/backend/src/misc/schema.ts b/packages/backend/src/misc/schema.ts index 35637e6ed5..7eaeb92e04 100644 --- a/packages/backend/src/misc/schema.ts +++ b/packages/backend/src/misc/schema.ts @@ -16,6 +16,7 @@ import { packedDriveFileSchema } from "@/models/schema/drive-file.js"; import { packedDriveFolderSchema } from "@/models/schema/drive-folder.js"; import { packedFollowingSchema } from "@/models/schema/following.js"; import { packedMutingSchema } from "@/models/schema/muting.js"; +import { packedRenoteMutingSchema } from "@/models/schema/renote-muting.js"; import { packedBlockingSchema } from "@/models/schema/blocking.js"; import { packedNoteReactionSchema } from "@/models/schema/note-reaction.js"; import { packedHashtagSchema } from "@/models/schema/hashtag.js"; @@ -51,6 +52,7 @@ export const refs = { DriveFolder: packedDriveFolderSchema, Following: packedFollowingSchema, Muting: packedMutingSchema, + RenoteMuting: packedRenoteMutingSchema, Blocking: packedBlockingSchema, Hashtag: packedHashtagSchema, Page: packedPageSchema, diff --git a/packages/backend/src/models/entities/drive-file.ts b/packages/backend/src/models/entities/drive-file.ts index 1fa91b1a97..32e19bc6ee 100644 --- a/packages/backend/src/models/entities/drive-file.ts +++ b/packages/backend/src/models/entities/drive-file.ts @@ -9,6 +9,7 @@ import { import { id } from "../id.js"; import { User } from "./user.js"; import { DriveFolder } from "./drive-folder.js"; +import { DB_MAX_IMAGE_COMMENT_LENGTH } from "@/misc/hard-limits.js"; @Entity() @Index(['userId', 'folderId', 'id']) @@ -69,7 +70,8 @@ export class DriveFile { public size: number; @Column('varchar', { - length: 512, nullable: true, + length: DB_MAX_IMAGE_COMMENT_LENGTH, + nullable: true, comment: 'The comment of the DriveFile.', }) public comment: string | null; diff --git a/packages/backend/src/models/entities/emoji.ts b/packages/backend/src/models/entities/emoji.ts index f251de8973..2315686968 100644 --- a/packages/backend/src/models/entities/emoji.ts +++ b/packages/backend/src/models/entities/emoji.ts @@ -55,4 +55,9 @@ export class Emoji { array: true, length: 128, default: '{}', }) public aliases: string[]; + + @Column('varchar', { + length: 1024, nullable: true, + }) + public license: string | null; } diff --git a/packages/backend/src/models/entities/renote-muting.ts b/packages/backend/src/models/entities/renote-muting.ts new file mode 100644 index 0000000000..64ec7f583f --- /dev/null +++ b/packages/backend/src/models/entities/renote-muting.ts @@ -0,0 +1,49 @@ +import { + PrimaryColumn, + Entity, + Index, + JoinColumn, + Column, + ManyToOne, +} from "typeorm"; +import { id } from "../id.js"; +import { User } from "./user.js"; + +@Entity() +@Index(["muterId", "muteeId"], { unique: true }) +export class RenoteMuting { + @PrimaryColumn(id()) + public id: string; + + @Index() + @Column("timestamp with time zone", { + comment: "The created date of the Muting.", + }) + public createdAt: Date; + + @Index() + @Column({ + ...id(), + comment: "The mutee user ID.", + }) + public muteeId: User["id"]; + + @ManyToOne(type => User, { + onDelete: "CASCADE", + }) + @JoinColumn() + public mutee: User | null; + + @Index() + @Column({ + ...id(), + comment: "The muter user ID.", + }) + public muterId: User["id"]; + + @ManyToOne(type => User, { + onDelete: "CASCADE", + }) + @JoinColumn() + public muter: User | null; +} diff --git a/packages/backend/src/models/entities/sw-subscription.ts b/packages/backend/src/models/entities/sw-subscription.ts index 26891c1ce7..8f18688eab 100644 --- a/packages/backend/src/models/entities/sw-subscription.ts +++ b/packages/backend/src/models/entities/sw-subscription.ts @@ -41,4 +41,9 @@ export class SwSubscription { length: 128, }) public publickey: string; + + @Column('boolean', { + default: false, + }) + public sendReadMessage: boolean; } diff --git a/packages/backend/src/models/entities/user.ts b/packages/backend/src/models/entities/user.ts index c57ad916c9..c23f4f28d7 100644 --- a/packages/backend/src/models/entities/user.ts +++ b/packages/backend/src/models/entities/user.ts @@ -156,6 +156,12 @@ export class User { }) public isCat: boolean; + @Column('boolean', { + default: true, + comment: 'Whether to speak as a cat if isCat.', + }) + public speakAsCat: boolean; + @Column('boolean', { default: false, comment: 'Whether the User is the admin.', diff --git a/packages/backend/src/models/index.ts b/packages/backend/src/models/index.ts index 98f6705f42..f68166c17f 100644 --- a/packages/backend/src/models/index.ts +++ b/packages/backend/src/models/index.ts @@ -27,6 +27,7 @@ import { UserGroupJoining } from "./entities/user-group-joining.js"; import { UserGroupInvitationRepository } from "./repositories/user-group-invitation.js"; import { FollowRequestRepository } from "./repositories/follow-request.js"; import { MutingRepository } from "./repositories/muting.js"; +import { RenoteMutingRepository } from "./repositories/renote-muting.js"; import { BlockingRepository } from "./repositories/blocking.js"; import { NoteReactionRepository } from "./repositories/note-reaction.js"; import { NotificationRepository } from "./repositories/notification.js"; @@ -102,6 +103,7 @@ export const DriveFolders = DriveFolderRepository; export const Notifications = NotificationRepository; export const Metas = db.getRepository(Meta); export const Mutings = MutingRepository; +export const RenoteMutings = RenoteMutingRepository; export const Blockings = BlockingRepository; export const SwSubscriptions = db.getRepository(SwSubscription); export const Hashtags = HashtagRepository; diff --git a/packages/backend/src/models/repositories/emoji.ts b/packages/backend/src/models/repositories/emoji.ts index e868fe94fe..6eabfe9558 100644 --- a/packages/backend/src/models/repositories/emoji.ts +++ b/packages/backend/src/models/repositories/emoji.ts @@ -15,6 +15,7 @@ export const EmojiRepository = db.getRepository(Emoji).extend({ host: emoji.host, // || emoji.originalUrl してるのは後方互換性のため url: emoji.publicUrl || emoji.originalUrl, + license: emoji.license, }; }, diff --git a/packages/backend/src/models/repositories/note.ts b/packages/backend/src/models/repositories/note.ts index 882cfdd318..5e56a817bc 100644 --- a/packages/backend/src/models/repositories/note.ts +++ b/packages/backend/src/models/repositories/note.ts @@ -263,14 +263,21 @@ export const NoteRepository = db.getRepository(Note).extend({ : {}), }); - if (packed.user.isCat && packed.text) { + if (packed.user.isCat && packed.user.speakAsCat && packed.text) { const tokens = packed.text ? mfm.parse(packed.text) : []; - mfm.inspect(tokens, (node) => { - if (node.type === "text") { - // TODO: quoteなtextはskip - node.props.text = nyaize(node.props.text); + function nyaizeNode(node: mfm.MfmNode) { + if (node.type === "quote") return; + if (node.type === "text") node.props.text = nyaize(node.props.text); + + if (node.children) { + for (const child of node.children) { + nyaizeNode(child); + } } - }); + } + + for (const node of tokens) nyaizeNode(node); + packed.text = mfm.toString(tokens); } diff --git a/packages/backend/src/models/repositories/renote-muting.ts b/packages/backend/src/models/repositories/renote-muting.ts new file mode 100644 index 0000000000..18fd343a05 --- /dev/null +++ b/packages/backend/src/models/repositories/renote-muting.ts @@ -0,0 +1,29 @@ +import { db } from "@/db/postgre.js"; +import { Packed } from "@/misc/schema.js"; +import { RenoteMuting } from "@/models/entities/renote-muting.js"; +import { User } from "@/models/entities/user.js"; +import { awaitAll } from "@/prelude/await-all.js"; +import { Users } from "../index.js"; + +export const RenoteMutingRepository = db.getRepository(RenoteMuting).extend({ + async pack( + src: RenoteMuting["id"] | RenoteMuting, + me?: { id: User["id"] } | null | undefined, + ): Promise> { + const muting = + typeof src === "object" ? src : await this.findOneByOrFail({ id: src }); + + return await awaitAll({ + id: muting.id, + createdAt: muting.createdAt.toISOString(), + muteeId: muting.muteeId, + mutee: Users.pack(muting.muteeId, me, { + detail: true, + }), + }); + }, + + packMany(mutings: any[], me: { id: User["id"] }) { + return Promise.all(mutings.map((x) => this.pack(x, me))); + }, +}); diff --git a/packages/backend/src/models/repositories/user.ts b/packages/backend/src/models/repositories/user.ts index aa224b6674..f6fcdae296 100644 --- a/packages/backend/src/models/repositories/user.ts +++ b/packages/backend/src/models/repositories/user.ts @@ -28,6 +28,7 @@ import { Instances, MessagingMessages, Mutings, + RenoteMutings, Notes, NoteUnreads, Notifications, @@ -66,7 +67,7 @@ const nameSchema = { type: "string", minLength: 1, maxLength: 50 } as const; const descriptionSchema = { type: "string", minLength: 1, - maxLength: 500, + maxLength: 2048, } as const; const locationSchema = { type: "string", minLength: 1, maxLength: 50 } as const; const birthdaySchema = { @@ -171,6 +172,13 @@ export const UserRepository = db.getRepository(User).extend({ }, take: 1, }).then((n) => n > 0), + isRenoteMuted: RenoteMutings.count({ + where: { + muterId: me, + muteeId: target, + }, + take: 1, + }).then((n) => n > 0), }); }, @@ -438,6 +446,7 @@ export const UserRepository = db.getRepository(User).extend({ isModerator: user.isModerator || falsy, isBot: user.isBot || falsy, isCat: user.isCat || falsy, + speakAsCat: user.speakAsCat || falsy, instance: user.host ? userInstanceCache .fetch( @@ -584,6 +593,7 @@ export const UserRepository = db.getRepository(User).extend({ isBlocking: relation.isBlocking, isBlocked: relation.isBlocked, isMuted: relation.isMuted, + isRenoteMuted: relation.isRenoteMuted, } : {}), } as Promiseable> as Promiseable< diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts index 1e1dab8689..8994381b31 100644 --- a/packages/backend/src/models/schema/emoji.ts +++ b/packages/backend/src/models/schema/emoji.ts @@ -40,5 +40,10 @@ export const packedEmojiSchema = { optional: false, nullable: false, }, + license: { + type: "string", + optional: false, + nullable: true, + }, }, } as const; diff --git a/packages/backend/src/models/schema/renote-muting.ts b/packages/backend/src/models/schema/renote-muting.ts new file mode 100644 index 0000000000..2a5824e32b --- /dev/null +++ b/packages/backend/src/models/schema/renote-muting.ts @@ -0,0 +1,30 @@ +export const packedRenoteMutingSchema = { + type: "object", + properties: { + id: { + type: "string", + optional: false, + nullable: false, + format: "id", + example: "xxxxxxxxxx", + }, + createdAt: { + type: "string", + optional: false, + nullable: false, + format: "date-time", + }, + muteeId: { + type: "string", + optional: false, + nullable: false, + format: "id", + }, + mutee: { + type: "object", + optional: false, + nullable: false, + ref: "UserDetailed", + }, + }, +} as const; diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts index 9fb5aa8f3b..80e94fe508 100644 --- a/packages/backend/src/models/schema/user.ts +++ b/packages/backend/src/models/schema/user.ts @@ -66,6 +66,11 @@ export const packedUserLiteSchema = { nullable: false, optional: true, }, + speakAsCat: { + type: "boolean", + nullable: false, + optional: true, + }, emojis: { type: "array", nullable: false, @@ -330,6 +335,11 @@ export const packedUserDetailedNotMeOnlySchema = { nullable: false, optional: true, }, + isRenoteMuted: { + type: "boolean", + nullable: false, + optional: true, + }, //#endregion }, } as const; diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index c40b3c6aeb..035556e487 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -13,6 +13,7 @@ import processDb from "./processors/db/index.js"; import processObjectStorage from "./processors/object-storage/index.js"; import processSystemQueue from "./processors/system/index.js"; import processWebhookDeliver from "./processors/webhook-deliver.js"; +import processBackground from "./processors/background/index.js"; import { endedPollNotification } from "./processors/ended-poll-notification.js"; import { queueLogger } from "./logger.js"; import { getJobInfo } from "./get-job-info.js"; @@ -24,6 +25,7 @@ import { objectStorageQueue, endedPollNotificationQueue, webhookDeliverQueue, + backgroundQueue, } from "./queues.js"; import type { ThinUser } from "./types.js"; @@ -312,6 +314,25 @@ export function createImportFollowingJob( ); } +export function createImportPostsJob( + user: ThinUser, + fileId: DriveFile["id"], + signatureCheck: boolean, +) { + return dbQueue.add( + "importPosts", + { + user: user, + fileId: fileId, + signatureCheck: signatureCheck, + }, + { + removeOnComplete: true, + removeOnFail: true, + }, + ); +} + export function createImportMutingJob(user: ThinUser, fileId: DriveFile["id"]) { return dbQueue.add( "importMuting", @@ -418,6 +439,13 @@ export function createCleanRemoteFilesJob() { ); } +export function createIndexAllNotesJob(data = {}) { + return backgroundQueue.add("indexAllNotes", data, { + removeOnComplete: true, + removeOnFail: true, + }); +} + export function webhookDeliver( webhook: Webhook, type: typeof webhookEventTypes[number], @@ -454,6 +482,7 @@ export default function () { webhookDeliverQueue.process(64, processWebhookDeliver); processDb(dbQueue); processObjectStorage(objectStorageQueue); + processBackground(backgroundQueue); systemQueue.add( "tickCharts", diff --git a/packages/backend/src/queue/processors/background/index-all-notes.ts b/packages/backend/src/queue/processors/background/index-all-notes.ts new file mode 100644 index 0000000000..03219199d9 --- /dev/null +++ b/packages/backend/src/queue/processors/background/index-all-notes.ts @@ -0,0 +1,79 @@ +import type Bull from "bull"; + +import { queueLogger } from "../../logger.js"; +import { Notes } from "@/models/index.js"; +import { MoreThan } from "typeorm"; +import { index } from "@/services/note/create.js"; +import { Note } from "@/models/entities/note.js"; + +const logger = queueLogger.createSubLogger("index-all-notes"); + +export default async function indexAllNotes( + job: Bull.Job>, + done: () => void, +): Promise { + logger.info("Indexing all notes..."); + + let cursor: string | null = (job.data.cursor as string) ?? null; + let indexedCount: number = (job.data.indexedCount as number) ?? 0; + let total: number = (job.data.total as number) ?? 0; + + let running = true; + const take = 50000; + const batch = 100; + while (running) { + logger.info( + `Querying for ${take} notes ${indexedCount}/${ + total ? total : "?" + } at ${cursor}`, + ); + + let notes: Note[] = []; + try { + notes = await Notes.find({ + where: { + ...(cursor ? { id: MoreThan(cursor) } : {}), + }, + take: take, + order: { + id: 1, + }, + }); + } catch (e) { + logger.error(`Failed to query notes ${e}`); + continue; + } + + if (notes.length === 0) { + job.progress(100); + running = false; + break; + } + + try { + const count = await Notes.count(); + total = count; + job.update({ indexedCount, cursor, total }); + } catch (e) {} + + for (let i = 0; i < notes.length; i += batch) { + const chunk = notes.slice(i, i + batch); + await Promise.all(chunk.map((note) => index(note))); + + indexedCount += chunk.length; + const pct = (indexedCount / total) * 100; + job.update({ indexedCount, cursor, total }); + job.progress(+pct.toFixed(1)); + logger.info(`Indexed notes ${indexedCount}/${total ? total : "?"}`); + } + cursor = notes[notes.length - 1].id; + job.update({ indexedCount, cursor, total }); + + if (notes.length < take) { + running = false; + } + } + + done(); + logger.info("All notes have been indexed."); +} diff --git a/packages/backend/src/queue/processors/background/index.ts b/packages/backend/src/queue/processors/background/index.ts new file mode 100644 index 0000000000..6674f954b0 --- /dev/null +++ b/packages/backend/src/queue/processors/background/index.ts @@ -0,0 +1,12 @@ +import type Bull from "bull"; +import indexAllNotes from "./index-all-notes.js"; + +const jobs = { + indexAllNotes, +} as Record>>; + +export default function (q: Bull.Queue) { + for (const [k, v] of Object.entries(jobs)) { + q.process(k, 16, v); + } +} diff --git a/packages/backend/src/queue/processors/db/import-custom-emojis.ts b/packages/backend/src/queue/processors/db/import-custom-emojis.ts index 45ab5ea9a1..373a3a2daf 100644 --- a/packages/backend/src/queue/processors/db/import-custom-emojis.ts +++ b/packages/backend/src/queue/processors/db/import-custom-emojis.ts @@ -75,6 +75,7 @@ export async function importCustomEmojis( originalUrl: driveFile.url, publicUrl: driveFile.webpublicUrl ?? driveFile.url, type: driveFile.webpublicType ?? driveFile.type, + license: emojiInfo.license, }).then((x) => Emojis.findOneByOrFail(x.identifiers[0])); } diff --git a/packages/backend/src/queue/processors/db/import-posts.ts b/packages/backend/src/queue/processors/db/import-posts.ts new file mode 100644 index 0000000000..20ef3a518d --- /dev/null +++ b/packages/backend/src/queue/processors/db/import-posts.ts @@ -0,0 +1,131 @@ +import { IsNull } from "typeorm"; +import follow from "@/services/following/create.js"; + +import * as Post from "@/misc/post.js"; +import create from "@/services/note/create.js"; +import { downloadTextFile } from "@/misc/download-text-file.js"; +import { Users, DriveFiles } from "@/models/index.js"; +import type { DbUserImportPostsJobData } from "@/queue/types.js"; +import { queueLogger } from "../../logger.js"; +import type Bull from "bull"; +import { htmlToMfm } from "@/remote/activitypub/misc/html-to-mfm.js"; + +const logger = queueLogger.createSubLogger("import-posts"); + +export async function importPosts( + job: Bull.Job, + done: any, +): Promise { + logger.info(`Importing posts of ${job.data.user.id} ...`); + + const user = await Users.findOneBy({ id: job.data.user.id }); + if (user == null) { + done(); + return; + } + + const file = await DriveFiles.findOneBy({ + id: job.data.fileId, + }); + if (file == null) { + done(); + return; + } + + const json = await downloadTextFile(file.url); + + let linenum = 0; + + try { + const parsed = JSON.parse(json); + if (parsed instanceof Array) { + logger.info("Parsing key style posts"); + for (const post of JSON.parse(json)) { + try { + linenum++; + if (post.replyId != null) { + continue; + } + if (post.renoteId != null) { + continue; + } + if (post.visibility !== "public") { + continue; + } + const { text, cw, localOnly, createdAt } = Post.parse(post); + + logger.info(`Posting[${linenum}] ...`); + + const note = await create(user, { + createdAt: createdAt, + files: undefined, + poll: undefined, + text: text || undefined, + reply: null, + renote: null, + cw: cw, + localOnly, + visibility: "public", + visibleUsers: [], + channel: null, + apMentions: new Array(0), + apHashtags: undefined, + apEmojis: undefined, + }); + } catch (e) { + logger.warn(`Error in line:${linenum} ${e}`); + } + } + } else if (parsed instanceof Object) { + logger.info("Parsing animal style posts"); + for (const post of parsed.orderedItems) { + try { + linenum++; + if (post.object.inReplyTo != null) { + continue; + } + if (post.directMessage) { + continue; + } + if (job.data.signatureCheck) { + if (!post.signature) { + continue; + } + } + let text; + try { + text = htmlToMfm(post.object.content, post.object.tag); + } catch (e) { + continue; + } + logger.info(`Posting[${linenum}] ...`); + + const note = await create(user, { + createdAt: new Date(post.object.published), + files: undefined, + poll: undefined, + text: text || undefined, + reply: null, + renote: null, + cw: post.sensitive, + localOnly: false, + visibility: "public", + visibleUsers: [], + channel: null, + apMentions: new Array(0), + apHashtags: undefined, + apEmojis: undefined, + }); + } catch (e) { + logger.warn(`Error in line:${linenum} ${e}`); + } + } + } + } catch (e) { + // handle error + logger.warn(`Error reading: ${e}`); + } + + logger.succ("Imported"); + done(); +} diff --git a/packages/backend/src/queue/processors/db/index.ts b/packages/backend/src/queue/processors/db/index.ts index 90173053fb..22b55a3683 100644 --- a/packages/backend/src/queue/processors/db/index.ts +++ b/packages/backend/src/queue/processors/db/index.ts @@ -11,6 +11,7 @@ import { importFollowing } from "./import-following.js"; import { importUserLists } from "./import-user-lists.js"; import { deleteAccount } from "./delete-account.js"; import { importMuting } from "./import-muting.js"; +import { importPosts } from "./import-posts.js"; import { importBlocking } from "./import-blocking.js"; import { importCustomEmojis } from "./import-custom-emojis.js"; @@ -26,6 +27,7 @@ const jobs = { importMuting, importBlocking, importUserLists, + importPosts, importCustomEmojis, deleteAccount, } as Record< diff --git a/packages/backend/src/queue/processors/webhook-deliver.ts b/packages/backend/src/queue/processors/webhook-deliver.ts index a130fcd382..0a54ae7d89 100644 --- a/packages/backend/src/queue/processors/webhook-deliver.ts +++ b/packages/backend/src/queue/processors/webhook-deliver.ts @@ -20,6 +20,7 @@ export default async (job: Bull.Job) => { "X-Calckey-Host": config.host, "X-Calckey-Hook-Id": job.data.webhookId, "X-Calckey-Hook-Secret": job.data.secret, + "Content-Type": "application/json", }, body: JSON.stringify({ hookId: job.data.webhookId, diff --git a/packages/backend/src/queue/queues.ts b/packages/backend/src/queue/queues.ts index 12d9d66207..6d7fffcb30 100644 --- a/packages/backend/src/queue/queues.ts +++ b/packages/backend/src/queue/queues.ts @@ -27,6 +27,7 @@ export const webhookDeliverQueue = initializeQueue( "webhookDeliver", 64, ); +export const backgroundQueue = initializeQueue>("bg"); export const queues = [ systemQueue, @@ -36,4 +37,5 @@ export const queues = [ dbQueue, objectStorageQueue, webhookDeliverQueue, + backgroundQueue, ]; diff --git a/packages/backend/src/queue/types.ts b/packages/backend/src/queue/types.ts index 90e88f7366..e31619ff27 100644 --- a/packages/backend/src/queue/types.ts +++ b/packages/backend/src/queue/types.ts @@ -21,6 +21,7 @@ export type InboxJobData = { export type DbJobData = | DbUserJobData + | DbUserImportPostsJobData | DbUserImportJobData | DbUserDeleteJobData; @@ -40,6 +41,12 @@ export type DbUserImportJobData = { fileId: DriveFile["id"]; }; +export type DbUserImportPostsJobData = { + user: ThinUser; + fileId: DriveFile["id"]; + signatureCheck: boolean; +}; + export type ObjectStorageJobData = | ObjectStorageFileJobData | Record; diff --git a/packages/backend/src/remote/activitypub/kernel/move/index.ts b/packages/backend/src/remote/activitypub/kernel/move/index.ts index 47a55b8ab3..800fd7bfea 100644 --- a/packages/backend/src/remote/activitypub/kernel/move/index.ts +++ b/packages/backend/src/remote/activitypub/kernel/move/index.ts @@ -1,19 +1,14 @@ import type { CacheableRemoteUser } from "@/models/entities/user.js"; -import { IRemoteUser, User } from "@/models/entities/user.js"; -import DbResolver from "@/remote/activitypub/db-resolver.js"; -import { getRemoteUser } from "@/server/api/common/getters.js"; -import { updatePerson } from "@/remote/activitypub/models/person.js"; import { Followings, Users } from "@/models/index.js"; -import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; -import deleteFollowing from "@/services/following/delete.js"; +import { + resolvePerson, + updatePerson, +} from "@/remote/activitypub/models/person.js"; import create from "@/services/following/create.js"; -import { getUser } from "@/server/api/common/getters.js"; -import { IdentifiableError } from "@/misc/identifiable-error.js"; -import { ApiError } from "@/server/api/error.js"; -import { meta } from "@/server/api/endpoints/following/create.js"; -import { IObject } from "../../type.js"; -import type { IMove, IActor } from "../../type.js"; -import Resolver from "@/remote/activitypub/resolver.js"; +import deleteFollowing from "@/services/following/delete.js"; + +import type { IMove } from "../../type.js"; +import { getApHrefNullable } from "../../type.js"; export default async ( actor: CacheableRemoteUser, @@ -21,68 +16,50 @@ export default async ( ): Promise => { // ※ There is a block target in activity.object, which should be a local user that exists. - const dbResolver = new DbResolver(); - const resolver = new Resolver(); - let new_acc = await dbResolver.getUserFromApId(activity.target); - let actor_new; - if (!new_acc) - actor_new = (await resolver.resolve(activity.target)) as IActor; + // fetch the new and old accounts + const targetUri = getApHrefNullable(activity.target); + if (!targetUri) return "move: target uri is null"; + let new_acc = await resolvePerson(targetUri); + if (!actor.uri) return "move: actor uri is null"; + let old_acc = await resolvePerson(actor.uri); - if ( - (!new_acc || new_acc.uri === null) && - (!actor_new || actor_new.id === null) - ) { - return "move: new acc not found"; + // update them if they're remote + if (new_acc.uri) await updatePerson(new_acc.uri); + if (old_acc.uri) await updatePerson(old_acc.uri); + + // retrieve updated users + new_acc = await resolvePerson(targetUri); + old_acc = await resolvePerson(actor.uri); + + // check if alsoKnownAs of the new account is valid + let isValidMove = true; + if (old_acc.uri) { + if (!new_acc.alsoKnownAs?.includes(old_acc.uri)) { + isValidMove = false; + } + } else if (!new_acc.alsoKnownAs?.includes(old_acc.id)) { + isValidMove = false; + } + if (!isValidMove) { + return "skip: accounts invalid"; } - const newUri = new_acc ? new_acc.uri : actor_new?.url?.toString(); - - if (newUri === null || newUri === undefined) - return "move: new acc not found #2"; - - await updatePerson(newUri); - await updatePerson(actor.uri!); - - new_acc = await dbResolver.getUserFromApId(newUri); - const old = await dbResolver.getUserFromApId(actor.uri!); - - if ( - old === null || - old.uri === null || - !new_acc?.alsoKnownAs?.includes(old.uri) - ) - return "move: accounts invalid"; - - old.movedToUri = new_acc.uri; - - const followee = await getUser(actor.id).catch((e) => { - if (e.id === "15348ddd-432d-49c2-8a5a-8069753becff") - throw new ApiError(meta.errors.noSuchUser); - throw e; - }); - - const followeeNew = await getUser(new_acc.id).catch((e) => { - if (e.id === "15348ddd-432d-49c2-8a5a-8069753becff") - throw new ApiError(meta.errors.noSuchUser); - throw e; - }); + // add target uri to movedToUri in order to indicate that the user has moved + await Users.update(old_acc.id, { movedToUri: targetUri }); + // follow the new account and unfollow the old one const followings = await Followings.findBy({ - followeeId: followee.id, + followeeId: old_acc.id, }); - followings.forEach(async (following) => { - //if follower is local + // If follower is local if (!following.followerHost) { - const follower = await getUser(following.followerId).catch((e) => { - if (e.id === "15348ddd-432d-49c2-8a5a-8069753becff") - throw new ApiError(meta.errors.noSuchUser); - throw e; - }); - await deleteFollowing(follower!, followee); try { - await create(follower!, followeeNew); - } catch (e) { + const follower = await Users.findOneBy({ id: following.followerId }); + if (!follower) return; + await create(follower, new_acc); + await deleteFollowing(follower, old_acc); + } catch { /* empty */ } } diff --git a/packages/backend/src/remote/activitypub/misc/ld-signature.ts b/packages/backend/src/remote/activitypub/misc/ld-signature.ts index 0a4ec3a539..1657597ab6 100644 --- a/packages/backend/src/remote/activitypub/misc/ld-signature.ts +++ b/packages/backend/src/remote/activitypub/misc/ld-signature.ts @@ -70,13 +70,13 @@ export class LdSignature { ...options, "@context": "https://w3id.org/identity/v1", }; - transformedOptions["type"] = undefined; - transformedOptions["id"] = undefined; - transformedOptions["signatureValue"] = undefined; + delete transformedOptions["type"]; + delete transformedOptions["id"]; + delete transformedOptions["signatureValue"]; const canonizedOptions = await this.normalize(transformedOptions); const optionsHash = this.sha256(canonizedOptions); const transformedData = { ...data }; - transformedData["signature"] = undefined; + delete transformedData["signature"]; const cannonidedData = await this.normalize(transformedData); if (this.debug) console.debug(`cannonidedData: ${cannonidedData}`); const documentHash = this.sha256(cannonidedData); diff --git a/packages/backend/src/remote/activitypub/models/image.ts b/packages/backend/src/remote/activitypub/models/image.ts index 415f7c4006..211aa3931e 100644 --- a/packages/backend/src/remote/activitypub/models/image.ts +++ b/packages/backend/src/remote/activitypub/models/image.ts @@ -29,6 +29,10 @@ export async function createImage( throw new Error("invalid image: url not privided"); } + if (!image.url.startsWith("https://") && !image.url.startsWith("http://")) { + throw new Error("invalid image: unexpected shcema of url: " + image.url); + } + logger.info(`Creating the Image: ${image.url}`); const instance = await fetchMeta(); diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts index 10ab5c66f5..033157b081 100644 --- a/packages/backend/src/remote/activitypub/models/note.ts +++ b/packages/backend/src/remote/activitypub/models/note.ts @@ -112,17 +112,16 @@ export async function createNote( const note: IPost = object; if (note.id && !note.id.startsWith("https://")) { - throw new Error(`unexpected shcema of note.id: ${note.id}`); + throw new Error(`unexpected schema of note.id: ${note.id}`); } const url = getOneApHrefNullable(note.url); if (url && !url.startsWith("https://")) { - throw new Error(`unexpected shcema of note url: ${url}`); + throw new Error(`unexpected schema of note url: ${url}`); } logger.debug(`Note fetched: ${JSON.stringify(note, null, 2)}`); - logger.info(`Creating the Note: ${note.id}`); // Skip if note is made before 2007 (1yr before Fedi was created) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 372ef99e11..877f5f3323 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -198,7 +198,37 @@ export async function createPerson( const url = getOneApHrefNullable(person.url); if (url && !url.startsWith("https://")) { - throw new Error(`unexpected shcema of person url: ${url}`); + throw new Error(`unexpected schema of person url: ${url}`); + } + + let followersCount: number | undefined; + + if (typeof person.followers === "string") { + try { + let data = await fetch(person.followers, { + headers: { Accept: "application/json" }, + }); + let json_data = JSON.parse(await data.text()); + + followersCount = json_data.totalItems; + } catch { + followersCount = undefined; + } + } + + let followingCount: number | undefined; + + if (typeof person.following === "string") { + try { + let data = await fetch(person.following, { + headers: { Accept: "application/json" }, + }); + let json_data = JSON.parse(await data.text()); + + followingCount = json_data.totalItems; + } catch (e) { + followingCount = undefined; + } } // Create user @@ -228,6 +258,22 @@ export async function createPerson( followersUri: person.followers ? getApId(person.followers) : undefined, + followersCount: + followersCount !== undefined + ? followersCount + : person.followers && + typeof person.followers !== "string" && + isCollectionOrOrderedCollection(person.followers) + ? person.followers.totalItems + : undefined, + followingCount: + followingCount !== undefined + ? followingCount + : person.following && + typeof person.following !== "string" && + isCollectionOrOrderedCollection(person.following) + ? person.following.totalItems + : undefined, featured: person.featured ? getApId(person.featured) : undefined, uri: person.id, tags, @@ -396,7 +442,37 @@ export async function updatePerson( const url = getOneApHrefNullable(person.url); if (url && !url.startsWith("https://")) { - throw new Error(`unexpected shcema of person url: ${url}`); + throw new Error(`unexpected schema of person url: ${url}`); + } + + let followersCount: number | undefined; + + if (typeof person.followers === "string") { + try { + let data = await fetch(person.followers, { + headers: { Accept: "application/json" }, + }); + let json_data = JSON.parse(await data.text()); + + followersCount = json_data.totalItems; + } catch { + followersCount = undefined; + } + } + + let followingCount: number | undefined; + + if (typeof person.following === "string") { + try { + let data = await fetch(person.following, { + headers: { Accept: "application/json" }, + }); + let json_data = JSON.parse(await data.text()); + + followingCount = json_data.totalItems; + } catch { + followingCount = undefined; + } } const updates = { @@ -406,6 +482,22 @@ export async function updatePerson( person.sharedInbox || (person.endpoints ? person.endpoints.sharedInbox : undefined), followersUri: person.followers ? getApId(person.followers) : undefined, + followersCount: + followersCount !== undefined + ? followersCount + : person.followers && + typeof person.followers !== "string" && + isCollectionOrOrderedCollection(person.followers) + ? person.followers.totalItems + : undefined, + followingCount: + followingCount !== undefined + ? followingCount + : person.following && + typeof person.following !== "string" && + isCollectionOrOrderedCollection(person.following) + ? person.following.totalItems + : undefined, featured: person.featured, emojis: emojiNames, name: truncate(person.name, nameLength), @@ -413,8 +505,8 @@ export async function updatePerson( isBot: getApType(object) === "Service", isCat: (person as any).isCat === true, isLocked: !!person.manuallyApprovesFollowers, - movedToUri: person.movedTo, - alsoKnownAs: person.alsoKnownAs, + movedToUri: person.movedTo || null, + alsoKnownAs: person.alsoKnownAs || null, isExplorable: !!person.discoverable, } as Partial; diff --git a/packages/backend/src/remote/activitypub/renderer/announce.ts b/packages/backend/src/remote/activitypub/renderer/announce.ts index cff79a3f72..1fd1842acf 100644 --- a/packages/backend/src/remote/activitypub/renderer/announce.ts +++ b/packages/backend/src/remote/activitypub/renderer/announce.ts @@ -4,6 +4,10 @@ import type { Note } from "@/models/entities/note.js"; export default (object: any, note: Note) => { const attributedTo = `${config.url}/users/${note.userId}`; + const mentions = ( + JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers + ).map((x) => x.uri); + let to: string[] = []; let cc: string[] = []; @@ -13,6 +17,10 @@ export default (object: any, note: Note) => { } else if (note.visibility === "home") { to = [`${attributedTo}/followers`]; cc = ["https://www.w3.org/ns/activitystreams#Public"]; + } else if (note.visibility === "followers") { + to = [`${attributedTo}/followers`]; + } else if (note.visibility === "specified") { + to = mentions; } else { return null; } diff --git a/packages/backend/src/server/api/common/generated-muted-renote-query.ts b/packages/backend/src/server/api/common/generated-muted-renote-query.ts new file mode 100644 index 0000000000..3fcd9b28e8 --- /dev/null +++ b/packages/backend/src/server/api/common/generated-muted-renote-query.ts @@ -0,0 +1,28 @@ +import { Brackets, SelectQueryBuilder } from "typeorm"; +import { User } from "@/models/entities/user.js"; +import { RenoteMutings } from "@/models/index.js"; + +export function generateMutedUserRenotesQueryForNotes( + q: SelectQueryBuilder, + me: { id: User["id"] }, +): void { + const mutingQuery = RenoteMutings.createQueryBuilder("renote_muting") + .select("renote_muting.muteeId") + .where("renote_muting.muterId = :muterId", { muterId: me.id }); + + q.andWhere( + new Brackets((qb) => { + qb.where( + new Brackets((qb) => { + qb.where("note.renoteId IS NOT NULL"); + qb.andWhere("note.text IS NULL"); + qb.andWhere(`note.userId NOT IN (${mutingQuery.getQuery()})`); + }), + ) + .orWhere("note.renoteId IS NULL") + .orWhere("note.text IS NOT NULL"); + }), + ); + + q.setParameters(mutingQuery.getParameters()); +} diff --git a/packages/backend/src/server/api/common/signup.ts b/packages/backend/src/server/api/common/signup.ts index 7ae9e10fba..6beae2c782 100644 --- a/packages/backend/src/server/api/common/signup.ts +++ b/packages/backend/src/server/api/common/signup.ts @@ -1,4 +1,3 @@ -import bcrypt from "bcryptjs"; import { generateKeyPair } from "node:crypto"; import generateUserToken from "./generate-native-user-token.js"; import { User } from "@/models/entities/user.js"; @@ -12,6 +11,7 @@ import { usersChart } from "@/services/chart/index.js"; import { UsedUsername } from "@/models/entities/used-username.js"; import { db } from "@/db/postgre.js"; import config from "@/config/index.js"; +import { hashPassword } from "@/misc/password.js"; export async function signup(opts: { username: User["username"]; @@ -42,8 +42,7 @@ export async function signup(opts: { } // Generate hash of password - const salt = await bcrypt.genSalt(8); - hash = await bcrypt.hash(password, salt); + hash = await hashPassword(password); } // Generate secret @@ -107,6 +106,7 @@ export async function signup(opts: { isAdmin: (await Users.countBy({ host: IsNull(), + isAdmin: true, })) === 0, }), ); diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index 7fb5fd3209..3f82eb7a73 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -29,6 +29,7 @@ import * as ep___admin_emoji_list from "./endpoints/admin/emoji/list.js"; import * as ep___admin_emoji_removeAliasesBulk from "./endpoints/admin/emoji/remove-aliases-bulk.js"; import * as ep___admin_emoji_setAliasesBulk from "./endpoints/admin/emoji/set-aliases-bulk.js"; import * as ep___admin_emoji_setCategoryBulk from "./endpoints/admin/emoji/set-category-bulk.js"; +import * as ep___admin_emoji_setLicenseBulk from "./endpoints/admin/emoji/set-license-bulk.js"; import * as ep___admin_emoji_update from "./endpoints/admin/emoji/update.js"; import * as ep___admin_federation_deleteAllFiles from "./endpoints/admin/federation/delete-all-files.js"; import * as ep___admin_federation_refreshRemoteInstanceMetadata from "./endpoints/admin/federation/refresh-remote-instance-metadata.js"; @@ -50,6 +51,7 @@ import * as ep___admin_relays_list from "./endpoints/admin/relays/list.js"; import * as ep___admin_relays_remove from "./endpoints/admin/relays/remove.js"; import * as ep___admin_resetPassword from "./endpoints/admin/reset-password.js"; import * as ep___admin_resolveAbuseUserReport from "./endpoints/admin/resolve-abuse-user-report.js"; +import * as ep___admin_search_indexAll from "./endpoints/admin/search/index-all.js"; import * as ep___admin_sendEmail from "./endpoints/admin/send-email.js"; import * as ep___admin_serverInfo from "./endpoints/admin/server-info.js"; import * as ep___admin_showModerationLogs from "./endpoints/admin/show-moderation-logs.js"; @@ -131,6 +133,7 @@ import * as ep___drive_folders_show from "./endpoints/drive/folders/show.js"; import * as ep___drive_folders_update from "./endpoints/drive/folders/update.js"; import * as ep___drive_stream from "./endpoints/drive/stream.js"; import * as ep___emailAddress_available from "./endpoints/email-address/available.js"; +import * as ep___emoji from "./endpoints/emoji.js"; import * as ep___endpoint from "./endpoints/endpoint.js"; import * as ep___endpoints from "./endpoints/endpoints.js"; import * as ep___exportCustomEmojis from "./endpoints/export-custom-emojis.js"; @@ -179,6 +182,7 @@ import * as ep___i_exportBlocking from "./endpoints/i/export-blocking.js"; import * as ep___i_exportFollowing from "./endpoints/i/export-following.js"; import * as ep___i_exportMute from "./endpoints/i/export-mute.js"; import * as ep___i_exportNotes from "./endpoints/i/export-notes.js"; +import * as ep___i_importPosts from "./endpoints/i/import-posts.js"; import * as ep___i_exportUserLists from "./endpoints/i/export-user-lists.js"; import * as ep___i_favorites from "./endpoints/i/favorites.js"; import * as ep___i_gallery_likes from "./endpoints/i/gallery/likes.js"; @@ -227,6 +231,9 @@ import * as ep___miauth_genToken from "./endpoints/miauth/gen-token.js"; import * as ep___mute_create from "./endpoints/mute/create.js"; import * as ep___mute_delete from "./endpoints/mute/delete.js"; import * as ep___mute_list from "./endpoints/mute/list.js"; +import * as ep___renote_mute_create from "./endpoints/renote-mute/create.js"; +import * as ep___renote_mute_delete from "./endpoints/renote-mute/delete.js"; +import * as ep___renote_mute_list from "./endpoints/renote-mute/list.js"; import * as ep___my_apps from "./endpoints/my/apps.js"; import * as ep___notes from "./endpoints/notes.js"; import * as ep___notes_children from "./endpoints/notes/children.js"; @@ -286,6 +293,8 @@ import * as ep___resetDb from "./endpoints/reset-db.js"; import * as ep___resetPassword from "./endpoints/reset-password.js"; import * as ep___serverInfo from "./endpoints/server-info.js"; import * as ep___stats from "./endpoints/stats.js"; +import * as ep___sw_show_registration from "./endpoints/sw/show-registration.js"; +import * as ep___sw_update_registration from "./endpoints/sw/update-registration.js"; import * as ep___sw_register from "./endpoints/sw/register.js"; import * as ep___sw_unregister from "./endpoints/sw/unregister.js"; import * as ep___test from "./endpoints/test.js"; @@ -363,6 +372,7 @@ const eps = [ ["admin/emoji/remove-aliases-bulk", ep___admin_emoji_removeAliasesBulk], ["admin/emoji/set-aliases-bulk", ep___admin_emoji_setAliasesBulk], ["admin/emoji/set-category-bulk", ep___admin_emoji_setCategoryBulk], + ["admin/emoji/set-license-bulk", ep___admin_emoji_setLicenseBulk], ["admin/emoji/update", ep___admin_emoji_update], ["admin/federation/delete-all-files", ep___admin_federation_deleteAllFiles], [ @@ -390,6 +400,7 @@ const eps = [ ["admin/relays/remove", ep___admin_relays_remove], ["admin/reset-password", ep___admin_resetPassword], ["admin/resolve-abuse-user-report", ep___admin_resolveAbuseUserReport], + ["admin/search/index-all", ep___admin_search_indexAll], ["admin/send-email", ep___admin_sendEmail], ["admin/server-info", ep___admin_serverInfo], ["admin/show-moderation-logs", ep___admin_showModerationLogs], @@ -471,6 +482,7 @@ const eps = [ ["drive/folders/update", ep___drive_folders_update], ["drive/stream", ep___drive_stream], ["email-address/available", ep___emailAddress_available], + ["emoji", ep___emoji], ["endpoint", ep___endpoint], ["endpoints", ep___endpoints], ["export-custom-emojis", ep___exportCustomEmojis], @@ -521,6 +533,7 @@ const eps = [ ["i/export-following", ep___i_exportFollowing], ["i/export-mute", ep___i_exportMute], ["i/export-notes", ep___i_exportNotes], + ["i/import-posts", ep___i_importPosts], ["i/export-user-lists", ep___i_exportUserLists], ["i/favorites", ep___i_favorites], ["i/gallery/likes", ep___i_gallery_likes], @@ -616,6 +629,9 @@ const eps = [ ["ping", ep___ping], ["pinned-users", ep___pinnedUsers], ["recommended-instances", ep___recommendedInstances], + ["renote-mute/create", ep___renote_mute_create], + ["renote-mute/delete", ep___renote_mute_delete], + ["renote-mute/list", ep___renote_mute_list], ["custom-motd", ep___customMOTD], ["custom-splash-icons", ep___customSplashIcons], ["latest-version", ep___latestVersion], @@ -629,6 +645,8 @@ const eps = [ ["stats", ep___stats], ["sw/register", ep___sw_register], ["sw/unregister", ep___sw_unregister], + ["sw/show-registration", ep___sw_show_registration], + ["sw/update-registration", ep___sw_update_registration], ["test", ep___test], ["username/available", ep___username_available], ["users", ep___users], diff --git a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts index 11ef2273ca..2e035d1695 100644 --- a/packages/backend/src/server/api/endpoints/admin/accounts/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/accounts/create.ts @@ -35,6 +35,7 @@ export default define(meta, paramDef, async (ps, _me) => { const noUsers = (await Users.countBy({ host: IsNull(), + isAdmin: true, })) === 0; if (!(noUsers || me?.isAdmin)) throw new Error("access denied"); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts index 601d754a0d..bfc025834f 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/add.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/add.ts @@ -49,6 +49,7 @@ export default define(meta, paramDef, async (ps, me) => { originalUrl: file.url, publicUrl: file.webpublicUrl ?? file.url, type: file.webpublicType ?? file.type, + license: null, }).then((x) => Emojis.findOneByOrFail(x.identifiers[0])); await db.queryResultCache!.remove(["meta_emojis"]); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts index 4a7f2bc611..951158f7d4 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/copy.ts @@ -73,6 +73,7 @@ export default define(meta, paramDef, async (ps, me) => { originalUrl: driveFile.url, publicUrl: driveFile.webpublicUrl ?? driveFile.url, type: driveFile.webpublicType ?? driveFile.type, + license: emoji.license, }).then((x) => Emojis.findOneByOrFail(x.identifiers[0])); await db.queryResultCache!.remove(["meta_emojis"]); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index 63f60bc991..fae986dd96 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -55,6 +55,11 @@ export const meta = { optional: false, nullable: false, }, + license: { + type: "string", + optional: false, + nullable: true, + }, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index bc4f1d29fa..aa49f14803 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -55,6 +55,11 @@ export const meta = { optional: false, nullable: false, }, + license: { + type: "string", + optional: false, + nullable: true, + }, }, }, }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-license-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-license-bulk.ts new file mode 100644 index 0000000000..c98ca03fae --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-license-bulk.ts @@ -0,0 +1,45 @@ +import define from "../../../define.js"; +import { Emojis } from "@/models/index.js"; +import { In } from "typeorm"; +import { ApiError } from "../../../error.js"; +import { db } from "@/db/postgre.js"; + +export const meta = { + tags: ["admin"], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: "object", + properties: { + ids: { + type: "array", + items: { + type: "string", + format: "misskey:id", + }, + }, + license: { + type: "string", + nullable: true, + description: "Use `null` to reset the license.", + }, + }, + required: ["ids"], +} as const; + +export default define(meta, paramDef, async (ps) => { + await Emojis.update( + { + id: In(ps.ids), + }, + { + updatedAt: new Date(), + license: ps.license, + }, + ); + + await db.queryResultCache!.remove(["meta_emojis"]); +}); diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 3f7f6639f5..9e2e854760 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -34,6 +34,10 @@ export const paramDef = { type: "string", }, }, + license: { + type: "string", + nullable: true, + }, }, required: ["id", "name", "aliases"], } as const; @@ -48,6 +52,7 @@ export default define(meta, paramDef, async (ps) => { name: ps.name, category: ps.category, aliases: ps.aliases, + license: ps.license, }); await db.queryResultCache!.remove(["meta_emojis"]); diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 1808de118a..c8c639f504 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -1,6 +1,6 @@ import config from "@/config/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { MAX_NOTE_TEXT_LENGTH } from "@/const.js"; +import { MAX_NOTE_TEXT_LENGTH, MAX_CAPTION_TEXT_LENGTH } from "@/const.js"; import define from "../../define.js"; export const meta = { @@ -86,6 +86,11 @@ export const meta = { optional: false, nullable: false, }, + maxCaptionTextLength: { + type: "number", + optional: false, + nullable: false, + }, emojis: { type: "array", optional: false, @@ -499,6 +504,7 @@ export default define(meta, paramDef, async (ps, me) => { backgroundImageUrl: instance.backgroundImageUrl, logoImageUrl: instance.logoImageUrl, maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, // 後方互換性のため + maxCaptionTextLength: MAX_CAPTION_TEXT_LENGTH, defaultLightTheme: instance.defaultLightTheme, defaultDarkTheme: instance.defaultDarkTheme, enableEmail: instance.enableEmail, diff --git a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts index ecd67d8936..4a437c3d12 100644 --- a/packages/backend/src/server/api/endpoints/admin/queue/stats.ts +++ b/packages/backend/src/server/api/endpoints/admin/queue/stats.ts @@ -3,6 +3,7 @@ import { inboxQueue, dbQueue, objectStorageQueue, + backgroundQueue, } from "@/queue/queues.js"; import define from "../../../define.js"; @@ -37,6 +38,11 @@ export const meta = { nullable: false, ref: "QueueCount", }, + backgroundQueue: { + optional: false, + nullable: false, + ref: "QueueCount", + }, }, }, } as const; @@ -52,11 +58,13 @@ export default define(meta, paramDef, async (ps) => { const inboxJobCounts = await inboxQueue.getJobCounts(); const dbJobCounts = await dbQueue.getJobCounts(); const objectStorageJobCounts = await objectStorageQueue.getJobCounts(); + const backgroundJobCounts = await backgroundQueue.getJobCounts(); return { deliver: deliverJobCounts, inbox: inboxJobCounts, db: dbJobCounts, objectStorage: objectStorageJobCounts, + backgroundQueue: backgroundJobCounts, }; }); diff --git a/packages/backend/src/server/api/endpoints/admin/reset-password.ts b/packages/backend/src/server/api/endpoints/admin/reset-password.ts index dd3f258f74..cbe6735ce5 100644 --- a/packages/backend/src/server/api/endpoints/admin/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/admin/reset-password.ts @@ -1,7 +1,8 @@ import define from "../../define.js"; -import bcrypt from "bcryptjs"; +// import bcrypt from "bcryptjs"; import rndstr from "rndstr"; import { Users, UserProfiles } from "@/models/index.js"; +import { hashPassword } from "@/misc/password.js"; export const meta = { tags: ["admin"], @@ -47,7 +48,8 @@ export default define(meta, paramDef, async (ps) => { const passwd = rndstr("a-zA-Z0-9", 8); // Generate hash of password - const hash = bcrypt.hashSync(passwd); + // const hash = bcrypt.hashSync(passwd); + const hash = await hashPassword(passwd); await UserProfiles.update( { diff --git a/packages/backend/src/server/api/endpoints/admin/search/index-all.ts b/packages/backend/src/server/api/endpoints/admin/search/index-all.ts new file mode 100644 index 0000000000..135b48eccd --- /dev/null +++ b/packages/backend/src/server/api/endpoints/admin/search/index-all.ts @@ -0,0 +1,28 @@ +import define from "../../../define.js"; +import { createIndexAllNotesJob } from "@/queue/index.js"; + +export const meta = { + tags: ["admin"], + + requireCredential: true, + requireModerator: true, +} as const; + +export const paramDef = { + type: "object", + properties: { + cursor: { + type: "string", + format: "misskey:id", + nullable: true, + default: null, + }, + }, + required: [], +} as const; + +export default define(meta, paramDef, async (ps, _me) => { + createIndexAllNotesJob({ + cursor: ps.cursor ?? undefined, + }); +}); diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 28aac4a4d4..f7e79b64b5 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -209,7 +209,12 @@ export default define(meta, paramDef, async (ps, me) => { } if (Array.isArray(ps.blockedHosts)) { - set.blockedHosts = ps.blockedHosts.filter(Boolean); + let lastValue = ""; + set.blockedHosts = ps.blockedHosts.sort().filter((h) => { + const lv = lastValue; + lastValue = h; + return h !== "" && h !== lv; + }); } if (ps.themeColor !== undefined) { diff --git a/packages/backend/src/server/api/endpoints/channels/followed.ts b/packages/backend/src/server/api/endpoints/channels/followed.ts index 63483a79aa..993a211f7e 100644 --- a/packages/backend/src/server/api/endpoints/channels/followed.ts +++ b/packages/backend/src/server/api/endpoints/channels/followed.ts @@ -1,6 +1,5 @@ import define from "../../define.js"; import { Channels, ChannelFollowings } from "@/models/index.js"; -import { makePaginationQuery } from "../../common/make-pagination-query.js"; export const meta = { tags: ["channels", "account"], @@ -33,11 +32,24 @@ export const paramDef = { } as const; export default define(meta, paramDef, async (ps, me) => { - const query = makePaginationQuery( - ChannelFollowings.createQueryBuilder(), - ps.sinceId, - ps.untilId, - ).andWhere({ followerId: me.id }); + const query = ChannelFollowings.createQueryBuilder("following").andWhere({ + followerId: me.id, + }); + if (ps.sinceId) { + query.andWhere('following."followeeId" > :sinceId', { + sinceId: ps.sinceId, + }); + } + if (ps.untilId) { + query.andWhere('following."followeeId" < :untilId', { + untilId: ps.untilId, + }); + } + if (ps.sinceId && !ps.untilId) { + query.orderBy('following."followeeId"', "ASC"); + } else { + query.orderBy('following."followeeId"', "DESC"); + } const followings = await query.take(ps.limit).getMany(); diff --git a/packages/backend/src/server/api/endpoints/drive/files/update.ts b/packages/backend/src/server/api/endpoints/drive/files/update.ts index d113b978f6..e833fddb58 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/update.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/update.ts @@ -54,7 +54,11 @@ export const paramDef = { folderId: { type: "string", format: "misskey:id", nullable: true }, name: { type: "string" }, isSensitive: { type: "boolean" }, - comment: { type: "string", nullable: true, maxLength: 512 }, + comment: { + type: "string", + nullable: true, + maxLength: DB_MAX_IMAGE_COMMENT_LENGTH, + }, }, required: ["fileId"], } as const; diff --git a/packages/backend/src/server/api/endpoints/emoji.ts b/packages/backend/src/server/api/endpoints/emoji.ts new file mode 100644 index 0000000000..ddfad77374 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/emoji.ts @@ -0,0 +1,39 @@ +import { IsNull } from "typeorm"; +import { Emojis } from "@/models/index.js"; +import define from "../define.js"; + +export const meta = { + tags: ["meta"], + + requireCredential: false, + allowGet: true, + cacheSec: 3600, + + res: { + type: "object", + optional: false, + nullable: false, + ref: "Emoji", + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], +} as const; + +export default define(meta, paramDef, async (ps, me) => { + const emoji = await Emojis.findOneOrFail({ + where: { + name: ps.name, + host: IsNull(), + }, + }); + + return Emojis.pack(emoji); +}); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index e80dc4d711..f0581de4b4 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -1,4 +1,3 @@ -import bcrypt from "bcryptjs"; import { promisify } from "node:util"; import * as cbor from "cbor"; import define from "../../../define.js"; @@ -11,6 +10,7 @@ import { import config from "@/config/index.js"; import { procedures, hash } from "../../../2fa.js"; import { publishMainStream } from "@/services/stream.js"; +import { comparePassword } from "@/misc/password.js"; const cborDecodeFirst = promisify(cbor.decodeFirst) as any; const rpIdHashReal = hash(Buffer.from(config.hostname, "utf-8")); @@ -43,7 +43,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts index 8c0af28ee4..a10dc9b256 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register-key.ts @@ -1,10 +1,10 @@ -import bcrypt from "bcryptjs"; import define from "../../../define.js"; import { UserProfiles, AttestationChallenges } from "@/models/index.js"; import { promisify } from "node:util"; import * as crypto from "node:crypto"; import { genId } from "@/misc/gen-id.js"; import { hash } from "../../../2fa.js"; +import { comparePassword } from "@/misc/password.js"; const randomBytes = promisify(crypto.randomBytes); @@ -26,15 +26,15 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); } - if (!profile.twoFactorEnabled) { - throw new Error("2fa not enabled"); - } + // if (!profile.twoFactorEnabled) { + // throw new Error("2fa not enabled"); + // } // 32 byte challenge const entropy = await randomBytes(32); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/register.ts b/packages/backend/src/server/api/endpoints/i/2fa/register.ts index 9019787f23..533035bc91 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/register.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/register.ts @@ -1,9 +1,9 @@ -import bcrypt from "bcryptjs"; import * as speakeasy from "speakeasy"; import * as QRCode from "qrcode"; import config from "@/config/index.js"; import { UserProfiles } from "@/models/index.js"; import define from "../../../define.js"; +import { comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -23,7 +23,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts index d491f0a6ee..862c971e75 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/remove-key.ts @@ -1,4 +1,4 @@ -import bcrypt from "bcryptjs"; +import { comparePassword } from "@/misc/password.js"; import define from "../../../define.js"; import { UserProfiles, UserSecurityKeys, Users } from "@/models/index.js"; import { publishMainStream } from "@/services/stream.js"; @@ -22,7 +22,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts index 9bb1538b00..57d57ff65a 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/unregister.ts @@ -1,6 +1,6 @@ -import bcrypt from "bcryptjs"; import define from "../../../define.js"; import { UserProfiles } from "@/models/index.js"; +import { comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -20,7 +20,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/change-password.ts b/packages/backend/src/server/api/endpoints/i/change-password.ts index fcfc38bd14..8bbb3ad93a 100644 --- a/packages/backend/src/server/api/endpoints/i/change-password.ts +++ b/packages/backend/src/server/api/endpoints/i/change-password.ts @@ -1,6 +1,6 @@ -import bcrypt from "bcryptjs"; import define from "../../define.js"; import { UserProfiles } from "@/models/index.js"; +import { hashPassword, comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -21,15 +21,14 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.currentPassword, profile.password!); + const same = await comparePassword(ps.currentPassword, profile.password!); if (!same) { throw new Error("incorrect password"); } // Generate hash of password - const salt = await bcrypt.genSalt(8); - const hash = await bcrypt.hash(ps.newPassword, salt); + const hash = await hashPassword(ps.newPassword); await UserProfiles.update(user.id, { password: hash, diff --git a/packages/backend/src/server/api/endpoints/i/delete-account.ts b/packages/backend/src/server/api/endpoints/i/delete-account.ts index 81aee9a41a..781abe0b38 100644 --- a/packages/backend/src/server/api/endpoints/i/delete-account.ts +++ b/packages/backend/src/server/api/endpoints/i/delete-account.ts @@ -1,7 +1,7 @@ -import bcrypt from "bcryptjs"; import { UserProfiles, Users } from "@/models/index.js"; import { deleteAccount } from "@/services/delete-account.js"; import define from "../../define.js"; +import { comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -25,7 +25,7 @@ export default define(meta, paramDef, async (ps, user) => { } // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/import-posts.ts b/packages/backend/src/server/api/endpoints/i/import-posts.ts new file mode 100644 index 0000000000..6fdf562fdb --- /dev/null +++ b/packages/backend/src/server/api/endpoints/i/import-posts.ts @@ -0,0 +1,44 @@ +import define from "../../define.js"; +import { createImportPostsJob } from "@/queue/index.js"; +import { ApiError } from "../../error.js"; +import { DriveFiles } from "@/models/index.js"; +import { DAY } from "@/const.js"; + +export const meta = { + secure: true, + requireCredential: true, + limit: { + duration: DAY, + max: 1, + }, + errors: { + noSuchFile: { + message: "No such file.", + code: "NO_SUCH_FILE", + id: "e674141e-bd2a-ba85-e616-aefb187c9c2a", + }, + + emptyFile: { + message: "That file is empty.", + code: "EMPTY_FILE", + id: "d2f12af1-e7b4-feac-86a3-519548f2728e", + }, + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + fileId: { type: "string", format: "misskey:id" }, + signatureCheck: { type: "boolean" }, + }, + required: ["fileId"], +} as const; + +export default define(meta, paramDef, async (ps, user) => { + const file = await DriveFiles.findOneBy({ id: ps.fileId }); + + if (file == null) throw new ApiError(meta.errors.noSuchFile); + if (file.size === 0) throw new ApiError(meta.errors.emptyFile); + createImportPostsJob(user, file.id, ps.signatureCheck); +}); diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index bfeba04595..3d947063ff 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -3,7 +3,6 @@ import { resolveUser } from "@/remote/resolve-user.js"; import { DAY } from "@/const.js"; import DeliverManager from "@/remote/activitypub/deliver-manager.js"; import { renderActivity } from "@/remote/activitypub/renderer/index.js"; -import { genId } from "@/misc/gen-id.js"; import define from "../../define.js"; import { ApiError } from "../../error.js"; import { apiLogger } from "../../logger.js"; @@ -81,7 +80,7 @@ export const paramDef = { function moveActivity(toUrl: string, fromUrl: string) { const activity = { - id: genId(), + id: null, actor: fromUrl, type: "Move", object: fromUrl, diff --git a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts index dff37cf3d3..b5b34c0902 100644 --- a/packages/backend/src/server/api/endpoints/i/regenerate-token.ts +++ b/packages/backend/src/server/api/endpoints/i/regenerate-token.ts @@ -1,4 +1,3 @@ -import bcrypt from "bcryptjs"; import { publishInternalEvent, publishMainStream, @@ -7,6 +6,7 @@ import { import generateUserToken from "../../common/generate-native-user-token.js"; import define from "../../define.js"; import { Users, UserProfiles } from "@/models/index.js"; +import { comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -29,7 +29,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new Error("incorrect password"); diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index c3c24d4d3d..94ad6b3c72 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -2,12 +2,12 @@ import { publishMainStream } from "@/services/stream.js"; import define from "../../define.js"; import rndstr from "rndstr"; import config from "@/config/index.js"; -import bcrypt from "bcryptjs"; import { Users, UserProfiles } from "@/models/index.js"; import { sendEmail } from "@/services/send-email.js"; import { ApiError } from "../../error.js"; import { validateEmailForAccount } from "@/services/validate-email-for-account.js"; import { HOUR } from "@/const.js"; +import { comparePassword } from "@/misc/password.js"; export const meta = { requireCredential: true, @@ -47,7 +47,7 @@ export default define(meta, paramDef, async (ps, user) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(ps.password, profile.password!); + const same = await comparePassword(ps.password, profile.password!); if (!same) { throw new ApiError(meta.errors.incorrectPassword); diff --git a/packages/backend/src/server/api/endpoints/i/update.ts b/packages/backend/src/server/api/endpoints/i/update.ts index 48868de37e..56ed64296b 100644 --- a/packages/backend/src/server/api/endpoints/i/update.ts +++ b/packages/backend/src/server/api/endpoints/i/update.ts @@ -104,6 +104,7 @@ export const paramDef = { noCrawle: { type: "boolean" }, isBot: { type: "boolean" }, isCat: { type: "boolean" }, + speakAsCat: { type: "boolean" }, showTimelineReplies: { type: "boolean" }, injectFeaturedNote: { type: "boolean" }, receiveAnnouncementEmail: { type: "boolean" }, @@ -191,6 +192,7 @@ export default define(meta, paramDef, async (ps, _user, token) => { profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed; if (typeof ps.noCrawle === "boolean") profileUpdates.noCrawle = ps.noCrawle; if (typeof ps.isCat === "boolean") updates.isCat = ps.isCat; + if (typeof ps.speakAsCat === "boolean") updates.speakAsCat = ps.speakAsCat; if (typeof ps.injectFeaturedNote === "boolean") profileUpdates.injectFeaturedNote = ps.injectFeaturedNote; if (typeof ps.receiveAnnouncementEmail === "boolean") diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 99d392ce45..ed9ae16df0 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -151,7 +151,7 @@ export default define(meta, paramDef, async (ps, user) => { } // テキストが無いかつ添付ファイルも無かったらエラー - if (ps.text == null && file == null) { + if ((ps.text == null || ps.text.trim() === "") && file == null) { throw new ApiError(meta.errors.contentRequired); } diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 005d0800ac..4dc1c941e3 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -2,8 +2,7 @@ import { IsNull, MoreThan } from "typeorm"; import config from "@/config/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; import { Ads, Emojis, Users } from "@/models/index.js"; -import { DB_MAX_NOTE_TEXT_LENGTH } from "@/misc/hard-limits.js"; -import { MAX_NOTE_TEXT_LENGTH } from "@/const.js"; +import { MAX_NOTE_TEXT_LENGTH, MAX_CAPTION_TEXT_LENGTH } from "@/const.js"; import define from "../define.js"; export const meta = { @@ -178,6 +177,11 @@ export const meta = { optional: false, nullable: false, }, + maxCaptionTextLength: { + type: "number", + optional: false, + nullable: false, + }, emojis: { type: "array", optional: false, @@ -456,6 +460,7 @@ export default define(meta, paramDef, async (ps, me) => { backgroundImageUrl: instance.backgroundImageUrl, logoImageUrl: instance.logoImageUrl, maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, // 後方互換性のため + maxCaptionTextLength: MAX_CAPTION_TEXT_LENGTH, emojis: instance.privateMode && !me ? [] : await Emojis.packMany(emojis), defaultLightTheme: instance.defaultLightTheme, defaultDarkTheme: instance.defaultDarkTheme, @@ -489,6 +494,7 @@ export default define(meta, paramDef, async (ps, me) => { requireSetup: (await Users.countBy({ host: IsNull(), + isAdmin: true, })) === 0, } : {}), diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index a6d764bf37..47c1e13812 100644 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -32,17 +32,17 @@ export const paramDef = { enum: ["combined", "local", "remote"], default: "local", }, + days: { type: "integer", minimum: 1, maximum: 365, default: 3 }, }, required: [], } as const; export default define(meta, paramDef, async (ps, user) => { const max = 30; - const day = 1000 * 60 * 60 * 24 * 3; // 3日前まで + const day = 1000 * 60 * 60 * 24 * ps.days; const query = Notes.createQueryBuilder("note") .addSelect("note.score") - // .where("note.userHost IS NULL") .andWhere("note.score > 0") .andWhere("note.createdAt > :date", { date: new Date(Date.now() - day) }) .andWhere("note.visibility = 'public'") diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index e4a38cffb1..077a1ad5e1 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -8,6 +8,7 @@ import { generateMutedUserQuery } from "../../common/generate-muted-user-query.j import { generateRepliesQuery } from "../../common/generate-replies-query.js"; import { generateMutedNoteQuery } from "../../common/generate-muted-note-query.js"; import { generateBlockedUserQuery } from "../../common/generate-block-query.js"; +import { generateMutedUserRenotesQueryForNotes } from "../../common/generated-muted-renote-query.js"; export const meta = { tags: ["notes"], @@ -86,6 +87,7 @@ export default define(meta, paramDef, async (ps, user) => { generateMutedUserQuery(query, user); generateMutedNoteQuery(query, user); generateBlockedUserQuery(query, user); + generateMutedUserRenotesQueryForNotes(query, user); } if (ps.withFiles) { @@ -93,13 +95,27 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); - process.nextTick(() => { if (user) { activeUsersChart.read(user); } }); - return await Notes.packMany(timeline, user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } + + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 3d6103da87..3c171278b4 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -11,6 +11,7 @@ import { generateRepliesQuery } from "../../common/generate-replies-query.js"; import { generateMutedNoteQuery } from "../../common/generate-muted-note-query.js"; import { generateChannelQuery } from "../../common/generate-channel-query.js"; import { generateBlockedUserQuery } from "../../common/generate-block-query.js"; +import { generateMutedUserRenotesQueryForNotes } from "../../common/generated-muted-renote-query.js"; export const meta = { tags: ["notes"], @@ -103,6 +104,7 @@ export default define(meta, paramDef, async (ps, user) => { generateMutedUserQuery(query, user); generateMutedNoteQuery(query, user); generateBlockedUserQuery(query, user); + generateMutedUserRenotesQueryForNotes(query, user); if (ps.includeMyRenotes === false) { query.andWhere( @@ -151,11 +153,25 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); - process.nextTick(() => { activeUsersChart.read(user); }); - return await Notes.packMany(timeline, user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } + + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 22e5965fce..cec371c8dc 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -11,6 +11,7 @@ import { generateRepliesQuery } from "../../common/generate-replies-query.js"; import { generateMutedNoteQuery } from "../../common/generate-muted-note-query.js"; import { generateChannelQuery } from "../../common/generate-channel-query.js"; import { generateBlockedUserQuery } from "../../common/generate-block-query.js"; +import { generateMutedUserRenotesQueryForNotes } from "../../common/generated-muted-renote-query.js"; export const meta = { tags: ["notes"], @@ -96,6 +97,7 @@ export default define(meta, paramDef, async (ps, user) => { if (user) generateMutedUserQuery(query, user); if (user) generateMutedNoteQuery(query, user); if (user) generateBlockedUserQuery(query, user); + if (user) generateMutedUserRenotesQueryForNotes(query, user); if (ps.withFiles) { query.andWhere("note.fileIds != '{}'"); @@ -123,13 +125,27 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); - process.nextTick(() => { if (user) { activeUsersChart.read(user); } }); - return await Notes.packMany(timeline, user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } + + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/mentions.ts b/packages/backend/src/server/api/endpoints/notes/mentions.ts index 3e5c4f18b2..68688b504c 100644 --- a/packages/backend/src/server/api/endpoints/notes/mentions.ts +++ b/packages/backend/src/server/api/endpoints/notes/mentions.ts @@ -86,9 +86,23 @@ export default define(meta, paramDef, async (ps, user) => { query.setParameters(followingQuery.getParameters()); } - const mentions = await query.take(ps.limit).getMany(); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } - read(user.id, mentions); + if (found.length > ps.limit) { + found.length = ps.limit; + } - return await Notes.packMany(mentions, user); + read(user.id, found); + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts index 6dacadec2a..56847b1dd2 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -11,6 +11,7 @@ import { generateRepliesQuery } from "../../common/generate-replies-query.js"; import { generateMutedNoteQuery } from "../../common/generate-muted-note-query.js"; import { generateChannelQuery } from "../../common/generate-channel-query.js"; import { generateBlockedUserQuery } from "../../common/generate-block-query.js"; +import { generateMutedUserRenotesQueryForNotes } from "../../common/generated-muted-renote-query.js"; export const meta = { tags: ["notes"], @@ -99,6 +100,7 @@ export default define(meta, paramDef, async (ps, user) => { if (user) generateMutedUserQuery(query, user); if (user) generateMutedNoteQuery(query, user); if (user) generateBlockedUserQuery(query, user); + if (user) generateMutedUserRenotesQueryForNotes(query, user); if (ps.withFiles) { query.andWhere("note.fileIds != '{}'"); @@ -126,13 +128,27 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); - process.nextTick(() => { if (user) { activeUsersChart.read(user); } }); - return await Notes.packMany(timeline, user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } + + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/renotes.ts b/packages/backend/src/server/api/endpoints/notes/renotes.ts index b09243e7e6..f313616be2 100644 --- a/packages/backend/src/server/api/endpoints/notes/renotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/renotes.ts @@ -74,7 +74,21 @@ export default define(meta, paramDef, async (ps, user) => { if (user) generateMutedUserQuery(query, user); if (user) generateBlockedUserQuery(query, user); - const renotes = await query.take(ps.limit).getMany(); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } - return await Notes.packMany(renotes, user); + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/replies.ts b/packages/backend/src/server/api/endpoints/notes/replies.ts index 0a8e909496..5ea4d479c5 100644 --- a/packages/backend/src/server/api/endpoints/notes/replies.ts +++ b/packages/backend/src/server/api/endpoints/notes/replies.ts @@ -58,7 +58,21 @@ export default define(meta, paramDef, async (ps, user) => { if (user) generateMutedUserQuery(query, user); if (user) generateBlockedUserQuery(query, user); - const timeline = await query.take(ps.limit).getMany(); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } - return await Notes.packMany(timeline, user); + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index d8d0dbbf73..f988acaa51 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -145,8 +145,21 @@ export default define(meta, paramDef, async (ps, me) => { } } - // Search notes - const notes = await query.take(ps.limit).getMany(); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, me))); + skip += take; + if (notes.length < take) break; + } - return await Notes.packMany(notes, me); + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index ce60436db8..8f563c384f 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -1,7 +1,9 @@ import { In } from "typeorm"; import { Notes } from "@/models/index.js"; +import { Note } from "@/models/entities/note.js"; import config from "@/config/index.js"; import es from "../../../../db/elasticsearch.js"; +import sonic from "../../../../db/sonic.js"; import define from "../../define.js"; import { makePaginationQuery } from "../../common/make-pagination-query.js"; import { generateVisibilityQuery } from "../../common/generate-visibility-query.js"; @@ -59,7 +61,7 @@ export const paramDef = { } as const; export default define(meta, paramDef, async (ps, me) => { - if (es == null) { + if (es == null && sonic == null) { const query = makePaginationQuery( Notes.createQueryBuilder("note"), ps.sinceId, @@ -92,9 +94,82 @@ export default define(meta, paramDef, async (ps, me) => { if (me) generateMutedUserQuery(query, me); if (me) generateBlockedUserQuery(query, me); - const notes = await query.take(ps.limit).getMany(); + const notes: Note[] = await query.take(ps.limit).getMany(); return await Notes.packMany(notes, me); + } else if (sonic) { + let start = 0; + const chunkSize = 100; + + // Use sonic to fetch and step through all search results that could match the requirements + const ids = []; + while (true) { + const results = await sonic.search.query( + sonic.collection, + sonic.bucket, + ps.query, + { + limit: chunkSize, + offset: start, + }, + ); + + start += chunkSize; + + if (results.length === 0) { + break; + } + + const res = results + .map((k) => JSON.parse(k)) + .filter((key) => { + if (ps.userId && key.userId !== ps.userId) { + return false; + } + if (ps.channelId && key.channelId !== ps.channelId) { + return false; + } + if (ps.sinceId && key.id <= ps.sinceId) { + return false; + } + if (ps.untilId && key.id >= ps.untilId) { + return false; + } + return true; + }) + .map((key) => key.id); + + ids.push(...res); + } + + // Sort all the results by note id DESC (newest first) + ids.sort((a, b) => b - a); + + // Fetch the notes from the database until we have enough to satisfy the limit + start = 0; + const found = []; + while (found.length < ps.limit && start < ids.length) { + const chunk = ids.slice(start, start + chunkSize); + const notes: Note[] = await Notes.find({ + where: { + id: In(chunk), + }, + order: { + id: "DESC", + }, + }); + + // The notes are checked for visibility and muted/blocked users when packed + found.push(...(await Notes.packMany(notes, me))); + start += chunkSize; + } + + // If we have more results than the limit, trim them + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; } else { const userQuery = ps.userId != null diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 083f41365a..f85c0cfd32 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -9,6 +9,7 @@ import { generateRepliesQuery } from "../../common/generate-replies-query.js"; import { generateMutedNoteQuery } from "../../common/generate-muted-note-query.js"; import { generateChannelQuery } from "../../common/generate-channel-query.js"; import { generateBlockedUserQuery } from "../../common/generate-block-query.js"; +import { generateMutedUserRenotesQueryForNotes } from "../../common/generated-muted-renote-query.js"; export const meta = { tags: ["notes"], @@ -95,6 +96,7 @@ export default define(meta, paramDef, async (ps, user) => { generateMutedUserQuery(query, user); generateMutedNoteQuery(query, user); generateBlockedUserQuery(query, user); + generateMutedUserRenotesQueryForNotes(query, user); if (ps.includeMyRenotes === false) { query.andWhere( @@ -143,11 +145,25 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); - process.nextTick(() => { activeUsersChart.read(user); }); - return await Notes.packMany(timeline, user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } + + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index c1e5357222..03f5cee3f3 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -138,9 +138,27 @@ export default define(meta, paramDef, async (ps, user) => { } //#endregion - const timeline = await query.take(ps.limit).getMany(); + process.nextTick(() => { + if (user) { + activeUsersChart.read(user); + } + }); - activeUsersChart.read(user); + // We fetch more than requested because some may be filtered out, and if there's less than + // requested, the pagination stops. + const found = []; + const take = Math.floor(ps.limit * 1.5); + let skip = 0; + while (found.length < ps.limit) { + const notes = await query.take(take).skip(skip).getMany(); + found.push(...(await Notes.packMany(notes, user))); + skip += take; + if (notes.length < take) break; + } - return await Notes.packMany(timeline, user); + if (found.length > ps.limit) { + found.length = ps.limit; + } + + return found; }); diff --git a/packages/backend/src/server/api/endpoints/renote-mute/create.ts b/packages/backend/src/server/api/endpoints/renote-mute/create.ts new file mode 100644 index 0000000000..857cbd9756 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/renote-mute/create.ts @@ -0,0 +1,68 @@ +import { genId } from "@/misc/gen-id.js"; +import { RenoteMutings } from "@/models/index.js"; +import { RenoteMuting } from "@/models/entities/renote-muting.js"; +import define from "../../define.js"; +import { ApiError } from "../../error.js"; +import { getUser } from "../../common/getters.js"; + +export const meta = { + tags: ["account"], + + requireCredential: true, + + kind: "write:mutes", + + errors: { + noSuchUser: { + message: "No such user.", + code: "NO_SUCH_USER", + id: "6fef56f3-e765-4957-88e5-c6f65329b8a5", + }, + + alreadyMuting: { + message: "You are already muting that user.", + code: "ALREADY_MUTING", + id: "7e7359cb-160c-4956-b08f-4d1c653cd007", + }, + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + userId: { type: "string", format: "misskey:id" }, + }, + required: ["userId"], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, user) => { + const muter = user; + + // Get mutee + const mutee = await getUser(ps.userId).catch((e) => { + if (e.id === "15348ddd-432d-49c2-8a5a-8069753becff") + throw new ApiError(meta.errors.noSuchUser); + throw e; + }); + + // Check if already muting + const exist = await RenoteMutings.findOneBy({ + muterId: muter.id, + muteeId: mutee.id, + }); + + if (exist != null) { + throw new ApiError(meta.errors.alreadyMuting); + } + + // Create mute + await RenoteMutings.insert({ + id: genId(), + createdAt: new Date(), + muterId: muter.id, + muteeId: mutee.id, + } as RenoteMuting); + + // publishUserEvent(user.id, "mute", mutee); +}); diff --git a/packages/backend/src/server/api/endpoints/renote-mute/delete.ts b/packages/backend/src/server/api/endpoints/renote-mute/delete.ts new file mode 100644 index 0000000000..fb4c972af0 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/renote-mute/delete.ts @@ -0,0 +1,63 @@ +import { RenoteMutings } from "@/models/index.js"; +import define from "../../define.js"; +import { ApiError } from "../../error.js"; +import { getUser } from "../../common/getters.js"; + +export const meta = { + tags: ["account"], + + requireCredential: true, + + kind: "write:mutes", + + errors: { + noSuchUser: { + message: "No such user.", + code: "NO_SUCH_USER", + id: "b851d00b-8ab1-4a56-8b1b-e24187cb48ef", + }, + + notMuting: { + message: "You are not muting that user.", + code: "NOT_MUTING", + id: "5467d020-daa9-4553-81e1-135c0c35a96d", + }, + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + userId: { type: "string", format: "misskey:id" }, + }, + required: ["userId"], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, user) => { + const muter = user; + + // Get mutee + const mutee = await getUser(ps.userId).catch((e) => { + if (e.id === "15348ddd-432d-49c2-8a5a-8069753becff") + throw new ApiError(meta.errors.noSuchUser); + throw e; + }); + + // Check not muting + const exist = await RenoteMutings.findOneBy({ + muterId: muter.id, + muteeId: mutee.id, + }); + + if (exist == null) { + throw new ApiError(meta.errors.notMuting); + } + + // Delete mute + await RenoteMutings.delete({ + id: exist.id, + }); + + // publishUserEvent(user.id, "unmute", mutee); +}); diff --git a/packages/backend/src/server/api/endpoints/renote-mute/list.ts b/packages/backend/src/server/api/endpoints/renote-mute/list.ts new file mode 100644 index 0000000000..9149dd9753 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/renote-mute/list.ts @@ -0,0 +1,46 @@ +import { RenoteMutings } from "@/models/index.js"; +import define from "../../define.js"; +import { makePaginationQuery } from "../../common/make-pagination-query.js"; + +export const meta = { + tags: ["account"], + + requireCredential: true, + + kind: "read:mutes", + + res: { + type: "array", + optional: false, + nullable: false, + items: { + type: "object", + optional: false, + nullable: false, + ref: "RenoteMuting", + }, + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + limit: { type: "integer", minimum: 1, maximum: 100, default: 30 }, + sinceId: { type: "string", format: "misskey:id" }, + untilId: { type: "string", format: "misskey:id" }, + }, + required: [], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, me) => { + const query = makePaginationQuery( + RenoteMutings.createQueryBuilder("muting"), + ps.sinceId, + ps.untilId, + ).andWhere("muting.muterId = :meId", { meId: me.id }); + + const mutings = await query.take(ps.limit).getMany(); + + return await RenoteMutings.packMany(mutings, me); +}); diff --git a/packages/backend/src/server/api/endpoints/reset-password.ts b/packages/backend/src/server/api/endpoints/reset-password.ts index 51755727a3..f695ae41f1 100644 --- a/packages/backend/src/server/api/endpoints/reset-password.ts +++ b/packages/backend/src/server/api/endpoints/reset-password.ts @@ -1,8 +1,8 @@ -import bcrypt from "bcryptjs"; import { publishMainStream } from "@/services/stream.js"; import { Users, UserProfiles, PasswordResetRequests } from "@/models/index.js"; import define from "../define.js"; import { ApiError } from "../error.js"; +import { hashPassword } from "@/misc/password.js"; export const meta = { tags: ["reset password"], @@ -34,8 +34,7 @@ export default define(meta, paramDef, async (ps, user) => { } // Generate hash of password - const salt = await bcrypt.genSalt(8); - const hash = await bcrypt.hash(ps.password, salt); + const hash = await hashPassword(ps.password); await UserProfiles.update(req.userId, { password: hash, diff --git a/packages/backend/src/server/api/endpoints/sw/register.ts b/packages/backend/src/server/api/endpoints/sw/register.ts index 7218b0d50a..42a35fb685 100644 --- a/packages/backend/src/server/api/endpoints/sw/register.ts +++ b/packages/backend/src/server/api/endpoints/sw/register.ts @@ -26,6 +26,21 @@ export const meta = { optional: false, nullable: true, }, + userId: { + type: "string", + optional: false, + nullable: false, + }, + endpoint: { + type: "string", + optional: false, + nullable: false, + }, + sendReadMessage: { + type: "boolean", + optional: false, + nullable: false, + }, }, }, } as const; @@ -36,14 +51,15 @@ export const paramDef = { endpoint: { type: "string" }, auth: { type: "string" }, publickey: { type: "string" }, + sendReadMessage: { type: "boolean", default: false }, }, required: ["endpoint", "auth", "publickey"], } as const; -export default define(meta, paramDef, async (ps, user) => { +export default define(meta, paramDef, async (ps, me) => { // if already subscribed const exist = await SwSubscriptions.findOneBy({ - userId: user.id, + userId: me.id, endpoint: ps.endpoint, auth: ps.auth, publickey: ps.publickey, @@ -55,20 +71,27 @@ export default define(meta, paramDef, async (ps, user) => { return { state: "already-subscribed" as const, key: instance.swPublicKey, + userId: me.id, + endpoint: exist.endpoint, + sendReadMessage: exist.sendReadMessage, }; } await SwSubscriptions.insert({ id: genId(), createdAt: new Date(), - userId: user.id, + userId: me.id, endpoint: ps.endpoint, auth: ps.auth, publickey: ps.publickey, + sendReadMessage: ps.sendReadMessage, }); return { state: "subscribed" as const, key: instance.swPublicKey, + userId: me.id, + endpoint: ps.endpoint, + sendReadMessage: ps.sendReadMessage, }; }); diff --git a/packages/backend/src/server/api/endpoints/sw/show-registration.ts b/packages/backend/src/server/api/endpoints/sw/show-registration.ts new file mode 100644 index 0000000000..c7a9609cff --- /dev/null +++ b/packages/backend/src/server/api/endpoints/sw/show-registration.ts @@ -0,0 +1,59 @@ +import { SwSubscriptions } from "@/models/index.js"; +import define from "../../define.js"; + +export const meta = { + tags: ["account"], + + requireCredential: true, + + description: "Check push notification registration exists.", + + res: { + type: "object", + optional: false, + nullable: true, + properties: { + userId: { + type: "string", + optional: false, + nullable: false, + }, + endpoint: { + type: "string", + optional: false, + nullable: false, + }, + sendReadMessage: { + type: "boolean", + optional: false, + nullable: false, + }, + }, + }, +} as const; + +export const paramDef = { + type: "object", + properties: { + endpoint: { type: "string" }, + }, + required: ["endpoint"], +} as const; + +// eslint-disable-next-line import/no-default-export +export default define(meta, paramDef, async (ps, me) => { + const exist = await SwSubscriptions.findOneBy({ + userId: me.id, + endpoint: ps.endpoint, + }); + + if (exist != null) { + return { + userId: exist.userId, + endpoint: exist.endpoint, + sendReadMessage: exist.sendReadMessage, + }; + } + + return null; +}); diff --git a/packages/backend/src/server/api/endpoints/sw/unregister.ts b/packages/backend/src/server/api/endpoints/sw/unregister.ts index b025630e4b..e2a40f51cb 100644 --- a/packages/backend/src/server/api/endpoints/sw/unregister.ts +++ b/packages/backend/src/server/api/endpoints/sw/unregister.ts @@ -4,7 +4,7 @@ import define from "../../define.js"; export const meta = { tags: ["account"], - requireCredential: true, + requireCredential: false, description: "Unregister from receiving push notifications.", } as const; @@ -17,9 +17,9 @@ export const paramDef = { required: ["endpoint"], } as const; -export default define(meta, paramDef, async (ps, user) => { +export default define(meta, paramDef, async (ps, me) => { await SwSubscriptions.delete({ - userId: user.id, + ...(me ? { userId: me.id } : {}), endpoint: ps.endpoint, }); }); diff --git a/packages/backend/src/server/api/endpoints/sw/update-registration.ts b/packages/backend/src/server/api/endpoints/sw/update-registration.ts new file mode 100644 index 0000000000..5ba53ee8a7 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/sw/update-registration.ts @@ -0,0 +1,44 @@ +import { SwSubscriptions } from "@/models/index.js"; +import define from "../../define.js"; + +export const meta = { + tags: ["account"], + + requireCredential: true, + + description: "Unregister from receiving push notifications.", +} as const; + +export const paramDef = { + type: "object", + properties: { + endpoint: { type: "string" }, + sendReadMessage: { type: "boolean" }, + }, + required: ["endpoint"], +} as const; + +export default define(meta, paramDef, async (ps, me) => { + const swSubscription = await SwSubscriptions.findOneBy({ + userId: me.id, + endpoint: ps.endpoint, + }); + + if (swSubscription === null) { + throw new Error("No such registration"); + } + + if (ps.sendReadMessage !== undefined) { + swSubscription.sendReadMessage = ps.sendReadMessage; + } + + await SwSubscriptions.update(swSubscription.id, { + sendReadMessage: swSubscription.sendReadMessage, + }); + + return { + userId: swSubscription.userId, + endpoint: swSubscription.endpoint, + sendReadMessage: swSubscription.sendReadMessage, + }; +}); diff --git a/packages/backend/src/server/api/endpoints/username/available.ts b/packages/backend/src/server/api/endpoints/username/available.ts index f5aa4ed1ea..6fa09ba369 100644 --- a/packages/backend/src/server/api/endpoints/username/available.ts +++ b/packages/backend/src/server/api/endpoints/username/available.ts @@ -1,5 +1,6 @@ import { IsNull } from "typeorm"; import { Users, UsedUsernames } from "@/models/index.js"; +import config from "@/config/index.js"; import define from "../../define.js"; export const meta = { @@ -40,7 +41,11 @@ export default define(meta, paramDef, async (ps) => { username: ps.username.toLowerCase(), }); + const reserved = config.reservedUsernames?.includes( + ps.username.toLowerCase(), + ); + return { - available: exist === 0 && exist2 === 0, + available: exist === 0 && exist2 === 0 && !reserved, }; }); diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 967379d0c4..37d69b048b 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -37,6 +37,11 @@ export const meta = { code: "FORBIDDEN", id: "f6cdb0df-c19f-ec5c-7dbb-0ba84a1f92ba", }, + cannot_find: { + message: "Cannot find the following.", + code: "CANNOT_FIND", + id: "7a55f0d7-8e06-4a7e-9c77-ee7d59b25a82", + }, }, } as const; @@ -97,7 +102,7 @@ export default define(meta, paramDef, async (ps, me) => { followerId: me.id, }); if (following == null) { - throw new ApiError(meta.errors.forbidden); + throw new ApiError(meta.errors.cannot_find); } } } diff --git a/packages/backend/src/server/api/endpoints/users/relation.ts b/packages/backend/src/server/api/endpoints/users/relation.ts index 01f39396de..5580eaea0b 100644 --- a/packages/backend/src/server/api/endpoints/users/relation.ts +++ b/packages/backend/src/server/api/endpoints/users/relation.ts @@ -57,6 +57,11 @@ export const meta = { optional: false, nullable: false, }, + isRenoteMuted: { + type: "boolean", + optional: false, + nullable: false, + }, }, }, { @@ -107,6 +112,11 @@ export const meta = { optional: false, nullable: false, }, + isRenoteMuted: { + type: "boolean", + optional: false, + nullable: false, + }, }, }, }, diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts index 6d02ad0ab5..06b3ea4efa 100644 --- a/packages/backend/src/server/api/index.ts +++ b/packages/backend/src/server/api/index.ts @@ -7,19 +7,31 @@ import Router from "@koa/router"; import multer from "@koa/multer"; import bodyParser from "koa-bodyparser"; import cors from "@koa/cors"; -import { apiMastodonCompatible } from "./mastodon/ApiMastodonCompatibleService.js"; +import { + apiMastodonCompatible, + getClient, +} from "./mastodon/ApiMastodonCompatibleService.js"; import { Instances, AccessTokens, Users } from "@/models/index.js"; import config from "@/config/index.js"; +import fs from "fs"; import endpoints from "./endpoints.js"; import compatibility from "./compatibility.js"; import handler from "./api-handler.js"; import signup from "./private/signup.js"; import signin from "./private/signin.js"; import signupPending from "./private/signup-pending.js"; +import verifyEmail from "./private/verify-email.js"; import discord from "./service/discord.js"; import github from "./service/github.js"; import twitter from "./service/twitter.js"; import { koaBody } from "koa-body"; +import { + convertId, + IdConvertType as IdType, +} from "../../../native-utils/built/index.js"; + +// re-export native rust id conversion (function and enum) +export { IdType, convertId }; // Init app const app = new Koa(); @@ -39,6 +51,7 @@ app.use(async (ctx, next) => { // Init router const router = new Router(); const mastoRouter = new Router(); +const mastoFileRouter = new Router(); const errorRouter = new Router(); // Init multer instance @@ -68,6 +81,56 @@ mastoRouter.use( }), ); +mastoFileRouter.post("/v1/media", upload.single("file"), async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + let multipartData = await ctx.file; + if (!multipartData) { + ctx.body = { error: "No image" }; + ctx.status = 401; + return; + } + const data = await client.uploadMedia(multipartData); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } +}); +mastoFileRouter.post("/v2/media", upload.single("file"), async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + let multipartData = await ctx.file; + if (!multipartData) { + ctx.body = { error: "No image" }; + ctx.status = 401; + return; + } + const data = await client.uploadMedia(multipartData); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } +}); + +mastoRouter.use(async (ctx, next) => { + if (ctx.request.query) { + if (!ctx.request.body || Object.keys(ctx.request.body).length === 0) { + ctx.request.body = ctx.request.query; + } else { + ctx.request.body = { ...ctx.request.body, ...ctx.request.query }; + } + } + await next(); +}); + apiMastodonCompatible(mastoRouter); /** @@ -115,6 +178,7 @@ for (const endpoint of [...endpoints, ...compatibility]) { router.post("/signup", signup); router.post("/signin", signin); router.post("/signup-pending", signupPending); +router.post("/verify-email", verifyEmail); router.use(discord.routes()); router.use(github.routes()); @@ -159,7 +223,9 @@ errorRouter.all("(.*)", async (ctx) => { }); // Register router +app.use(mastoFileRouter.routes()); app.use(mastoRouter.routes()); +app.use(mastoRouter.allowedMethods()); app.use(router.routes()); app.use(errorRouter.routes()); diff --git a/packages/backend/src/server/api/mastodon/ApiMastodonCompatibleService.ts b/packages/backend/src/server/api/mastodon/ApiMastodonCompatibleService.ts index cc60a8db9b..e8dfe52812 100644 --- a/packages/backend/src/server/api/mastodon/ApiMastodonCompatibleService.ts +++ b/packages/backend/src/server/api/mastodon/ApiMastodonCompatibleService.ts @@ -54,7 +54,83 @@ export function apiMastodonCompatible(router: Router): void { // displayed without being logged in try { const data = await client.getInstance(); - ctx.body = getInstance(data.data); + ctx.body = await getInstance(data.data); + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + + router.get("/v1/announcements", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.request.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.getInstanceAnnouncements(); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + + router.post<{ Params: { id: string } }>( + "/v1/announcements/:id/dismiss", + async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.request.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.dismissInstanceAnnouncement(ctx.params.id); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }, + ); + + router.get("/v1/filters", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.request.headers.authorization; + const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt + // displayed without being logged in + try { + const data = await client.getFilters(); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + + router.get("/v1/trends", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.request.headers.authorization; + const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt + // displayed without being logged in + try { + const data = await client.getInstanceTrends(); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + + router.get("/v1/preferences", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.request.headers.authorization; + const client = getClient(BASE_URL, accessTokens); // we are using this here, because in private mode some info isnt + // displayed without being logged in + try { + const data = await client.getPreferences(); + ctx.body = data.data; } catch (e: any) { console.error(e); ctx.status = 401; diff --git a/packages/backend/src/server/api/mastodon/endpoints/account.ts b/packages/backend/src/server/api/mastodon/endpoints/account.ts index ebe6dd2ddb..7490581937 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/account.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/account.ts @@ -1,8 +1,12 @@ +import { Users } from "@/models/index.js"; +import { resolveUser } from "@/remote/resolve-user.js"; import Router from "@koa/router"; +import { FindOptionsWhere, IsNull } from "typeorm"; import { getClient } from "../ApiMastodonCompatibleService.js"; -import { toLimitToInt } from "./timeline.js"; +import { argsToBools, limitToInt } from "./timeline.js"; +import { convertId, IdType } from "../../index.js"; -const relationshopModel = { +const relationshipModel = { id: "", following: false, followed_by: false, @@ -26,12 +30,14 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); try { const data = await client.verifyAccountCredentials(); - const acct = data.data; + let acct = data.data; + acct.id = convertId(acct.id, IdType.MastodonId); + acct.display_name = acct.display_name || acct.username; acct.url = `${BASE_URL}/@${acct.url}`; - acct.note = ""; + acct.note = acct.note || ""; acct.avatar_static = acct.avatar; - acct.header = acct.header || ""; - acct.header_static = acct.header || ""; + acct.header = acct.header || "https://http.cat/404"; + acct.header_static = acct.header || "https://http.cat/404"; acct.source = { note: acct.note, fields: acct.fields, @@ -39,6 +45,7 @@ export function apiAccountMastodon(router: Router): void { sensitive: false, language: "", }; + console.log(acct); ctx.body = acct; } catch (e: any) { console.error(e); @@ -55,7 +62,9 @@ export function apiAccountMastodon(router: Router): void { const data = await client.updateCredentials( (ctx.request as any).body as any, ); - ctx.body = data.data; + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -68,10 +77,13 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getAccount( - `@${(ctx.query.acct || "").toString()}`, + const data = await client.search( + (ctx.request.query as any).acct, + "accounts", ); - ctx.body = data.data; + let resp = data.data.accounts[0]; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -79,13 +91,54 @@ export function apiAccountMastodon(router: Router): void { ctx.body = e.response.data; } }); + router.get("/v1/accounts/relationships", async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + let users; + try { + // TODO: this should be body + let ids = ctx.request.query ? ctx.request.query["id[]"] : null; + if (typeof ids === "string") { + ids = [ids]; + } + users = ids; + relationshipModel.id = ids?.toString() || "1"; + if (!ids) { + ctx.body = [relationshipModel]; + return; + } + + let reqIds = []; + for (let i = 0; i < ids.length; i++) { + reqIds.push(convertId(ids[i], IdType.CalckeyId)); + } + + const data = await client.getRelationships(reqIds); + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; + } catch (e: any) { + console.error(e); + let data = e.response.data; + data.users = users; + console.error(data); + ctx.status = 401; + ctx.body = data; + } + }); router.get<{ Params: { id: string } }>("/v1/accounts/:id", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getAccount(ctx.params.id); - ctx.body = data.data; + const calcId = convertId(ctx.params.id, IdType.CalckeyId); + const data = await client.getAccount(calcId); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -101,10 +154,28 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); try { const data = await client.getAccountStatuses( - ctx.params.id, - toLimitToInt(ctx.query as any), + convertId(ctx.params.id, IdType.CalckeyId), + argsToBools(limitToInt(ctx.query as any)), ); - ctx.body = data.data; + let resp = data.data; + for (let statIdx = 0; statIdx < resp.length; statIdx++) { + resp[statIdx].id = convertId(resp[statIdx].id, IdType.MastodonId); + resp[statIdx].in_reply_to_account_id = resp[statIdx] + .in_reply_to_account_id + ? convertId(resp[statIdx].in_reply_to_account_id, IdType.MastodonId) + : null; + resp[statIdx].in_reply_to_id = resp[statIdx].in_reply_to_id + ? convertId(resp[statIdx].in_reply_to_id, IdType.MastodonId) + : null; + let mentions = resp[statIdx].mentions; + for (let mtnIdx = 0; mtnIdx < mentions.length; mtnIdx++) { + resp[statIdx].mentions[mtnIdx].id = convertId( + mentions[mtnIdx].id, + IdType.MastodonId, + ); + } + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -121,10 +192,14 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); try { const data = await client.getAccountFollowers( - ctx.params.id, - ctx.query as any, + convertId(ctx.params.id, IdType.CalckeyId), + limitToInt(ctx.query as any), ); - ctx.body = data.data; + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -141,10 +216,14 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); try { const data = await client.getAccountFollowing( - ctx.params.id, - ctx.query as any, + convertId(ctx.params.id, IdType.CalckeyId), + limitToInt(ctx.query as any), ); - ctx.body = data.data; + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -177,10 +256,13 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.followAccount(ctx.params.id); - const acct = data.data; + const data = await client.followAccount( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let acct = data.data; acct.following = true; - ctx.body = data.data; + acct.id = convertId(acct.id, IdType.MastodonId); + ctx.body = acct; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -196,10 +278,13 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.unfollowAccount(ctx.params.id); - const acct = data.data; + const data = await client.unfollowAccount( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let acct = data.data; + acct.id = convertId(acct.id, IdType.MastodonId); acct.following = false; - ctx.body = data.data; + ctx.body = acct; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -215,8 +300,12 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.blockAccount(ctx.params.id); - ctx.body = data.data; + const data = await client.blockAccount( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -232,8 +321,12 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.unblockAccount(ctx.params.id); - ctx.body = data.data; + const data = await client.unblockAccount( + convertId(ctx.params.id, IdType.MastodonId), + ); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -250,10 +343,12 @@ export function apiAccountMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); try { const data = await client.muteAccount( - ctx.params.id, + convertId(ctx.params.id, IdType.CalckeyId), (ctx.request as any).body as any, ); - ctx.body = data.data; + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -269,8 +364,12 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.unmuteAccount(ctx.params.id); - ctx.body = data.data; + const data = await client.unmuteAccount( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -279,31 +378,33 @@ export function apiAccountMastodon(router: Router): void { } }, ); - router.get("/v1/accounts/relationships", async (ctx) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const idsRaw = (ctx.query as any)["id[]"]; - const ids = typeof idsRaw === "string" ? [idsRaw] : idsRaw; - relationshopModel.id = idsRaw || "1"; - if (!idsRaw) return [relationshopModel]; - const data = (await client.getRelationships(ids)) as any; - ctx.body = data.data; - } catch (e: any) { - console.error(e); - console.error(e.response.data); - ctx.status = 401; - ctx.body = e.response.data; - } - }); router.get("/v1/bookmarks", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = (await client.getBookmarks(ctx.query as any)) as any; - ctx.body = data.data; + const data = (await client.getBookmarks( + limitToInt(ctx.query as any), + )) as any; + let resp = data.data; + for (let statIdx = 0; statIdx < resp.length; statIdx++) { + resp[statIdx].id = convertId(resp[statIdx].id, IdType.MastodonId); + resp[statIdx].in_reply_to_account_id = resp[statIdx] + .in_reply_to_account_id + ? convertId(resp[statIdx].in_reply_to_account_id, IdType.MastodonId) + : null; + resp[statIdx].in_reply_to_id = resp[statIdx].in_reply_to_id + ? convertId(resp[statIdx].in_reply_to_id, IdType.MastodonId) + : null; + let mentions = resp[statIdx].mentions; + for (let mtnIdx = 0; mtnIdx < mentions.length; mtnIdx++) { + resp[statIdx].mentions[mtnIdx].id = convertId( + mentions[mtnIdx].id, + IdType.MastodonId, + ); + } + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -316,8 +417,26 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getFavourites(ctx.query as any); - ctx.body = data.data; + const data = await client.getFavourites(limitToInt(ctx.query as any)); + let resp = data.data; + for (let statIdx = 0; statIdx < resp.length; statIdx++) { + resp[statIdx].id = convertId(resp[statIdx].id, IdType.MastodonId); + resp[statIdx].in_reply_to_account_id = resp[statIdx] + .in_reply_to_account_id + ? convertId(resp[statIdx].in_reply_to_account_id, IdType.MastodonId) + : null; + resp[statIdx].in_reply_to_id = resp[statIdx].in_reply_to_id + ? convertId(resp[statIdx].in_reply_to_id, IdType.MastodonId) + : null; + let mentions = resp[statIdx].mentions; + for (let mtnIdx = 0; mtnIdx < mentions.length; mtnIdx++) { + resp[statIdx].mentions[mtnIdx].id = convertId( + mentions[mtnIdx].id, + IdType.MastodonId, + ); + } + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -330,8 +449,12 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getMutes(ctx.query as any); - ctx.body = data.data; + const data = await client.getMutes(limitToInt(ctx.query as any)); + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -344,8 +467,12 @@ export function apiAccountMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getBlocks(ctx.query as any); - ctx.body = data.data; + const data = await client.getBlocks(limitToInt(ctx.query as any)); + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -353,7 +480,7 @@ export function apiAccountMastodon(router: Router): void { ctx.body = e.response.data; } }); - router.get("/v1/follow_ctxs", async (ctx) => { + router.get("/v1/follow_requests", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -361,7 +488,11 @@ export function apiAccountMastodon(router: Router): void { const data = await client.getFollowRequests( ((ctx.query as any) || { limit: 20 }).limit, ); - ctx.body = data.data; + let resp = data.data; + for (let acctIdx = 0; acctIdx < resp.length; acctIdx++) { + resp[acctIdx].id = convertId(resp[acctIdx].id, IdType.MastodonId); + } + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -370,14 +501,18 @@ export function apiAccountMastodon(router: Router): void { } }); router.post<{ Params: { id: string } }>( - "/v1/follow_ctxs/:id/authorize", + "/v1/follow_requests/:id/authorize", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.acceptFollowRequest(ctx.params.id); - ctx.body = data.data; + const data = await client.acceptFollowRequest( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); @@ -387,14 +522,18 @@ export function apiAccountMastodon(router: Router): void { }, ); router.post<{ Params: { id: string } }>( - "/v1/follow_ctxs/:id/reject", + "/v1/follow_requests/:id/reject", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.rejectFollowRequest(ctx.params.id); - ctx.body = data.data; + const data = await client.rejectFollowRequest( + convertId(ctx.params.id, IdType.CalckeyId), + ); + let resp = data.data; + resp.id = convertId(resp.id, IdType.MastodonId); + ctx.body = resp; } catch (e: any) { console.error(e); console.error(e.response.data); diff --git a/packages/backend/src/server/api/mastodon/endpoints/auth.ts b/packages/backend/src/server/api/mastodon/endpoints/auth.ts index 5d10641fb2..e2cfc47aff 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/auth.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/auth.ts @@ -44,12 +44,10 @@ const writeScope = [ export function apiAuthMastodon(router: Router): void { router.post("/v1/apps", async (ctx) => { const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; - const accessTokens = ctx.request.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - const body: any = ctx.request.body; + const client = getClient(BASE_URL, ""); + const body: any = ctx.request.body || ctx.request.query; try { let scope = body.scopes; - console.log(body); if (typeof scope === "string") scope = scope.split(" "); const pushScope = new Set(); for (const s of scope) { @@ -64,14 +62,16 @@ export function apiAuthMastodon(router: Router): void { redirect_uris: red, website: body.website, }); - ctx.body = { - id: appData.id, + const returns = { + id: Math.floor(Math.random() * 100).toString(), name: appData.name, - website: appData.website, + website: body.website, redirect_uri: red, client_id: Buffer.from(appData.url || "").toString("base64"), client_secret: appData.clientSecret, }; + console.log(returns); + ctx.body = returns; } catch (e: any) { console.error(e); ctx.status = 401; diff --git a/packages/backend/src/server/api/mastodon/endpoints/meta.ts b/packages/backend/src/server/api/mastodon/endpoints/meta.ts index a67edc5b2f..d362d1b9e5 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/meta.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/meta.ts @@ -1,18 +1,32 @@ import { Entity } from "@calckey/megalodon"; +import { fetchMeta } from "@/misc/fetch-meta.js"; +import { Users, Notes } from "@/models/index.js"; +import { IsNull, MoreThan } from "typeorm"; + // TODO: add calckey features -export function getInstance(response: Entity.Instance) { +export async function getInstance(response: Entity.Instance) { + const meta = await fetchMeta(true); + const totalUsers = Users.count({ where: { host: IsNull() } }); + const totalStatuses = Notes.count({ where: { userHost: IsNull() } }); return { uri: response.uri, - title: response.title || "", - short_description: response.description || "", - description: response.description || "", + title: response.title || "Calckey", + short_description: + response.description.substring(0, 50) || "See real server website", + description: + response.description || + "This is a vanilla Calckey Instance. It doesnt seem to have a description. BTW you are using the Mastodon api to access this server :)", email: response.email || "", - version: "3.0.0 compatible (Calckey)", + version: "3.0.0 compatible (3.5+ Calckey)", //I hope this version string is correct, we will need to test it. urls: response.urls, - stats: response.stats, - thumbnail: response.thumbnail || "", - languages: ["en", "de", "ja"], - registrations: response.registrations, + stats: { + user_count: await totalUsers, + status_count: await totalStatuses, + domain_count: response.stats.domain_count, + }, + thumbnail: response.thumbnail || "https://http.cat/404", + languages: meta.langs, + registrations: !meta.disableRegistration || response.registrations, approval_required: !response.registrations, invites_enabled: response.registrations, configuration: { @@ -77,17 +91,17 @@ export function getInstance(response: Entity.Instance) { bot: true, discoverable: false, group: false, - created_at: "1971-01-01T00:00:00.000Z", - note: "", - url: "https://http.cat/404", - avatar: "https://http.cat/404", - avatar_static: "https://http.cat/404", + created_at: new Date().toISOString(), + note: "

Please refer to the original instance for the actual admin contact.

", + url: `${response.uri}/`, + avatar: `${response.uri}/static-assets/badges/info.png`, + avatar_static: `${response.uri}/static-assets/badges/info.png`, header: "https://http.cat/404", header_static: "https://http.cat/404", followers_count: -1, following_count: 0, statuses_count: 0, - last_status_at: "1971-01-01T00:00:00.000Z", + last_status_at: new Date().toISOString(), noindex: true, emojis: [], fields: [], diff --git a/packages/backend/src/server/api/mastodon/endpoints/search.ts b/packages/backend/src/server/api/mastodon/endpoints/search.ts index c8ca1f0504..e4990811ae 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/search.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/search.ts @@ -1,6 +1,9 @@ import megalodon, { MegalodonInterface } from "@calckey/megalodon"; import Router from "@koa/router"; import { getClient } from "../ApiMastodonCompatibleService.js"; +import axios from "axios"; +import { Converter } from "@calckey/megalodon"; +import { limitToInt } from "./timeline.js"; export function apiSearchMastodon(router: Router): void { router.get("/v1/search", async (ctx) => { @@ -9,7 +12,7 @@ export function apiSearchMastodon(router: Router): void { const client = getClient(BASE_URL, accessTokens); const body: any = ctx.request.body; try { - const query: any = ctx.query; + const query: any = limitToInt(ctx.query); const type = query.type || ""; const data = await client.search(query.q, type, query); ctx.body = data.data; @@ -19,4 +22,114 @@ export function apiSearchMastodon(router: Router): void { ctx.body = e.response.data; } }); + router.get("/v2/search", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const query: any = limitToInt(ctx.query); + const type = query.type; + if (type) { + const data = await client.search(query.q, type, query); + ctx.body = data.data; + } else { + const acct = await client.search(query.q, "accounts", query); + const stat = await client.search(query.q, "statuses", query); + const tags = await client.search(query.q, "hashtags", query); + ctx.body = { + accounts: acct.data.accounts, + statuses: stat.data.statuses, + hashtags: tags.data.hashtags, + }; + } + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + router.get("/v1/trends/statuses", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.headers.authorization; + try { + const data = await getHighlight( + BASE_URL, + ctx.request.hostname, + accessTokens, + ); + ctx.body = data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + router.get("/v2/suggestions", async (ctx) => { + const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; + const accessTokens = ctx.headers.authorization; + try { + const query: any = ctx.query; + const data = await getFeaturedUser( + BASE_URL, + ctx.request.hostname, + accessTokens, + query.limit || 20, + ); + console.log(data); + ctx.body = data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); +} +async function getHighlight( + BASE_URL: string, + domain: string, + accessTokens: string | undefined, +) { + const accessTokenArr = accessTokens?.split(" ") ?? [null]; + const accessToken = accessTokenArr[accessTokenArr.length - 1]; + try { + const api = await axios.post(`${BASE_URL}/api/notes/featured`, { + i: accessToken, + }); + const data: MisskeyEntity.Note[] = api.data; + return data.map((note) => Converter.note(note, domain)); + } catch (e: any) { + console.log(e); + console.log(e.response.data); + return []; + } +} +async function getFeaturedUser( + BASE_URL: string, + host: string, + accessTokens: string | undefined, + limit: number, +) { + const accessTokenArr = accessTokens?.split(" ") ?? [null]; + const accessToken = accessTokenArr[accessTokenArr.length - 1]; + try { + const api = await axios.post(`${BASE_URL}/api/users`, { + i: accessToken, + limit, + origin: "local", + sort: "+follower", + state: "alive", + }); + const data: MisskeyEntity.UserDetail[] = api.data; + console.log(data); + return data.map((u) => { + return { + source: "past_interactions", + account: Converter.userDetail(u, host), + }; + }); + } catch (e: any) { + console.log(e); + console.log(e.response.data); + return []; + } } diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 2be79c73a7..f7589569c9 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -1,23 +1,31 @@ import Router from "@koa/router"; -import megalodon, { MegalodonInterface } from "@calckey/megalodon"; import { getClient } from "../ApiMastodonCompatibleService.js"; -import fs from "fs"; -import { pipeline } from "node:stream"; -import { promisify } from "node:util"; -import { createTemp } from "@/misc/create-temp.js"; -import { emojiRegex, emojiRegexAtStartToEnd } from "@/misc/emoji-regex.js"; +import { emojiRegexAtStartToEnd } from "@/misc/emoji-regex.js"; import axios from "axios"; -const pump = promisify(pipeline); +import querystring from "node:querystring"; +import qs from "qs"; +import { limitToInt } from "./timeline.js"; + +function normalizeQuery(data: any) { + const str = querystring.stringify(data); + return qs.parse(str); +} export function apiStatusMastodon(router: Router): void { - router.post("/v1/statuses", async (ctx, reply) => { + router.post("/v1/statuses", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const body: any = ctx.request.body; + let body: any = ctx.request.body; + if ( + (!body.poll && body["poll[options][]"]) || + (!body.media_ids && body["media_ids[]"]) + ) { + body = normalizeQuery(body); + } const text = body.status; - const removed = text.replace(/@\S+/g, "").replaceAll(" ", ""); + const removed = text.replace(/@\S+/g, "").replace(/\s|​/g, ""); const isDefaultEmoji = emojiRegexAtStartToEnd.test(removed); const isCustomEmoji = /^:[a-zA-Z0-9@_]+:$/.test(removed); if ((body.in_reply_to_id && isDefaultEmoji) || isCustomEmoji) { @@ -42,6 +50,9 @@ export function apiStatusMastodon(router: Router): void { } if (!body.media_ids) body.media_ids = undefined; if (body.media_ids && !body.media_ids.length) body.media_ids = undefined; + const { sensitive } = body; + body.sensitive = + typeof sensitive === "string" ? sensitive === "true" : sensitive; const data = await client.postStatus(text, body); ctx.body = data.data; } catch (e: any) { @@ -50,38 +61,32 @@ export function apiStatusMastodon(router: Router): void { ctx.body = e.response.data; } }); - router.get<{ Params: { id: string } }>( - "/v1/statuses/:id", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.getStatus(ctx.params.id); - ctx.body = data.data; - } catch (e: any) { - console.error(e); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); - router.delete<{ Params: { id: string } }>( - "/v1/statuses/:id", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.deleteStatus(ctx.params.id); - ctx.body = data.data; - } catch (e: any) { - console.error(e); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); + router.get<{ Params: { id: string } }>("/v1/statuses/:id", async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.getStatus(ctx.params.id); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + router.delete<{ Params: { id: string } }>("/v1/statuses/:id", async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.deleteStatus(ctx.params.id); + ctx.body = data.data; + } catch (e: any) { + console.error(e.response.data, request.params.id); + ctx.status = 401; + ctx.body = e.response.data; + } + }); interface IReaction { id: string; createdAt: string; @@ -90,15 +95,23 @@ export function apiStatusMastodon(router: Router): void { } router.get<{ Params: { id: string } }>( "/v1/statuses/:id/context", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { const id = ctx.params.id; - const data = await client.getStatusContext(id, ctx.query as any); + const data = await client.getStatusContext( + id, + limitToInt(ctx.query as any), + ); const status = await client.getStatus(id); - const reactionsAxios = await axios.get( + let reqInstance = axios.create({ + headers: { + Authorization: ctx.headers.authorization, + }, + }); + const reactionsAxios = await reqInstance.get( `${BASE_URL}/api/notes/reactions?noteId=${id}`, ); const reactions: IReaction[] = reactionsAxios.data; @@ -123,7 +136,7 @@ export function apiStatusMastodon(router: Router): void { ); router.get<{ Params: { id: string } }>( "/v1/statuses/:id/reblogged_by", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -139,13 +152,13 @@ export function apiStatusMastodon(router: Router): void { ); router.get<{ Params: { id: string } }>( "/v1/statuses/:id/favourited_by", - async (ctx, reply) => { + async (ctx) => { ctx.body = []; }, ); router.post<{ Params: { id: string } }>( "/v1/statuses/:id/favourite", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -167,7 +180,7 @@ export function apiStatusMastodon(router: Router): void { ); router.post<{ Params: { id: string } }>( "/v1/statuses/:id/unfavourite", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -185,7 +198,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/reblog", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -202,7 +215,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/unreblog", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -219,7 +232,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/bookmark", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -236,7 +249,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/unbookmark", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -253,7 +266,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/pin", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -270,7 +283,7 @@ export function apiStatusMastodon(router: Router): void { router.post<{ Params: { id: string } }>( "/v1/statuses/:id/unpin", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -284,20 +297,12 @@ export function apiStatusMastodon(router: Router): void { } }, ); - router.post("/v1/media", async (ctx, reply) => { + router.get<{ Params: { id: string } }>("/v1/media/:id", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const multipartData = await ctx.file; - if (!multipartData) { - ctx.body = { error: "No image" }; - return; - } - const [path] = await createTemp(); - await pump(multipartData.buffer, fs.createWriteStream(path)); - const image = fs.readFileSync(path); - const data = await client.uploadMedia(image); + const data = await client.getMedia(ctx.params.id); ctx.body = data.data; } catch (e: any) { console.error(e); @@ -305,20 +310,28 @@ export function apiStatusMastodon(router: Router): void { ctx.body = e.response.data; } }); - router.post("/v2/media", async (ctx, reply) => { + router.put<{ Params: { id: string } }>("/v1/media/:id", async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const multipartData = await ctx.file; - if (!multipartData) { - ctx.body = { error: "No image" }; - return; - } - const [path] = await createTemp(); - await pump(multipartData.buffer, fs.createWriteStream(path)); - const image = fs.readFileSync(path); - const data = await client.uploadMedia(image); + const data = await client.updateMedia( + ctx.params.id, + ctx.request.body as any, + ); + ctx.body = data.data; + } catch (e: any) { + console.error(e); + ctx.status = 401; + ctx.body = e.response.data; + } + }); + router.get<{ Params: { id: string } }>("/v1/polls/:id", async (ctx) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.getPoll(ctx.params.id); ctx.body = data.data; } catch (e: any) { console.error(e); @@ -326,60 +339,9 @@ export function apiStatusMastodon(router: Router): void { ctx.body = e.response.data; } }); - router.get<{ Params: { id: string } }>( - "/v1/media/:id", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.getMedia(ctx.params.id); - ctx.body = data.data; - } catch (e: any) { - console.error(e); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); - router.put<{ Params: { id: string } }>( - "/v1/media/:id", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.updateMedia( - ctx.params.id, - ctx.request.body as any, - ); - ctx.body = data.data; - } catch (e: any) { - console.error(e); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); - router.get<{ Params: { id: string } }>( - "/v1/polls/:id", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.getPoll(ctx.params.id); - ctx.body = data.data; - } catch (e: any) { - console.error(e); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); router.post<{ Params: { id: string } }>( "/v1/polls/:id/votes", - async (ctx, reply) => { + async (ctx) => { const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); @@ -404,7 +366,7 @@ async function getFirstReaction( ) { const accessTokenArr = accessTokens?.split(" ") ?? [null]; const accessToken = accessTokenArr[accessTokenArr.length - 1]; - let react = "👍"; + let react = "⭐"; try { const api = await axios.post(`${BASE_URL}/api/i/registry/get-unsecure`, { scope: ["client", "base"], @@ -412,7 +374,7 @@ async function getFirstReaction( i: accessToken, }); const reactRaw = api.data; - react = Array.isArray(reactRaw) ? api.data[0] : "👍"; + react = Array.isArray(reactRaw) ? api.data[0] : "⭐"; console.log(api.data); return react; } catch (e) { @@ -426,16 +388,16 @@ export function statusModel( emojis: MastodonEntity.Emoji[], content: string, ) { - const now = "1970-01-02T00:00:00.000Z"; + const now = new Date().toISOString(); return { id: "9atm5frjhb", uri: "https://http.cat/404", // "" url: "https://http.cat/404", // "", account: { id: "9arzuvv0sw", - username: "ReactionBot", - acct: "ReactionBot", - display_name: "ReactionsToThisPost", + username: "Reactions", + acct: "Reactions", + display_name: "Reactions to this post", locked: false, created_at: now, followers_count: 0, @@ -443,8 +405,8 @@ export function statusModel( statuses_count: 0, note: "", url: "https://http.cat/404", - avatar: "https://http.cat/404", - avatar_static: "https://http.cat/404", + avatar: "/static-assets/badges/info.png", + avatar_static: "/static-assets/badges/info.png", header: "https://http.cat/404", // "" header_static: "https://http.cat/404", // "" emojis: [], @@ -478,6 +440,6 @@ export function statusModel( pinned: false, emoji_reactions: [], bookmarked: false, - quote: false, + quote: null, }; } diff --git a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts index bb91a5604d..57e5d9bb02 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts @@ -5,22 +5,57 @@ import { statusModel } from "./status.js"; import Autolinker from "autolinker"; import { ParsedUrlQuery } from "querystring"; -export function toLimitToInt(q: ParsedUrlQuery) { +export function limitToInt(q: ParsedUrlQuery) { let object: any = q; if (q.limit) if (typeof q.limit === "string") object.limit = parseInt(q.limit, 10); + if (q.offset) + if (typeof q.offset === "string") object.offset = parseInt(q.offset, 10); + return object; +} + +export function argsToBools(q: ParsedUrlQuery) { + // Values taken from https://docs.joinmastodon.org/client/intro/#boolean + const toBoolean = (value: string) => + !["0", "f", "F", "false", "FALSE", "off", "OFF"].includes(value); + + let object: any = q; + if (q.only_media) + if (typeof q.only_media === "string") + object.only_media = toBoolean(q.only_media); + if (q.exclude_replies) + if (typeof q.exclude_replies === "string") + object.exclude_replies = toBoolean(q.exclude_replies); return q; } export function toTextWithReaction(status: Entity.Status[], host: string) { return status.map((t) => { if (!t) return statusModel(null, null, [], "no content"); + t.quote = null as any; if (!t.emoji_reactions) return t; if (t.reblog) t.reblog = toTextWithReaction([t.reblog], host)[0]; - const reactions = t.emoji_reactions.map( - (r) => `${r.name.replace("@.", "")} (${r.count}${r.me ? "* " : ""})`, - ); - //t.emojis = getEmoji(t.content, host) + const reactions = t.emoji_reactions.map((r) => { + const emojiNotation = r.url ? `:${r.name.replace("@.", "")}:` : r.name; + return `${emojiNotation} (${r.count}${r.me ? `* ` : ""})`; + }); + const reaction = t.emoji_reactions as Entity.Reaction[]; + const emoji = t.emojis || []; + for (const r of reaction) { + if (!r.url) continue; + emoji.push({ + shortcode: r.name, + url: r.url, + static_url: r.url, + visible_in_picker: true, + category: "", + }); + } + const isMe = reaction.findIndex((r) => r.me) > -1; + const total = reaction.reduce((sum, reaction) => sum + reaction.count, 0); + t.favourited = isMe; + t.favourites_count = total; + t.emojis = emoji; t.content = `

${autoLinker(t.content, host)}

${reactions.join( ", ", )}

`; @@ -62,8 +97,8 @@ export function apiTimelineMastodon(router: Router): void { try { const query: any = ctx.query; const data = query.local - ? await client.getLocalTimeline(toLimitToInt(query)) - : await client.getPublicTimeline(toLimitToInt(query)); + ? await client.getLocalTimeline(argsToBools(limitToInt(query))) + : await client.getPublicTimeline(argsToBools(limitToInt(query))); ctx.body = toTextWithReaction(data.data, ctx.hostname); } catch (e: any) { console.error(e); @@ -81,7 +116,7 @@ export function apiTimelineMastodon(router: Router): void { try { const data = await client.getTagTimeline( ctx.params.hashtag, - toLimitToInt(ctx.query), + argsToBools(limitToInt(ctx.query)), ); ctx.body = toTextWithReaction(data.data, ctx.hostname); } catch (e: any) { @@ -92,23 +127,20 @@ export function apiTimelineMastodon(router: Router): void { } }, ); - router.get<{ Params: { hashtag: string } }>( - "/v1/timelines/home", - async (ctx, reply) => { - const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; - const accessTokens = ctx.headers.authorization; - const client = getClient(BASE_URL, accessTokens); - try { - const data = await client.getHomeTimeline(toLimitToInt(ctx.query)); - ctx.body = toTextWithReaction(data.data, ctx.hostname); - } catch (e: any) { - console.error(e); - console.error(e.response.data); - ctx.status = 401; - ctx.body = e.response.data; - } - }, - ); + router.get("/v1/timelines/home", async (ctx, reply) => { + const BASE_URL = `${ctx.protocol}://${ctx.hostname}`; + const accessTokens = ctx.headers.authorization; + const client = getClient(BASE_URL, accessTokens); + try { + const data = await client.getHomeTimeline(limitToInt(ctx.query)); + ctx.body = toTextWithReaction(data.data, ctx.hostname); + } catch (e: any) { + console.error(e); + console.error(e.response.data); + ctx.status = 401; + ctx.body = e.response.data; + } + }); router.get<{ Params: { listId: string } }>( "/v1/timelines/list/:listId", async (ctx, reply) => { @@ -118,7 +150,7 @@ export function apiTimelineMastodon(router: Router): void { try { const data = await client.getListTimeline( ctx.params.listId, - toLimitToInt(ctx.query), + limitToInt(ctx.query), ); ctx.body = toTextWithReaction(data.data, ctx.hostname); } catch (e: any) { @@ -134,9 +166,7 @@ export function apiTimelineMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.getConversationTimeline( - toLimitToInt(ctx.query), - ); + const data = await client.getConversationTimeline(limitToInt(ctx.query)); ctx.body = data.data; } catch (e: any) { console.error(e); @@ -181,7 +211,7 @@ export function apiTimelineMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.createList((ctx.query as any).title); + const data = await client.createList((ctx.request.body as any).title); ctx.body = data.data; } catch (e: any) { console.error(e); @@ -197,7 +227,7 @@ export function apiTimelineMastodon(router: Router): void { const accessTokens = ctx.headers.authorization; const client = getClient(BASE_URL, accessTokens); try { - const data = await client.updateList(ctx.params.id, ctx.query as any); + const data = await client.updateList(ctx.params.id, (ctx.request.body as any).title); ctx.body = data.data; } catch (e: any) { console.error(e); diff --git a/packages/backend/src/server/api/private/signin.ts b/packages/backend/src/server/api/private/signin.ts index b06f47ed4c..ef5b137813 100644 --- a/packages/backend/src/server/api/private/signin.ts +++ b/packages/backend/src/server/api/private/signin.ts @@ -1,5 +1,4 @@ import type Koa from "koa"; -import bcrypt from "bcryptjs"; import * as speakeasy from "speakeasy"; import signin from "../common/signin.js"; import config from "@/config/index.js"; @@ -12,6 +11,11 @@ import { } from "@/models/index.js"; import type { ILocalUser } from "@/models/entities/user.js"; import { genId } from "@/misc/gen-id.js"; +import { + comparePassword, + hashPassword, + isOldAlgorithm, +} from "@/misc/password.js"; import { verifyLogin, hash } from "../2fa.js"; import { randomBytes } from "node:crypto"; import { IsNull } from "typeorm"; @@ -88,7 +92,12 @@ export default async (ctx: Koa.Context) => { const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); // Compare password - const same = await bcrypt.compare(password, profile.password!); + const same = await comparePassword(password, profile.password!); + + if (same && isOldAlgorithm(profile.password!)) { + profile.password = await hashPassword(password); + await UserProfiles.save(profile); + } async function fail(status?: number, failure?: { id: string }) { // Append signin history diff --git a/packages/backend/src/server/api/private/signup.ts b/packages/backend/src/server/api/private/signup.ts index dc5eb23168..d24a74c12a 100644 --- a/packages/backend/src/server/api/private/signup.ts +++ b/packages/backend/src/server/api/private/signup.ts @@ -1,6 +1,5 @@ import type Koa from "koa"; import rndstr from "rndstr"; -import bcrypt from "bcryptjs"; import { fetchMeta } from "@/misc/fetch-meta.js"; import { verifyHcaptcha, verifyRecaptcha } from "@/misc/captcha.js"; import { Users, RegistrationTickets, UserPendings } from "@/models/index.js"; @@ -9,6 +8,7 @@ import config from "@/config/index.js"; import { sendEmail } from "@/services/send-email.js"; import { genId } from "@/misc/gen-id.js"; import { validateEmailForAccount } from "@/services/validate-email-for-account.js"; +import { hashPassword } from "@/misc/password.js"; export default async (ctx: Koa.Context) => { const body = ctx.request.body; @@ -44,6 +44,11 @@ export default async (ctx: Koa.Context) => { const invitationCode = body["invitationCode"]; const emailAddress = body["emailAddress"]; + if (config.reservedUsernames?.includes(username.toLowerCase())) { + ctx.status = 400; + return; + } + if (instance.emailRequiredForSignup) { if (emailAddress == null || typeof emailAddress !== "string") { ctx.status = 400; @@ -79,8 +84,7 @@ export default async (ctx: Koa.Context) => { const code = rndstr("a-z0-9", 16); // Generate hash of password - const salt = await bcrypt.genSalt(8); - const hash = await bcrypt.hash(password, salt); + const hash = await hashPassword(password); await UserPendings.insert({ id: genId(), diff --git a/packages/backend/src/server/api/private/verify-email.ts b/packages/backend/src/server/api/private/verify-email.ts new file mode 100644 index 0000000000..e6c8295d18 --- /dev/null +++ b/packages/backend/src/server/api/private/verify-email.ts @@ -0,0 +1,38 @@ +import type Koa from "koa"; +import { Users, UserProfiles } from "@/models/index.js"; +import { publishMainStream } from "@/services/stream.js"; + +export default async (ctx: Koa.Context) => { + const body = ctx.request.body; + + const code = body["code"]; + + const profile = await UserProfiles.findOneByOrFail({ emailVerifyCode: code }); + + if (profile != null) { + ctx.body = "Verify succeeded!"; + + await UserProfiles.update( + { userId: profile.userId }, + { + emailVerified: true, + emailVerifyCode: null, + }, + ); + + publishMainStream( + profile.userId, + "meUpdated", + await Users.pack( + profile.userId, + { id: profile.userId }, + { + detail: true, + includeSecrets: true, + }, + ), + ); + } else { + ctx.throw(404); + } +}; diff --git a/packages/backend/src/server/api/stream/channel.ts b/packages/backend/src/server/api/stream/channel.ts index 93dbdc426c..fc8e0ce35e 100644 --- a/packages/backend/src/server/api/stream/channel.ts +++ b/packages/backend/src/server/api/stream/channel.ts @@ -30,6 +30,10 @@ export default abstract class Channel { return this.connection.muting; } + protected get renoteMuting() { + return this.connection.renoteMuting; + } + protected get blocking() { return this.connection.blocking; } diff --git a/packages/backend/src/server/api/stream/channels/antenna.ts b/packages/backend/src/server/api/stream/channels/antenna.ts index 8e0d081107..050a8d1019 100644 --- a/packages/backend/src/server/api/stream/channels/antenna.ts +++ b/packages/backend/src/server/api/stream/channels/antenna.ts @@ -34,6 +34,9 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + this.connection.cacheNote(note); this.send("note", note); diff --git a/packages/backend/src/server/api/stream/channels/channel.ts b/packages/backend/src/server/api/stream/channels/channel.ts index 841c84af8e..d046579f42 100644 --- a/packages/backend/src/server/api/stream/channels/channel.ts +++ b/packages/backend/src/server/api/stream/channels/channel.ts @@ -10,7 +10,7 @@ export default class extends Channel { public static shouldShare = false; public static requireCredential = false; private channelId: string; - private typers: Record = {}; + private typers: Map = new Map(); private emitTypersIntervalId: ReturnType; constructor(id: string, connection: Channel["connection"]) { @@ -36,6 +36,9 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + this.connection.cacheNote(note); this.send("note", note); @@ -44,8 +47,8 @@ export default class extends Channel { private onEvent(data: StreamMessages["channel"]["payload"]) { if (data.type === "typing") { const id = data.body; - const begin = this.typers[id] == null; - this.typers[id] = new Date(); + const begin = !this.typers.has(id); + this.typers.set(id, new Date()); if (begin) { this.emitTypers(); } @@ -57,11 +60,11 @@ export default class extends Channel { // Remove not typing users for (const [userId, date] of Object.entries(this.typers)) { - if (now.getTime() - date.getTime() > 5000) - this.typers[userId] = undefined; + if (now.getTime() - date.getTime() > 5000) this.typers.delete(userId); } - const users = await Users.packMany(Object.keys(this.typers), null, { + const userIds = Array.from(this.typers.keys()); + const users = await Users.packMany(userIds, null, { detail: false, }); diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts index bea201088f..aa3844c7e3 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -1,6 +1,6 @@ import Channel from "../channel.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { isInstanceMuted } from "@/misc/is-instance-muted.js"; import { isUserRelated } from "@/misc/is-user-related.js"; import type { Packed } from "@/misc/schema.js"; @@ -56,14 +56,17 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + // 流れてきたNoteがミュートすべきNoteだったら無視する // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある) // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、 // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。 - // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる + // そのためレコードが存在するかのチェックでは不十分なので、改めてgetWordMuteを呼んでいる if ( this.userProfile && - (await checkWordMute(note, this.user, this.userProfile.mutedWords)) + (await getWordMute(note, this.user, this.userProfile.mutedWords)).muted ) return; diff --git a/packages/backend/src/server/api/stream/channels/hashtag.ts b/packages/backend/src/server/api/stream/channels/hashtag.ts index 9d7b518d9f..a2e5481abb 100644 --- a/packages/backend/src/server/api/stream/channels/hashtag.ts +++ b/packages/backend/src/server/api/stream/channels/hashtag.ts @@ -37,6 +37,9 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + this.connection.cacheNote(note); this.send("note", note); diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts index 47d7736388..fa4a8a3901 100644 --- a/packages/backend/src/server/api/stream/channels/home-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts @@ -1,5 +1,5 @@ import Channel from "../channel.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { isUserRelated } from "@/misc/is-user-related.js"; import { isInstanceMuted } from "@/misc/is-instance-muted.js"; import type { Packed } from "@/misc/schema.js"; @@ -54,14 +54,17 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + // 流れてきたNoteがミュートすべきNoteだったら無視する // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある) // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、 // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。 - // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる + // そのためレコードが存在するかのチェックでは不十分なので、改めてgetWordMuteを呼んでいる if ( this.userProfile && - (await checkWordMute(note, this.user, this.userProfile.mutedWords)) + (await getWordMute(note, this.user, this.userProfile.mutedWords)).muted ) return; diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index 398127c402..557bb96827 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -1,6 +1,6 @@ import Channel from "../channel.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { isUserRelated } from "@/misc/is-user-related.js"; import { isInstanceMuted } from "@/misc/is-instance-muted.js"; import type { Packed } from "@/misc/schema.js"; @@ -71,14 +71,17 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + // 流れてきたNoteがミュートすべきNoteだったら無視する // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある) // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、 // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。 - // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる + // そのためレコードが存在するかのチェックでは不十分なので、改めてgetWordMuteを呼んでいる if ( this.userProfile && - (await checkWordMute(note, this.user, this.userProfile.mutedWords)) + (await getWordMute(note, this.user, this.userProfile.mutedWords)).muted ) return; diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts index 6f8075b7aa..dc3aab8d7d 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -1,6 +1,6 @@ import Channel from "../channel.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { isUserRelated } from "@/misc/is-user-related.js"; import type { Packed } from "@/misc/schema.js"; @@ -48,14 +48,17 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + // 流れてきたNoteがミュートすべきNoteだったら無視する // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある) // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、 // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。 - // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる + // そのためレコードが存在するかのチェックでは不十分なので、改めてgetWordMuteを呼んでいる if ( this.userProfile && - (await checkWordMute(note, this.user, this.userProfile.mutedWords)) + (await getWordMute(note, this.user, this.userProfile.mutedWords)).muted ) return; diff --git a/packages/backend/src/server/api/stream/channels/messaging.ts b/packages/backend/src/server/api/stream/channels/messaging.ts index dc18250592..0622bd4649 100644 --- a/packages/backend/src/server/api/stream/channels/messaging.ts +++ b/packages/backend/src/server/api/stream/channels/messaging.ts @@ -20,7 +20,7 @@ export default class extends Channel { private subCh: | `messagingStream:${User["id"]}-${User["id"]}` | `messagingStream:${UserGroup["id"]}`; - private typers: Record = {}; + private typers: Map = new Map(); private emitTypersIntervalId: ReturnType; constructor(id: string, connection: Channel["connection"]) { @@ -66,8 +66,8 @@ export default class extends Channel { ) { if (data.type === "typing") { const id = data.body; - const begin = this.typers[id] == null; - this.typers[id] = new Date(); + const begin = !this.typers.has(id); + this.typers.set(id, new Date()); if (begin) { this.emitTypers(); } @@ -107,12 +107,12 @@ export default class extends Channel { const now = new Date(); // Remove not typing users - for (const [userId, date] of Object.entries(this.typers)) { - if (now.getTime() - date.getTime() > 5000) - this.typers[userId] = undefined; + for (const [userId, date] of this.typers.entries()) { + if (now.getTime() - date.getTime() > 5000) this.typers.delete(userId); } - const users = await Users.packMany(Object.keys(this.typers), null, { + const userIds = Array.from(this.typers.keys()); + const users = await Users.packMany(userIds, null, { detail: false, }); diff --git a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts index a2a03fca12..6baec77442 100644 --- a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts @@ -1,6 +1,6 @@ import Channel from "../channel.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { isUserRelated } from "@/misc/is-user-related.js"; import { isInstanceMuted } from "@/misc/is-instance-muted.js"; import type { Packed } from "@/misc/schema.js"; @@ -69,14 +69,17 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + // 流れてきたNoteがミュートすべきNoteだったら無視する // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある) // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、 // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。 - // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる + // そのためレコードが存在するかのチェックでは不十分なので、改めてgetWordMuteを呼んでいる if ( this.userProfile && - (await checkWordMute(note, this.user, this.userProfile.mutedWords)) + (await getWordMute(note, this.user, this.userProfile.mutedWords)).muted ) return; diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index f63776c9e9..105c45955c 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -56,6 +56,9 @@ export default class extends Channel { // 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する if (isUserRelated(note, this.blocking)) return; + if (note.renote && !note.text && isUserRelated(note, this.renoteMuting)) + return; + this.send("note", note); } diff --git a/packages/backend/src/server/api/stream/index.ts b/packages/backend/src/server/api/stream/index.ts index 10b9fb6497..055fe200b7 100644 --- a/packages/backend/src/server/api/stream/index.ts +++ b/packages/backend/src/server/api/stream/index.ts @@ -7,6 +7,7 @@ import { Users, Followings, Mutings, + RenoteMutings, UserProfiles, ChannelFollowings, Blockings, @@ -36,13 +37,14 @@ export default class Connection { public userProfile?: UserProfile | null; public following: Set = new Set(); public muting: Set = new Set(); + public renoteMuting: Set = new Set(); public blocking: Set = new Set(); // "被"blocking public followingChannels: Set = new Set(); public token?: AccessToken; private wsConnection: websocket.connection; public subscriber: StreamEventEmitter; private channels: Channel[] = []; - private subscribingNotes: any = {}; + private subscribingNotes: Map = new Map(); private cachedNotes: Packed<"Note">[] = []; private isMastodonCompatible: boolean = false; private host: string; @@ -80,6 +82,7 @@ export default class Connection { if (this.user) { this.updateFollowing(); this.updateMuting(); + this.updateRenoteMuting(); this.updateBlocking(); this.updateFollowingChannels(); this.updateUserProfile(); @@ -114,6 +117,7 @@ export default class Connection { this.muting.delete(data.body.id); break; + // TODO: renote mute events // TODO: block events case "followChannel": @@ -339,13 +343,10 @@ export default class Connection { private onSubscribeNote(payload: any) { if (!payload.id) return; - if (this.subscribingNotes[payload.id] == null) { - this.subscribingNotes[payload.id] = 0; - } + const current = this.subscribingNotes.get(payload.id) || 0; + this.subscribingNotes.set(payload.id, current + 1); - this.subscribingNotes[payload.id]++; - - if (this.subscribingNotes[payload.id] === 1) { + if (!current) { this.subscriber.on(`noteStream:${payload.id}`, this.onNoteStreamMessage); } } @@ -356,11 +357,13 @@ export default class Connection { private onUnsubscribeNote(payload: any) { if (!payload.id) return; - this.subscribingNotes[payload.id]--; - if (this.subscribingNotes[payload.id] <= 0) { - this.subscribingNotes[payload.id] = undefined; + const current = this.subscribingNotes.get(payload.id) || 0; + if (current <= 1) { + this.subscribingNotes.delete(payload.id); this.subscriber.off(`noteStream:${payload.id}`, this.onNoteStreamMessage); + return; } + this.subscribingNotes.set(payload.id, current - 1); } private async onNoteStreamMessage(data: StreamMessages["note"]["payload"]) { @@ -414,12 +417,13 @@ export default class Connection { const client = getClient(this.host, this.accessToken); client.getStatus(payload.id).then((data) => { const newPost = toTextWithReaction([data.data], this.host); + const targetPost = newPost[0]; for (const stream of this.currentSubscribe) { this.wsConnection.send( JSON.stringify({ stream, event: "status.update", - payload: JSON.stringify(newPost[0]), + payload: JSON.stringify(targetPost), }), ); } @@ -564,6 +568,17 @@ export default class Connection { this.muting = new Set(mutings.map((x) => x.muteeId)); } + private async updateRenoteMuting() { + const renoteMutings = await RenoteMutings.find({ + where: { + muterId: this.user!.id, + }, + select: ["muteeId"], + }); + + this.renoteMuting = new Set(renoteMutings.map((x) => x.muteeId)); + } + private async updateBlocking() { // ここでいうBlockingは被Blockingの意 const blockings = await Blockings.find({ diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index 6ce28bf1a8..8035dcdd7a 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -30,6 +30,8 @@ import proxyServer from "./proxy/index.js"; import webServer from "./web/index.js"; import { initializeStreamingServer } from "./api/streaming.js"; import { koaBody } from "koa-body"; +import removeTrailingSlash from "koa-remove-trailing-slashes"; +import { v4 as uuid } from "uuid"; export const serverLogger = new Logger("server", "gray", false); @@ -37,6 +39,8 @@ export const serverLogger = new Logger("server", "gray", false); const app = new Koa(); app.proxy = true; +app.use(removeTrailingSlash()); + if (!["production", "test"].includes(process.env.NODE_ENV || "")) { // Logger app.use( @@ -75,9 +79,21 @@ const mastoRouter = new Router(); mastoRouter.use( koaBody({ urlencoded: true, + multipart: true, }), ); +mastoRouter.use(async (ctx, next) => { + if (ctx.request.query) { + if (!ctx.request.body || Object.keys(ctx.request.body).length === 0) { + ctx.request.body = ctx.request.query; + } else { + ctx.request.body = { ...ctx.request.body, ...ctx.request.query }; + } + } + await next(); +}); + // Routing router.use(activityPub.routes()); router.use(nodeinfo.routes()); @@ -108,59 +124,47 @@ router.get("/identicon/:x", async (ctx) => { ctx.body = fs.createReadStream(temp).on("close", () => cleanup()); }); -router.get("/verify-email/:code", async (ctx) => { - const profile = await UserProfiles.findOneBy({ - emailVerifyCode: ctx.params.code, - }); - - if (profile != null) { - ctx.body = "Verify succeeded!"; - ctx.status = 200; - - await UserProfiles.update( - { userId: profile.userId }, - { - emailVerified: true, - emailVerifyCode: null, - }, - ); - - publishMainStream( - profile.userId, - "meUpdated", - await Users.pack( - profile.userId, - { id: profile.userId }, - { - detail: true, - includeSecrets: true, - }, - ), - ); - } else { - ctx.status = 404; - } -}); - mastoRouter.get("/oauth/authorize", async (ctx) => { - const client_id = ctx.request.query.client_id; + const { client_id, state, redirect_uri } = ctx.request.query; console.log(ctx.request.req); - ctx.redirect(Buffer.from(client_id?.toString() || "", "base64").toString()); + let param = "mastodon=true"; + if (state) param += `&state=${state}`; + if (redirect_uri) param += `&redirect_uri=${redirect_uri}`; + const client = client_id ? client_id : ""; + ctx.redirect( + `${Buffer.from(client.toString(), "base64").toString()}?${param}`, + ); }); mastoRouter.post("/oauth/token", async (ctx) => { - const body: any = ctx.request.body; - let client_id: any = ctx.request.query.client_id; + const body: any = ctx.request.body || ctx.request.query; + console.log("token-request", body); + console.log("token-query", ctx.request.query); + if (body.grant_type === "client_credentials") { + const ret = { + access_token: uuid(), + token_type: "Bearer", + scope: "read", + created_at: Math.floor(new Date().getTime() / 1000), + }; + ctx.body = ret; + return; + } + let client_id: any = body.client_id; const BASE_URL = `${ctx.request.protocol}://${ctx.request.hostname}`; const generator = (megalodon as any).default; const client = generator("misskey", BASE_URL, null) as MegalodonInterface; let m = null; + let token = null; if (body.code) { - m = body.code.match(/^[a-zA-Z0-9-]+/); - if (!m.length) { - ctx.body = { error: "Invalid code" }; - return; - } + //m = body.code.match(/^([a-zA-Z0-9]{8})([a-zA-Z0-9]{4})([a-zA-Z0-9]{4})([a-zA-Z0-9]{4})([a-zA-Z0-9]{12})/); + //if (!m.length) { + // ctx.body = { error: "Invalid code" }; + // return; + //} + //token = `${m[1]}-${m[2]}-${m[3]}-${m[4]}-${m[5]}` + console.log(body.code, token); + token = body.code; } if (client_id instanceof Array) { client_id = client_id.toString(); @@ -171,14 +175,16 @@ mastoRouter.post("/oauth/token", async (ctx) => { const atData = await client.fetchAccessToken( client_id, body.client_secret, - m ? m[0] : "", + token ? token : "", ); - ctx.body = { + const ret = { access_token: atData.accessToken, token_type: "Bearer", - scope: "read write follow", + scope: body.scope || "read write follow push", created_at: Math.floor(new Date().getTime() / 1000), }; + console.log("token-response", ret); + ctx.body = ret; } catch (err: any) { console.error(err); ctx.status = 401; diff --git a/packages/backend/src/server/nodeinfo.ts b/packages/backend/src/server/nodeinfo.ts index a7fa0de4c8..8563573d47 100644 --- a/packages/backend/src/server/nodeinfo.ts +++ b/packages/backend/src/server/nodeinfo.ts @@ -3,7 +3,7 @@ import config from "@/config/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; import { Users, Notes } from "@/models/index.js"; import { IsNull, MoreThan } from "typeorm"; -import { MAX_NOTE_TEXT_LENGTH } from "@/const.js"; +import { MAX_NOTE_TEXT_LENGTH, MAX_CAPTION_TEXT_LENGTH } from "@/const.js"; import { Cache } from "@/misc/cache.js"; const router = new Router(); @@ -85,6 +85,7 @@ const nodeinfo2 = async () => { enableHcaptcha: meta.enableHcaptcha, enableRecaptcha: meta.enableRecaptcha, maxNoteTextLength: MAX_NOTE_TEXT_LENGTH, + maxCaptionTextLength: MAX_CAPTION_TEXT_LENGTH, enableTwitterIntegration: meta.enableTwitterIntegration, enableGithubIntegration: meta.enableGithubIntegration, enableDiscordIntegration: meta.enableDiscordIntegration, diff --git a/packages/backend/src/server/web/bios.js b/packages/backend/src/server/web/bios.js index 1acdafd1d5..e715a01068 100644 --- a/packages/backend/src/server/web/bios.js +++ b/packages/backend/src/server/web/bios.js @@ -1,7 +1,7 @@ -'use strict'; +"use strict"; window.onload = async () => { - const account = JSON.parse(localStorage.getItem('account')); + const account = JSON.parse(localStorage.getItem("account")); const i = account.token; const api = (endpoint, data = {}) => { @@ -10,42 +10,44 @@ window.onload = async () => { if (i) data.i = i; // Send request - fetch(endpoint.indexOf('://') > -1 ? endpoint : `/api/${endpoint}`, { - method: 'POST', + fetch(endpoint.indexOf("://") > -1 ? endpoint : `/api/${endpoint}`, { + method: "POST", body: JSON.stringify(data), - credentials: 'omit', - cache: 'no-cache' - }).then(async (res) => { - const body = res.status === 204 ? null : await res.json(); + credentials: "omit", + cache: "no-cache", + }) + .then(async (res) => { + const body = res.status === 204 ? null : await res.json(); - if (res.status === 200) { - resolve(body); - } else if (res.status === 204) { - resolve(); - } else { - reject(body.error); - } - }).catch(reject); + if (res.status === 200) { + resolve(body); + } else if (res.status === 204) { + resolve(); + } else { + reject(body.error); + } + }) + .catch(reject); }); return promise; }; - const content = document.getElementById('content'); + const content = document.getElementById("content"); - document.getElementById('ls').addEventListener('click', () => { - content.innerHTML = ''; + document.getElementById("ls").addEventListener("click", () => { + content.innerHTML = ""; - const lsEditor = document.createElement('div'); - lsEditor.id = 'lsEditor'; + const lsEditor = document.createElement("div"); + lsEditor.id = "lsEditor"; - const adder = document.createElement('div'); - adder.classList.add('adder'); - const addKeyInput = document.createElement('input'); - const addValueTextarea = document.createElement('textarea'); - const addButton = document.createElement('button'); - addButton.textContent = 'Add'; - addButton.addEventListener('click', () => { + const adder = document.createElement("div"); + adder.classList.add("adder"); + const addKeyInput = document.createElement("input"); + const addValueTextarea = document.createElement("textarea"); + const addButton = document.createElement("button"); + addButton.textContent = "Add"; + addButton.addEventListener("click", () => { localStorage.setItem(addKeyInput.value, addValueTextarea.value); location.reload(); }); @@ -57,21 +59,21 @@ window.onload = async () => { for (let i = 0; i < localStorage.length; i++) { const k = localStorage.key(i); - const record = document.createElement('div'); - record.classList.add('record'); - const header = document.createElement('header'); + const record = document.createElement("div"); + record.classList.add("record"); + const header = document.createElement("header"); header.textContent = k; - const textarea = document.createElement('textarea'); + const textarea = document.createElement("textarea"); textarea.textContent = localStorage.getItem(k); - const saveButton = document.createElement('button'); - saveButton.textContent = 'Save'; - saveButton.addEventListener('click', () => { + const saveButton = document.createElement("button"); + saveButton.textContent = "Save"; + saveButton.addEventListener("click", () => { localStorage.setItem(k, textarea.value); location.reload(); }); - const removeButton = document.createElement('button'); - removeButton.textContent = 'Remove'; - removeButton.addEventListener('click', () => { + const removeButton = document.createElement("button"); + removeButton.textContent = "Remove"; + removeButton.addEventListener("click", () => { localStorage.removeItem(k); location.reload(); }); diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index f4e0707a93..e7e859d20c 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -9,120 +9,122 @@ * 注: webpackは介さないため、このファイルではrequireやimportは使えません。 */ -'use strict'; +"use strict"; // ブロックの中に入れないと、定義した変数がブラウザのグローバルスコープに登録されてしまい邪魔なので (async () => { window.onerror = (e) => { console.error(e); - renderError('SOMETHING_HAPPENED', e); + renderError("SOMETHING_HAPPENED", e); }; window.onunhandledrejection = (e) => { console.error(e); - renderError('SOMETHING_HAPPENED_IN_PROMISE', e); + renderError("SOMETHING_HAPPENED_IN_PROMISE", e); }; //#region Detect language & fetch translations - const v = localStorage.getItem('v') || VERSION; + const v = localStorage.getItem("v") || VERSION; const supportedLangs = LANGS; - let lang = localStorage.getItem('lang'); + let lang = localStorage.getItem("lang"); if (lang == null || !supportedLangs.includes(lang)) { if (supportedLangs.includes(navigator.language)) { lang = navigator.language; } else { - lang = supportedLangs.find(x => x.split('-')[0] === navigator.language); + lang = supportedLangs.find((x) => x.split("-")[0] === navigator.language); // Fallback - if (lang == null) lang = 'en-US'; + if (lang == null) lang = "en-US"; } } const res = await fetch(`/assets/locales/${lang}.${v}.json`); if (res.status === 200) { - localStorage.setItem('lang', lang); - localStorage.setItem('locale', await res.text()); - localStorage.setItem('localeVersion', v); + localStorage.setItem("lang", lang); + localStorage.setItem("locale", await res.text()); + localStorage.setItem("localeVersion", v); } else { await checkUpdate(); - renderError('LOCALE_FETCH'); + renderError("LOCALE_FETCH"); return; } //#endregion //#region Script function importAppScript() { - import(`/assets/${CLIENT_ENTRY}`) - .catch(async e => { - await checkUpdate(); - console.error(e); - renderError('APP_IMPORT', e); - }); + import(`/assets/${CLIENT_ENTRY}`).catch(async (e) => { + await checkUpdate(); + console.error(e); + renderError("APP_IMPORT", e); + }); } // タイミングによっては、この時点でDOMの構築が済んでいる場合とそうでない場合とがある - if (document.readyState !== 'loading') { + if (document.readyState !== "loading") { importAppScript(); } else { - window.addEventListener('DOMContentLoaded', () => { + window.addEventListener("DOMContentLoaded", () => { importAppScript(); }); } //#endregion //#region Theme - const theme = localStorage.getItem('theme'); + const theme = localStorage.getItem("theme"); if (theme) { for (const [k, v] of Object.entries(JSON.parse(theme))) { document.documentElement.style.setProperty(`--${k}`, v.toString()); // HTMLの theme-color 適用 - if (k === 'htmlThemeColor') { + if (k === "htmlThemeColor") { for (const tag of document.head.children) { - if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') { - tag.setAttribute('content', v); + if ( + tag.tagName === "META" && + tag.getAttribute("name") === "theme-color" + ) { + tag.setAttribute("content", v); break; } } } } } - const colorSchema = localStorage.getItem('colorSchema'); + const colorSchema = localStorage.getItem("colorSchema"); if (colorSchema) { - document.documentElement.style.setProperty('color-schema', colorSchema); + document.documentElement.style.setProperty("color-schema", colorSchema); } //#endregion - const fontSize = localStorage.getItem('fontSize'); + const fontSize = localStorage.getItem("fontSize"); if (fontSize) { - document.documentElement.classList.add('f-' + fontSize); + document.documentElement.classList.add("f-" + fontSize); } - const useSystemFont = localStorage.getItem('useSystemFont'); + const useSystemFont = localStorage.getItem("useSystemFont"); if (useSystemFont) { - document.documentElement.classList.add('useSystemFont'); + document.documentElement.classList.add("useSystemFont"); } - const wallpaper = localStorage.getItem('wallpaper'); + const wallpaper = localStorage.getItem("wallpaper"); if (wallpaper) { document.documentElement.style.backgroundImage = `url(${wallpaper})`; } - const customCss = localStorage.getItem('customCss'); + const customCss = localStorage.getItem("customCss"); if (customCss && customCss.length > 0) { - const style = document.createElement('style'); + const style = document.createElement("style"); style.innerHTML = customCss; document.head.appendChild(style); } async function addStyle(styleText) { - let css = document.createElement('style'); + let css = document.createElement("style"); css.appendChild(document.createTextNode(styleText)); document.head.appendChild(css); } function renderError(code, details) { - let errorsElement = document.getElementById('errors'); + let errorsElement = document.getElementById("errors"); if (!errorsElement) { document.body.innerHTML = ` @@ -158,9 +160,9 @@
`; - errorsElement = document.getElementById('errors'); + errorsElement = document.getElementById("errors"); } - const detailsElement = document.createElement('details'); + const detailsElement = document.createElement("details"); detailsElement.innerHTML = `
@@ -278,25 +280,25 @@ details { width: 50%; } - `) + `); } async function checkUpdate() { try { - const res = await fetch('/api/meta', { - method: 'POST', - cache: 'no-cache' + const res = await fetch("/api/meta", { + method: "POST", + cache: "no-cache", }); const meta = await res.json(); if (meta.version != v) { - localStorage.setItem('v', meta.version); + localStorage.setItem("v", meta.version); refresh(); } } catch (e) { console.error(e); - renderError('UPDATE_CHECK', e); + renderError("UPDATE_CHECK", e); throw e; } } @@ -304,9 +306,9 @@ function refresh() { // Clear cache (service worker) try { - navigator.serviceWorker.controller.postMessage('clear'); - navigator.serviceWorker.getRegistrations().then(registrations => { - registrations.forEach(registration => registration.unregister()); + navigator.serviceWorker.controller.postMessage("clear"); + navigator.serviceWorker.getRegistrations().then((registrations) => { + registrations.forEach((registration) => registration.unregister()); }); } catch (e) { console.error(e); diff --git a/packages/backend/src/server/web/cli.css b/packages/backend/src/server/web/cli.css index 6903db9839..460a7b7f31 100644 --- a/packages/backend/src/server/web/cli.css +++ b/packages/backend/src/server/web/cli.css @@ -6,27 +6,38 @@ main { border-radius: 10px; } #tl > div { - padding: 16px; - border-bottom: 1px solid #908caa; + border: 1px solid #908caa; + border-radius: 10px; + margin: 10px; + padding: 10px; + width: fit-content; } #tl > div > header { font-weight: 700; + display: inline-flex; } -* { - font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; +img { + border-radius: 10px; + margin-right: 10px; } + +#form { + text-align: center; +} + #calckey_app { display: none !important; } + body, html { + font-family: BIZ UDGothic, Roboto, HelveticaNeue, Arial, sans-serif; background-color: #191724; color: #e0def4; justify-content: center; margin: auto; padding: 10px; - text-align: center; } button { border-radius:999px; diff --git a/packages/backend/src/server/web/cli.js b/packages/backend/src/server/web/cli.js index 3dff1d4860..85a61a2446 100644 --- a/packages/backend/src/server/web/cli.js +++ b/packages/backend/src/server/web/cli.js @@ -1,54 +1,71 @@ -'use strict'; +"use strict"; window.onload = async () => { - const account = JSON.parse(localStorage.getItem('account')); + const account = JSON.parse(localStorage.getItem("account")); const i = account.token; const api = (endpoint, data = {}) => { const promise = new Promise((resolve, reject) => { // Append a credential if (i) data.i = i; - + // Send request - fetch(endpoint.indexOf('://') > -1 ? endpoint : `/api/${endpoint}`, { - method: 'POST', + fetch(endpoint.indexOf("://") > -1 ? endpoint : `/api/${endpoint}`, { + method: "POST", body: JSON.stringify(data), - credentials: 'omit', - cache: 'no-cache' - }).then(async (res) => { - const body = res.status === 204 ? null : await res.json(); - - if (res.status === 200) { - resolve(body); - } else if (res.status === 204) { - resolve(); - } else { - reject(body.error); - } - }).catch(reject); + credentials: "omit", + cache: "no-cache", + }) + .then(async (res) => { + const body = res.status === 204 ? null : await res.json(); + + if (res.status === 200) { + resolve(body); + } else if (res.status === 204) { + resolve(); + } else { + reject(body.error); + } + }) + .catch(reject); }); - + return promise; }; - document.getElementById('submit').addEventListener('click', () => { - api('notes/create', { - text: document.getElementById('text').value + document.getElementById("submit").addEventListener("click", () => { + api("notes/create", { + text: document.getElementById("text").value, }).then(() => { location.reload(); }); }); - api('notes/timeline').then(notes => { - const tl = document.getElementById('tl'); + api("notes/timeline").then((notes) => { + const tl = document.getElementById("tl"); for (const note of notes) { - const el = document.createElement('div'); - const name = document.createElement('header'); + const el = document.createElement("div"); + const header = document.createElement("header"); + const name = document.createElement("p"); + const avatar = document.createElement("img"); name.textContent = `${note.user.name} @${note.user.username}`; - const text = document.createElement('div'); + avatar.src = note.user.avatarUrl; + avatar.style = "height: 40px"; + const text = document.createElement("div"); text.textContent = `${note.text}`; - el.appendChild(name); - el.appendChild(text); + el.appendChild(header); + header.appendChild(avatar); + header.appendChild(name); + if (note.text) { + el.appendChild(text); + } + if (note.files) { + for (const file of note.files) { + const img = document.createElement("img"); + img.src = file.properties.thumbnailUrl; + el.appendChild(img); + } + } tl.appendChild(el); } }); diff --git a/packages/backend/src/server/web/views/note.pug b/packages/backend/src/server/web/views/note.pug index b2dc5f63fd..476d42d9e8 100644 --- a/packages/backend/src/server/web/views/note.pug +++ b/packages/backend/src/server/web/views/note.pug @@ -2,12 +2,12 @@ extends ./base block vars - const user = note.user; - - const title = privateMode ? instanceName : (user.name ? `${user.name} (@${user.username})` : `@${user.username}`); + - const title = privateMode ? instanceName : (user.name ? `${user.name} (@${user.username}${user.host ? `@${user.host}` : ''})` : `@${user.username}`); - const url = `${config.url}/notes/${note.id}`; - const isRenote = note.renote && note.text == null && note.fileIds.length == 0 && note.poll == null; - const isImage = note.files.length !== 0 && note.files[0].type.startsWith('image'); - const isVideo = note.files.length !== 0 && note.files[0].type.startsWith('video'); - - const imageUrl = isImage ? note.files[0].url : isVideo ? note.files[0].thumbnailUrl : avatarUrl; + - const imageUrl = isImage ? note.files[0].url : isVideo ? note.files[0].thumbnailUrl : avatarUrl; block title = `${title} | ${instanceName}` @@ -23,7 +23,7 @@ block og meta(property='og:description' content= summary) meta(property='og:url' content= url) meta(property='og:image' content= imageUrl) - if isImage + if isImage && !note.files[0].isSensitive meta(property='og:image:width' content=note.files[0].properties.width) meta(property='og:image:height' content=note.files[0].properties.height) meta(property='og:image:type' content=note.files[0].type) diff --git a/packages/backend/src/services/chart/core.ts b/packages/backend/src/services/chart/core.ts index 750a6e0ad8..36fe373269 100644 --- a/packages/backend/src/services/chart/core.ts +++ b/packages/backend/src/services/chart/core.ts @@ -17,6 +17,7 @@ import { } from "@/prelude/time.js"; import { getChartInsertLock } from "@/misc/app-lock.js"; import { db } from "@/db/postgre.js"; +import promiseLimit from "promise-limit"; const logger = new Logger("chart", "white", process.env.NODE_ENV !== "test"); @@ -472,7 +473,8 @@ export default abstract class Chart { protected commit(diff: Commit, group: string | null = null): void { for (const [k, v] of Object.entries(diff)) { if (v == null || v === 0 || (Array.isArray(v) && v.length === 0)) - diff[k] = undefined; + // rome-ignore lint/performance/noDelete: needs to be deleted not just set to undefined + delete diff[k]; } this.buffer.push({ diff, @@ -554,7 +556,11 @@ export default abstract class Chart { // bake unique count for (const [k, v] of Object.entries(finalDiffs)) { - if (this.schema[k].uniqueIncrement) { + if ( + this.schema[k].uniqueIncrement && + Array.isArray(v) && + v.length > 0 + ) { const name = (columnPrefix + k.replaceAll(".", columnDot)) as keyof Columns; const tempColumnName = (uniqueTempColumnPrefix + @@ -646,16 +652,32 @@ export default abstract class Chart { ); }; - const groups = removeDuplicates(this.buffer.map((log) => log.group)); + const startCount = this.buffer.length; + const groups = removeDuplicates(this.buffer.map((log) => log.group)); + const groupCount = groups.length; + + // Limit the number of concurrent chart update queries executed on the database + // to 25 at a time, so as avoid excessive IO spinlocks like when 8k queries are + // sent out at once. + const limit = promiseLimit(25); + + const startTime = Date.now(); await Promise.all( groups.map((group) => - Promise.all([ - this.claimCurrentLog(group, "hour"), - this.claimCurrentLog(group, "day"), - ]).then(([logHour, logDay]) => update(logHour, logDay)), + limit(() => + Promise.all([ + this.claimCurrentLog(group, "hour"), + this.claimCurrentLog(group, "day"), + ]).then(([logHour, logDay]) => update(logHour, logDay)), + ), ), ); + + const duration = Date.now() - startTime; + logger.info( + `Saved ${startCount} (${groupCount} unique) ${this.name} items in ${duration}ms (${this.buffer.length} remaining)`, + ); } public async tick( diff --git a/packages/backend/src/services/create-system-user.ts b/packages/backend/src/services/create-system-user.ts index def3ee98fb..24536090a9 100644 --- a/packages/backend/src/services/create-system-user.ts +++ b/packages/backend/src/services/create-system-user.ts @@ -1,4 +1,3 @@ -import bcrypt from "bcryptjs"; import { v4 as uuid } from "uuid"; import generateNativeUserToken from "../server/api/common/generate-native-user-token.js"; import { genRsaKeyPair } from "@/misc/gen-key-pair.js"; @@ -9,13 +8,13 @@ import { genId } from "@/misc/gen-id.js"; import { UserKeypair } from "@/models/entities/user-keypair.js"; import { UsedUsername } from "@/models/entities/used-username.js"; import { db } from "@/db/postgre.js"; +import { hashPassword } from "@/misc/password.js"; export async function createSystemUser(username: string) { const password = uuid(); // Generate hash of password - const salt = await bcrypt.genSalt(8); - const hash = await bcrypt.hash(password, salt); + const hash = await hashPassword(password); // Generate secret const secret = generateNativeUserToken(); diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index 968aed880f..5dd324d89a 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -1,5 +1,6 @@ import * as mfm from "mfm-js"; import es from "../../db/elasticsearch.js"; +import sonic from "../../db/sonic.js"; import { publishMainStream, publishNotesStream, @@ -52,7 +53,7 @@ import { Poll } from "@/models/entities/poll.js"; import { createNotification } from "../create-notification.js"; import { isDuplicateKeyValueError } from "@/misc/is-duplicate-key-value-error.js"; import { checkHitAntenna } from "@/misc/check-hit-antenna.js"; -import { checkWordMute } from "@/misc/check-word-mute.js"; +import { getWordMute } from "@/misc/check-word-mute.js"; import { addNoteToAntenna } from "../add-note-to-antenna.js"; import { countSameRenotes } from "@/misc/count-same-renotes.js"; import { deliverToRelays } from "../relay.js"; @@ -342,9 +343,9 @@ export default async ( ) .then((us) => { for (const u of us) { - checkWordMute(note, { id: u.userId }, u.mutedWords).then( + getWordMute(note, { id: u.userId }, u.mutedWords).then( (shouldMute) => { - if (shouldMute) { + if (shouldMute.muted) { MutedNotes.insert({ id: genId(), userId: u.userId, @@ -588,7 +589,7 @@ export default async ( } // Register to search database - index(note); + await index(note); }); async function renderNoteOrRenoteActivity(data: Option, note: Note) { @@ -728,18 +729,34 @@ async function insertNote( } } -function index(note: Note) { - if (note.text == null || config.elasticsearch == null) return; +export async function index(note: Note): Promise { + if (!note.text) return; - es!.index({ - index: config.elasticsearch.index || "misskey_note", - id: note.id.toString(), - body: { - text: normalizeForSearch(note.text), - userId: note.userId, - userHost: note.userHost, - }, - }); + if (config.elasticsearch && es) { + es.index({ + index: config.elasticsearch.index || "misskey_note", + id: note.id.toString(), + body: { + text: normalizeForSearch(note.text), + userId: note.userId, + userHost: note.userHost, + }, + }); + } + + if (sonic) { + await sonic.ingest.push( + sonic.collection, + sonic.bucket, + JSON.stringify({ + id: note.id, + userId: note.userId, + userHost: note.userHost, + channelId: note.channelId, + }), + note.text, + ); + } } async function notifyToWatchersOfRenotee( diff --git a/packages/backend/src/services/push-notification.ts b/packages/backend/src/services/push-notification.ts index 0e51ad9675..a207fae391 100644 --- a/packages/backend/src/services/push-notification.ts +++ b/packages/backend/src/services/push-notification.ts @@ -63,6 +63,17 @@ export async function pushNotification( }); for (const subscription of subscriptions) { + if ( + [ + "readNotifications", + "readAllNotifications", + "readAllMessagingMessages", + "readAllMessagingMessagesOfARoom", + ].includes(type) && + !subscription.sendReadMessage + ) + continue; + const pushSubscription = { endpoint: subscription.endpoint, keys: { diff --git a/packages/backend/src/services/send-email.ts b/packages/backend/src/services/send-email.ts index 87a0d5e33c..7647b0db49 100644 --- a/packages/backend/src/services/send-email.ts +++ b/packages/backend/src/services/send-email.ts @@ -33,89 +33,33 @@ export async function sendEmail( } as any); try { - // TODO: htmlサニタイズ const info = await transporter.sendMail({ from: meta.email!, to: to, subject: subject, text: text, - html: ` + html: ` ${subject} - - -
-
- + +
+
+ +

${meta.name}

-
-