Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
Knex - Already up to date

I am struggling with a problem connected with the migrations in knex on the production environment (heroku). I have made some changes and created 8 new migrations to update the model. After creating new migrations I have reached 47 migration files. After uploading the changes to the Heroku I executed as usual knex migrate:latest and there was no effect. I have received the message Already up to date.

I have decided to take a look at the knex_migrations table to see if maybe something is wrong there. The result that I can see that the new migrations were not written into that database (please see the picture for reference.

enter image description here

When we take a look at the migrations it looks like this:

enter image description here

Clearly we can see that knex was able to run "20200216191040_receiver_company.js" as last one.

When I take a look at the knex_migrations_lock table the only entry that is existing over there looks like this:

enter image description here

Does anyone know how to force knex to run the migrations? The version of knex that I use it 0.16.3.

EDIT:

I want to add that on the local machine I have no problems with running the migrations. Additionally, I have checked if the migration files are present on the server and after pulling the current state our of the Heroku I can see all of the migration files that were not executed.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

If the change of the migration is not implemented in the database, you can try to manually remove the record of the migration from the knex_migrations or you migrations table, and try to re-apply the knex migrate:latest command.

but before you try this way, make sure to keep a backup, or run it on your local machine or development server first.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!