trashposs/docs/migrate.md

75 lines
2.8 KiB
Markdown
Raw Permalink Normal View History

2024-04-16 23:21:29 +02:00
# 🚚 Migrating from Iceshrimp to TrashPoss
All the guides below assume you're starting in the root of the repo directory.
### Before proceeding
- **Ensure you have stopped all master and worker processes of TrashPoss.**
- **Ensure you have backups of the database before performing any commands.**
```sh
git remote set-url origin https://iceshrimp.dev/Crimekillz/trashposs.git
git fetch
git checkout v2024.04.1 # or any other tag or dev
# Migrations will be run automatically on next start
```
If you are using docker, make sure to adopt /docs/examples/docker-compose.yml from scratch and adapt it to suit your needs, make sure you refer the correct image
# 🚚 Migrating from Misskey/FoundKey/Firefish to TrashPoss
2023-02-20 21:13:55 +01:00
All the guides below assume you're starting in the root of the repo directory.
2023-05-03 01:53:57 +02:00
### Before proceeding
2024-04-06 22:37:46 +02:00
- **Ensure you have stopped all master and worker processes of TrashPoss.**
- **Ensure you have backups of the database before performing any commands.**
2023-05-03 01:53:57 +02:00
2023-02-20 21:13:55 +01:00
## Misskey v12.119 and before
```sh
2024-04-06 22:37:46 +02:00
git remote set-url origin https://iceshrimp.dev/Crimekillz/trashposs.git
2023-02-20 21:13:55 +01:00
git fetch
2023-12-11 15:52:48 +01:00
git checkout v2023.11.4 # or any other tag or dev
2023-02-25 19:08:37 +01:00
2023-12-11 15:52:48 +01:00
# build and run migrations using preferred method
2023-02-20 21:13:55 +01:00
```
> **Note**
> Migrating from Misskey v13 and its forks (Sharkey et al) is unsupported due to database schema changes.
## FoundKey
2023-02-20 21:13:55 +01:00
```sh
2024-04-06 22:37:46 +02:00
wget -O fk.patch https://iceshrimp.dev/Crimekillz/trashposs/raw/branch/dev/docs/fk.patch
git apply fk.patch
cd packages/backend
2023-12-11 15:52:48 +01:00
```
2023-02-20 21:13:55 +01:00
2023-12-11 15:52:48 +01:00
Run `npx typeorm migration:revert -d ormconfig.js` for every migration until you see that `uniformThemecolor1652859567549` has been reverted. Command will not terminate properly after reverting, so you'll have to Ctrl-C
2023-02-20 21:13:55 +01:00
2023-12-11 15:52:48 +01:00
```
2024-04-06 22:37:46 +02:00
git remote set-url origin https://iceshrimp.dev/Crimekillz/trashposs.git
2023-02-20 21:13:55 +01:00
git fetch
2023-12-11 15:52:48 +01:00
git checkout v2023.11.4 # or any other tag or dev
2023-02-25 19:08:37 +01:00
2023-12-11 15:52:48 +01:00
# build and migrate using preferred method
2023-02-20 21:13:55 +01:00
```
2023-03-31 04:34:42 +02:00
2023-12-11 15:52:48 +01:00
## Firefish
Run `docker exec -it firefish_web /bin/sh` if using docker, before doing reverts.
2023-12-11 16:10:14 +01:00
Go to `packages/backend`, revert migrations manually using `pnpm run revertmigration:typeorm` for every migration, until `FirefishRepo1689957674000` has been reverted. Command will not terminate properly after reverting, so you'll have to Ctrl-C.
If you are migrating from versions newer than 1.0.3, you'll also have to run `pnpm run revertmigration:cargo` for every migration, until `m20230806_170616_fix_antenna_stream_ids` has been reverted.
2023-12-11 15:52:48 +01:00
Build and run migrations using your preferred method.
### Troubleshooting
If migration `IncreaseHostCharLimit1692374635734` failed to revert, please run `DELETE FROM "migrations" WHERE "name" = 'IncreaseHostCharLimit1692374635734';`
2023-03-31 04:34:42 +02:00
## Reverse
2024-04-06 22:37:46 +02:00
You ***cannot*** migrate back to Misskey from TrashPoss due to re-hashing passwords on signin with argon2, however theoretically you should be able to migrate from TrashPoss to Iceshrimp.