forked from FoundKeyGang/FoundKey
docs: update migration guide to deal with typeorm hanging on reverts
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:
parent
a5080f80a1
commit
29320a751d
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue