From dbaec21750f154e13235a101f61ca818850dce49 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Fri, 26 Jan 2024 17:44:03 +0100 Subject: [PATCH] [docs] Add disclaimer for migrations from Misskey v13 and forks --- docs/migrate.md | 60 ++++--------------------------------------------- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/docs/migrate.md b/docs/migrate.md index ccf17c4f7..11c95c70a 100644 --- a/docs/migrate.md +++ b/docs/migrate.md @@ -1,4 +1,4 @@ -# 🚚 Migrating from Misskey/FoundKey to Iceshrimp +# 🚚 Migrating from Misskey/FoundKey/Firefish to Iceshrimp All the guides below assume you're starting in the root of the repo directory. @@ -7,61 +7,6 @@ All the guides below assume you're starting in the root of the repo directory. - **Ensure you have stopped all master and worker processes of Misskey.** - **Ensure you have backups of the database before performing any commands.** -## Misskey v13 and above - -Tested with Misskey v13.11.3. - -If your Misskey v13 is older, we recommend updating your Misskey to v13.11.3. - -```sh -wget -O mkv13.patch https://iceshrimp.dev/iceshrimp/iceshrimp/raw/branch/dev/docs/mkv13.patch -wget -O mkv13_restore.patch https://iceshrimp.dev/iceshrimp/iceshrimp/raw/branch/dev/docs/mkv13_restore.patch -git apply mkv13.patch mkv13_restore.patch - -cd packages/backend - -LINE_NUM="$(pnpm typeorm migration:show -d ormconfig.js | grep -n activeEmailValidation1657346559800 | cut -d ':' -f 1)" -NUM_MIGRATIONS="$(pnpm typeorm migration:show -d ormconfig.js | tail -n+"$LINE_NUM" | grep '\[X\]' | wc -l)" - -for i in $(seq 1 $NUM_MIGRATIONS); do pnpm typeorm migration:revert -d ormconfig.js; done - -cd ../../ - -git remote set-url origin https://iceshrimp.dev/iceshrimp/iceshrimp.git -git fetch origin -git stash push -rm -rf fluent-emojis misskey-assets -git checkout v2023.11.4 # or any other tag or dev -wget -O renote_muting.patch https://iceshrimp.dev/iceshrimp/iceshrimp/raw/branch/dev/docs/renote_muting.patch -git apply renote_muting.patch - -# build and migrate using preferred method -git stash push -``` - -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 Iceshrimp. - -Note: Ignore errors of `column "xxx" of relation "xxx" already exists`. - -If no other errors happened, your Iceshrimp is ready to launch! ## Misskey v12.119 and before @@ -73,6 +18,9 @@ git checkout v2023.11.4 # or any other tag or dev # build and run migrations using preferred method ``` +> **Note** +> Migrating from Misskey v13 and its forks (Sharkey et al) is unsupported due to database schema changes. + ## FoundKey ```sh