Database table modifications do not stick

Wappler Version : 6.0.0
Operating System : Windows 11
Server Model: node
Database Type: postgres
Hosting Type: Docker local

Expected behavior

When I make a modification to data using Wappler’s data viewer and save it, the changes should be permanent.

Actual behavior

After making the change and saving, then clicking Fetch Data the previously made change disappears. This has been an issue for a long time on this project. It only happens in the Wappler UI. If I build logic in my app code to add/modify/delete then the changes are properly reflected in the database.

How to reproduce

Changes are indeed queued either for direct execution or saving as database changes. The choice is given when you save the updates but it seems with full record delete the changes aren’t recorded, will check it out.

It’s any changes.

Just to confirm. If I save with the toggle to the left, then that is an immediate data change? If yes, then it’s not working as expected.

It even shows “Database changes saved!”, but the value is gone.

This is specific to this project, I do not have this issue with other projects.

I see you are using UUID as id field. Is it also marked as primary? If no primary fields are found then the delete will fail, so hence the returning records.

It is set as primary.

image

BeeKeeper shows it set as well.

I am able to create new records in any of the tables. I am also able to delete and modify records in some of the tables, but not in others.

Here’s an example of adding, modifying, and deleting in the Account_Trial table.

Here’s another example, but I’m only able to add. Modifying and deleting do not work on the AccountPlan table.

Found the issue, not sure what the solution is though.

Looks like when you use knex.fn.now() to set the dates it works on the initial creation, but it causes issues on any future changes.

image

See this video showing before and aftering adding it to a datetime field.