First, Ghost is awesome! Thank you!
Ghost-CLI version: 1.15.3
Ghost version: 3.41.6
Okay so here’s my issue. I have added migrations and have successfully used knex-migrator
to run them in my development environment with no problem. In my production environment, not so smooth. If I use ghost update --zip /path/to/zip
to update to my custom build, I can see that the new column/new table has not been added to my database – so migrations were not automatically run on update – okay no problem. But so if I manually run the migrations a la DEBUG=knex-migrator:* ./current/node_modules/knex-migrator/bin/knex-migrator migrate --mgpath=./current
, they don’t run either. I can see that the new column/new table has not been added and I can see that the new migrations are also not added to the migrations
table.
After banging my head against the wall for a bit, I tried just doing a fresh ghost install on a fresh new Digital Ocean droplet a la ghost install --zip /path/to/zip
and, voila, the fresh new database had my new column and table in it. But I of course don’t want to do a fresh new install when I add migrations.
What am I doing wrong? Does knex-migrator
look at something besides the migrations
table to check if it has already run a given migration? Does ghost install
successfully running the migrations provide any clue on why ghost update
is not successful? Do you have any advice or random things I can try? Thanks so much in advance.