StevenM
September 24, 2020, 11:29pm
1
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();
})
};
JSmith
September 24, 2020, 11:34pm
2
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!
StevenM
September 24, 2020, 11:56pm
3
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.
StevenM
September 25, 2020, 12:02am
4
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
JSmith
September 25, 2020, 12:03am
5
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.
JSmith
September 25, 2020, 12:05am
6
That’s even better - glad you got it all sorted out
1 Like
JSmith
September 25, 2020, 12:06am
8
You’re mostly welcomed!
1 Like