docs: update migration guide to deal with typeorm hanging on reverts
ci/woodpecker/push/lint-foundkey-js Pipeline was successful Details
ci/woodpecker/push/lint-client Pipeline failed Details
ci/woodpecker/push/lint-backend Pipeline failed Details
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint-sw Pipeline failed Details
ci/woodpecker/push/test Pipeline failed Details

This seems to be a common occurrence with attempted migrations between different Misskey forks.

This is the best solution that I can come up with; someone who knows more bash could probably make this completely automated.
This commit is contained in:
Norm 2023-07-09 06:58:22 +00:00
parent a5080f80a1
commit 29320a751d
1 changed files with 3 additions and 1 deletions

View File

@ -21,10 +21,12 @@ LINE_NUM="$(npx typeorm migration:show -d ormconfig.js | grep -n nsfwDetection16
NUM_MIGRATIONS="$(npx typeorm migration:show -d ormconfig.js | tail -n+"$LINE_NUM" | grep '\[X\]' | nl)"
for i in $(seq 1 $NUM_MIGRATIONS); do
npx typeorm migration:revert -d ormconfig.js
npx typeorm migration:revert -d ormconfig.js || continue
done
```
**Note:** TypeORM might hang when reverting a migration. If it says that the migration was reverted successfully, you can force close TypeORM using Ctrl-C. The script will continue until all of the migrations have been reverted.
## Switching repositories
To switch to the FoundKey repository, do the following in your Misskey install location:
```sh