Database Problems - Unable To Remove Change That Is Not Reflected In DB

Hi,

I have applied a change to the database but these changes have not been reflected in the database. It does look as though this change has been applied according to Wapplers UI. Image below

image

When I try to undo this change I get.

I tried to delete the change but then I get this…

I’m a bit stuck and unable to edit my database any ideas how to get around this?

Thanks,

Well how can this change be applied when it is not?

Did you remove the column that the change added manually and now you are trying to undo the change?

You should have undone it as change because now if you just throw it away while already executed you will corrupt the database history …

I agree it’s a strange one. I have not manually changed any anything with the database it has all been done by the database manager in Wappler. Is there any fix you can think of?

That last change only adds one field to a table but this is not there. This it the table
image

This is the migration file

Thanks,

Hmm this seems like a bad change indeed. I see those undefined fields … what were the database types you choose for those columns?

Also what is the exact Wappler version are you using?

The ‘fkVehicleID’ is a reference to the Vehicle Table.

The ‘fkUser’ is a reference to the User to the user table. This is just to keep a track of who created the database entry.

The ‘PassFail’ is a Boolean.

Currently on 6.0.0-b12.

Thanks,

And which fields made it? You can comment out those that aren’t executed in the down script with dropColumn and then save and undo the change.

Thanks George. Sorry I’m not following, Which field made it and which bits am I commenting out?

Attached is the migration file that made the table if that is any help.

I see and what is not currently in the table? If you refresh its schema?

Thanks. After the refresh I have
image

The only field missing is ‘Reason’. This was all I added in the last migration.

Also should the ‘Table’ be the vehicle table not the user as it is sat under the vehicle table.

Have you tried a full schema refresh, often when making changes the schema is not refreshed automaiically so although the change has been made, the change is not reflected in the ui or the schema table so wappler gets confused.

Thanks @Hyperbytes. Just checking it is the one in the screenshot below or is there another one I can try.

I tried this one but without success.

That’s it, guess that didn’t fix things

Thanks @Hyperbytes . No unfortunately not. Has anybody got any other ideas how to resolve? I’m a bit stuck until I can get it fixed as I can’t make any changes to my DB structure.

you can just comment out those lines:
image
by putting /* before them and */ after

then after you save you should be able to undo the change.

Brilliant thanks for your help George. I was now able to undo this change.

image

Do I now delete this change or keep it there?

Thanks again

Yes now is it save to delete.