Closed ghost closed 8 years ago
You have to do db migration
npm install
making sure you install the latest packages..sequelizerc
, change the value of the variable url with your db connection string.node_modules/.bin/sequelize db:migrate
to do db migrationSee more here
Thanks for the answer but what is the "db connection string" ?
It means the URI which will use to connect your DB.
For example: postgres://username:password@localhost:5432/hackmd
Thanks!
It worked well but 500 error is still here:
2016-06-01T21:09:38.253Z - info: HTTP Server listening at port 3000
2016-06-01T21:09:42.548Z - info: ::ffff:127.0.0.1 - - [01/Jun/2016:21:09:42 +0000] "GET /500 HTTP/1.1" 500 - "https://md.unixcorn.org/GYZgjApgLAHAbAQwLQLgIwOxKhgJrlCBKJGATjinTJgGMwAGDIA=" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17"
2016-06-01T21:09:42.610Z - info: ::ffff:127.0.0.1 - - [01/Jun/2016:21:09:42 +0000] "GET /vendor/bootstrap/dist/css/bootstrap.min.css HTTP/1.1" 304 - "https://md.unixcorn.org/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17"
Thanks again for your time. 👍
Huh, the logs show nothing I can help.
Usually when 500 error should give you more infos in the logs.
Please tell more about your system environment, are you using docker-hackmd
?
Did you run npm install
and bower install
after upgrade?
Maybe refresh your browser many times? Restart your browser and try again?
Or restart your server then try again?
Thanks.
I didn't use Docker, HackMD run in a CT. Which I putted back in a previous state before the upgrade.
So I followed what you tell me to do to a clean upgrade and now I have an other error.
error: SequelizeDatabaseError: ER_BAD_FIELD_ERROR: Unknown column 'refreshToken' in 'field list'
Thanks for helping.
No problem.
I think that's the same error, the column field can't be found in some table. You need to do db migration again.
I didn't understand because I have already take care of the db migration, as Node told me:
Sequelize [Node: 6.2.0, CLI: 2.4.0, ORM: 3.22.0]
Parsed url mysql://umd:*****@localhost:3306/umd
No migrations were executed, database schema was already up to date.
Now I can't access to pages, there is just: internal error
on white blank screen.
Because you've done db migration before.
There is a table called SequlizeMeta
which indicate your migration status, you need to remove it in order to do that again.
I have the same question when use Postgresql db to open a new note. It showed 500 error :
2016-06-03T06:57:42.199Z - error: SequelizeDatabaseError: column owner.accessToken does not exist
at Query.formatError (/Users/yanyunsu/Desktop/hackmd/node_modules/sequelize/lib/dialects/postgres/query.js:357:14)
at null.<anonymous> (/Users/yanyunsu/Desktop/hackmd/node_modules/sequelize/lib/dialects/postgres/query.js:88:19)
at emitOne (events.js:77:13)
at emit (events.js:169:7)
at Query.handleError (/Users/yanyunsu/Desktop/hackmd/node_modules/pg/lib/query.js:108:8)
at null.<anonymous> (/Users/yanyunsu/Desktop/hackmd/node_modules/pg/lib/client.js:171:26)
at emitOne (events.js:77:13)
at emit (events.js:169:7)
at Socket.<anonymous> (/Users/yanyunsu/Desktop/hackmd/node_modules/pg/lib/connection.js:109:12)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:153:18)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:531:20)
But Mysql worked well.
How strange... @YYSU Did you do DB migration with PostgreSQL too?
I forked the latest version ,so I didn't do DB migration with both. I just did the DB migration with PostgreSQL, Now It works well ! Thanks again for helping.
@matunixe Hi, are you still trying?
@matunixe I also found you actually can do node_modules/.bin/sequelize db:migrate:undo
to revert the previous migration.
So basically this issue will definitely happen when you forget to do db migration after upgrade. I assume this was solved, @matunixe please reopen if you need further helps. Thx!
Sorry to not answered you earlier @jackycute. I didn't have the time to make tests and debug furthermore for the moment, so I just rollback the state of my container with the precedent snapshot and didn't make the upgrade for the moment.
It's ok @matunixe. Next time when you trying to upgrade, check the upgrade guide in the README.md first, I will keep update it. Good luck!
Hello there,
Since the last update I have the following error:
SequelizeDatabaseError: ER_BAD_FIELD_ERROR: Unknown column 'owner.accessToken' in 'field list'
, what can I do? Thanks in advance.