I’m trying to update a Ghost site from 1.x to 2.0, and I’m running into some issues running the knex-migrator.
Unfortunately my hosting provider (NearlyFreeSpeech.net) does not give me root access, so I am unable to use the Ghost CLI. Previously I have managed to wrangle everything to let me install Ghost using pure npm commands, but now I’m trying to to update I’m running into an issue.
I’m making a fresh install of Ghost 2.0 using npm, and then copying my sqlite3 databases over to the new content directory. This all seems to work fine. Then I go to run the knex-migrator migrate command:
NODE_ENV=production ./node_modules/knex-migrator/bin/knex-migrator migrate --mgpath node_modules/ghost
Which gives me the following output:
[2018-08-26 22:48:33] INFO Creating database backup
[2018-08-26 22:48:33] INFO Database backup written to: /home/protected/blog/content/data/jons-blog-spot.ghost.2018-08-26.json
[2018-08-26 22:48:33] INFO Migrating Koenig beta post's mobiledoc/HTML to 2.0 format
[2018-08-26 22:48:33] INFO Migrated Koenig beta post's mobiledoc/HTML to 2.0 format
[2018-08-26 22:48:33] INFO Adding demo post.
[2018-08-26 22:48:34] INFO Rollback: Fixture posts.
[2018-08-26 22:48:34] INFO Rollback: Bring back demo post.
It then prints out the contents of the demo post explaining the new Koenig editor, and then ends with this error:
Error: SQLITE_ERROR: table posts has no column named comment_id
It seems that the migrate command is attempting to add the demo post to my database, but one of the columns it expects is missing. Is there a way to get the migrator to properly add the missing column? Alternatively, is there a way I can convince it to not attempt to add the demo post to my blog and just skip it entirely?