Databse can not update files missing error?

I am getting an error on the database when trying to update a change using the database manager.

I get this error?

I have not idea what is going on. I can edit via Navicat just fine. I assume it is something to do with a file whihc is generated when you add the database.

I wanted to start using the database manager HELP

The migration file contents:

exports.up = function(knex) {
  return knex.schema
    .table('Account', function (table) {
      table.datetime('expiry').notNullable().alter();
    })
};

exports.down = function(knex) {
  return knex.schema
    .table('Account', function (table) {
      table.datetime('expiry').nullable().alter();
    })
};

Hi there,

The error message clearly states that you have these files:

…Missing

If you use Version Control, you should at least have a backup of your project somewhere in order to bring them back and repair the migrations directory issue, otherwise, this message will keep persisting!

Not sure why.

This is a new project node and I connected to an existing docker hosted mysql database.

Perhaps because the database was changed using a previous node project and there is some meta data persisting.

Any idea which directory these files are located and may be able to copy them over from the old project folders.

Actually I see where it is coming from it the

wappler_migrations

table with the reference to that change.

cleaned the table and not getting that error now.

1 Like

Yes, that’s what’s happening indeed, answering your question the migrations files are held in this directory:

<PROJECT_PATH>\.wappler\migrations\db

try copying them over and restart or reload the Database Manager, see if your migrations issues are solved.

That’s even better :smiley: - glad you got it all sorted out :smiley:

1 Like

Thanks for your help!

1 Like

You’re mostly welcomed!

1 Like