Fresh install - no tables are created except migrations and migrations_lock
See original GitHub issueIssue Summary
After doing a fresh install of Ghost on Ubuntu 18.04 - no tables are created except migrations
and migrations_lock
. Ghost fails to start with an error about the migration lock.
To Reproduce
- Follow the official manual to install Ghost on Ubuntu
- Ghost fails to start with a message:
Migration lock was never released or currently, a migration is running.
If you are sure no migration is running, check your data and if your database is in a broken state, you could run `knex-migrator rollback`.
- Try executing
knex-migrator rollback
. It fails with the message:
NAME: InternalServerError
MESSAGE: Please provide a file named MigratorConfig.js in your project root.
- Connect to MySQL and check the database. Ensure that your ghost database (
ghost_prod
in my case) is in place. Check the tables in the DB:
mysql> use ghost_prod; show tables;
+----------------------+
| Tables_in_ghost_prod |
+----------------------+
| migrations |
| migrations_lock |
+----------------------+
- Remove all items from migrations_lock
mysql> delete from migrations_lock;
- Try running
ghost setup migrate
. There is no output or errors. - Try running
ghost start
. See the same error from step 2
Technical details:
- Ghost Version: 2.23.0
- Ghost CLI Version: 1.10.0
- Node Version: 8.10.0
- Browser/OS: Ubuntu 18.04
- Database: MySQL 5.7.22
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Database: Migrations - The PHP Framework For Web Artisans
The migrate:fresh command will drop all database tables regardless of their prefix. This command should be used with caution when developing on a...
Read more >Migrations - Django documentation
Migrations ¶. Migrations are Django's way of propagating changes you make to your models (adding a field, deleting a model, etc.) into your...
Read more >Avoiding downtime in migrations - GitLab Documentation
You can consider enabling lock retries when you run a migration on big tables, because it might take some time to acquire a...
Read more >Documentation: 15: pg_dumpall - PostgreSQL
Description. pg_dumpall is a utility for writing out (“dumping”) all PostgreSQL databases of a cluster into one script file. The script file contains...
Read more >EF core not creating tables on migrate method - Stack Overflow
Alright - In SQL Server Management Studio (or whichever tool you're using), drop your database thats been created. Clear out your Migrations ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@sintezcs @joshuajbouw thanks for the log outputs! I think I know where the issue is now, though not why it’s occurring necessarily. Need to debug this a bit more, but will work on getting this fixed as quick as I can 😄
I’ve just figured out the issue. I created a new Ubuntu user named “ghost” in the first step… 🤦♂ After I removed it and used “ghostuser” instead, everything worked smoothly.