I accidentally dropped a table using the mysql command line. Luckily the table was empty.
But I need this table back. So I would like to re-run only the migration for that table, and not for other tables since these are still present.
When I run knex migrate:latest
, it returns "Already up to date". The same if I npm run migrate name-of-specific-miration-file
.
I use knex. How can I run only the specific migration file I want it to run?
I got it to work doing the following:
create table my_table_name (hello text);
knex migrate:down name_of_migration_file.js
knex migrate:up name_of_migration_file.js