Here we go again. I’m starting over with an entirely new project. Here’s the list of changes. I specifically made each change as basic as possible to be able to easily read what happened in each.
Wappler Version : 5.3.2
Operating System : Windows 11
Server Model: node.js
Database Type: postgres
Hosting Type: local docker
Expected behavior
After adding multi-reference fields I should be able to add other fields to user table.
Actual behavior
An error is thrown
How to reproduce
Watch the entire video.
- I started off by adding the most basic shell tables that only contained the ID field as type UUID.
- I populated the user table with additional fields
- I populated the role table with additional fields, this included creating multi-reference fields/tables between Role and Permission & Role and User. Initially these were shown as fields on the role table with the two crossing arrows icon.
- I then tried to add a boolean field to the user table and was thrown an error about roleid. I don’t recall the exact error.
- I try refreshing the schema a few different ways and get the message about changes being lost and click ok.
- The schema is refreshed and now the multi-reference fields show as two tables “permissions” and “users”.
- I try to add the isActive field to the user table again and receive the same error message.
This is where I start recording.
- In the video you can see the “permissions” and “users” multi-reference tables and the two error changes.
- I open the context menu on the “permissions” table and click Refresh Schema and click ok on the message about unsaved changes.
- I then use the Refresh icon at top of Database Manager and refresh schema.
- Now the “permissions” table is renamed to "Rolepermissions"
- I attempt the same two actions (refresh on table, then at top of Database Manager) on the users table, but its name is not updated.
- I try a few more times, but the users table never changes name, but I notice that the “Apply Database Changes” shows one item, so I apply it to figure out what it is. it doesn’t show a change in change history, so I go to Git Manager and see the the db.json file was modified.
It looks like the only change is the sequence. Both files show the same edits, but the two multi-reference tables were moved around.
Why?
14. I commit it to have it in git.
15. I try to add the isActive field to the user table again and it’s successful, but it does not show in Changes!!! Where is this change???
Additional bug report: Database Changes no longer appearing in Changes section
- I also look at the fields added in the role table changes and see that the table named “users” should actually be named “Roleusers”. Why doesn’t the Database Manager match?