Error changing table with Database Manager

======== TEMPLATE BUG FORM ========

Wappler Version : 5.4
Operating System : Windows 11
Server Model: NodeJS
Database Type:MySQL
Hosting Type:Docker

Expected behavior

What do you think should happen?

Database manager should update a change to a field.

Actual behavior

What actually happens?

Database Manager tries and reproduce the entire table and cannot since it already created the table. The database manager will show that there are changes for a table even though there are not. This happens after 2 or 3 commits not initially.

How to reproduce

  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue
  1. Start and new NodeJS Project and Create and upload table to server using Database Manager.
  2. Create 2 more tables with an upload each time.
  3. Go attempt to change a field in the first table. Suddenly Wappler will show that there are changes pending, in this case 22 changes, even though the only change was to add a now() to an existing datetime field.
  4. Refresh the schema and lose changes. Now Wappler shows changed pending on table but no changes for upload.
  5. Make any change using the database manager now, like adding another column and it always says there are 22 extra changes to make. When it tries to apply the changes it produces and error saying it cant create the table, the first table ever created, because it already exists.
    7, The only way to be able to make changes using the Database Manager is to roll back changes to before the first table creation, in my case 3 steps, and start over again.

Shows a a change is pending even though one is not.
Screenshot 1

Shows fields are new even though they are the first ones created on project.
Screenshot 2

Does not show pending changes until you simply highlight a field. Then it shows 22 pending changes.
Screenshot 3

The table with the changes is acually the intial table add. All the other updates went fine.
Screenshot 4

If you try and apply the changes you get this error, Table already exists.
Screenshot 5

Screenshot 6

Migration file with a create table for an existing table. The only update was the default now() was added.
Screenshot 7

You seem to have some unapplied changes.

Right click on the tables node and choose refresh schema from the context menu.

DO NOT reset changes as @bsg suggest as you will loose all your history!! And won’t be able to apply changes to other remote targets.

Thats the thing I don’t have any changes due to be applied except the one update to the default (added an fn.now). It suddenly says it has 22 changes and if you try and apply them it tries to recreate an already existing table and throws an error. The curious part is it always shows the “pending” changes orange dot even if there are now changes to apply.

Well if you refresh database schema as I said above any wrongly pending changes will disappear and everything should be fine.

They do until I touch the table and then they reappear.

I sent you a video of the issue.

You should refresh the tables schema not from the toolbar icon but by right clicking on the “tables” node and then choose Refresh schema from the context menu

Choosing from the context menu made no difference. Problem still persists.

i have this same issue. if i submit it says nothing to submit, but when i click the table it sys 4 in the blue updater. I right click on table and refresh schema (this took the blue icon from 11 to 4) but i have refreshed a few times and it says 4 , but nothing will submit.

been at it for hours :frowning: also all videos i can find on using the DB (if i get it setup) seem old and related to older versions of wappler, my trial expires tomorrow :frowning: i seem unable to get basics working and find any upto date docs of youtub videos ho hum

thanks