Misskey: Errors during migration

Created on 25 Apr 2019  ·  9Comments  ·  Source: syuilo/misskey

💡 Summary

Migration spits out several different errors then gets stuck after migrating emojis and printing "DONE :)".
If I quit it after the "DONE :)" message and start Misskey, several things are broken or didn't migrate.

🙂 Expected Behavior

Migration

☹️ Actual Behavior

Migration spits out several different errors then gets stuck after migrating emojis and printing "DONE :)".
Here's my entire console output from the migration:
migrate.txt

If I quit it after the "DONE :)" message and start Misskey, thumbnails are gone, drive folders and files withing them are gone and instance settings are gone.

📝 Steps to Reproduce

1.Switch to migration branch
2.Edit config
3.npm i
4.npm run build
5.Create PostgreSQL user and database with:
CREATE USER misskey WITH PASSWORD 'password';
CREATE DATABASE misskey OWNER misskey TEMPLATE template0;
update misskey set encoding = pg_char_to_encoding('UTF8') where datname = 'misskey';
6.npm run init
7.npm run migrate
8.Force quit after "DONE :)"
9.Switch master
10.'npm install'
11.'NODE_ENV=production npm run build'
12.start Misskey

📌 Environment

Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-46-generic x86_64)
NodeJS v11.11
PostgreSQL 10
MongoDB 4.0.9
Misskey before migration 10.100.0
Migration Commit 747bf3b
Misskey after migration 11.4.0

⚠️bug?

All 9 comments

@matrix07012 can you try with 6ce986f commit?

Ok. I have to go to sleep, so I will try tomorrow.

I think, after resolved #4809 , this migration will successful.

I also forgot to mention that the migration branch doesn't include node modules monk, mongodb and @types/mongodb and you have to manually install them.

@rinsuki
I tried it with commit 318ae00, the error with date disappears, but all the other errors remain.
migrate.txt

Great job @sftblw . I migrated with only few errors. Drive folders and files in them work. The only thing missing are thumbnails. Is it possible to recreate them after the migration?

Here's my entire console output:
migrate.txt

I think you should adjust your database table to make #4809 actually applied.
There was no migration script provided for to do this, but you can still make it from your psql command line.

ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE VARCHAR(2048);

Maybe you can try 4096 if 2048 doesn't fit your current source.

regarding other errors, as rough view, it seems you can ignore them because most of those errors are casued by remote instance note/toots.

I think you should adjust your database table to make #4809 actually applied.
There was no migration script provided for to do this, but you can still make it from your psql command line.

ALTER TABLE "user_profile" ALTER COLUMN "description" TYPE VARCHAR(2048);

Maybe you can try 4096 if 2048 doesn't fit your current source.

regarding other errors, as rough view, it seems you can ignore them because most of those errors are casued by remote instance note/toots.

Yeah, I know. Those errors cause no actual problems. Bigger issue is the missing thumbnails/file previews.

As a information, I had same problem (missing thumbnails) but fixed by #4903 especially by 076b21a , by adding thumbnail URL to migration. My instance stored files on Amazon S3.

If you did not migrate yet I think checking the thumbnail URL via SQL might be useful.

As a information, I had same problem (missing thumbnails) but fixed by #4903 especially by 076b21a , by adding thumbnail URL to migration. My instance stored files on Amazon S3.

If you did not migrate yet I think checking the thumbnail URL via SQL might be useful.

I store everything locally.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tamaina picture tamaina  ·  3Comments

ibrokemypie picture ibrokemypie  ·  3Comments

syuilo picture syuilo  ·  3Comments

no-boot-device picture no-boot-device  ·  3Comments

ibrokemypie picture ibrokemypie  ·  3Comments