Database Manager bugs

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.

  1. I started off by adding the most basic shell tables that only contained the ID field as type UUID.
  2. I populated the user table with additional fields
  3. 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.
  4. 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.
  5. I try refreshing the schema a few different ways and get the message about changes being lost and click ok.
  6. The schema is refreshed and now the multi-reference fields show as two tables “permissions” and “users”.
  7. I try to add the isActive field to the user table again and receive the same error message.

This is where I start recording.

  1. In the video you can see the “permissions” and “users” multi-reference tables and the two error changes.
  2. I open the context menu on the “permissions” table and click Refresh Schema and click ok on the message about unsaved changes.
  3. I then use the Refresh icon at top of Database Manager and refresh schema.
  4. Now the “permissions” table is renamed to "Rolepermissions"
  5. 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.
  6. 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.

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

  1. 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?

A follow on. Since I do not see a successful change for the isActive field on the user table I attempted to apply one of the unsuccessful changes in the Change history. When I do, I get a totally unrelated error message about creating the rolepermissions table.

I then look at the two change files and notice that each has lumped the creation of the rolepermissions into the changes that should only have the isActive field as the change. I can even see in the “Add fields to role table” where those two fields were created, so why are they being added again in the change where I only added the isActive field?

Here’s the first change adding the mutli-reference fields

Here’s the next change that should only have the isActive field on user table

Here’s the next change that should again only have the isActive field on the user table

But where is the change for the successful addition of the isActive field?

all fixed now, see:

Thank you, @George! I’ll revert to snake case and start over. :slight_smile:

well it is usually a matter of company policy or existing databases naming convention, but if you have a choice leave it to snake case indeed.

We will be adding also on option in the next update to be able to specify the naming convention per database connection as well.

1 Like

Fixed in Wappler 5.3.3

This topic was automatically closed after 26 hours. New replies are no longer allowed.