Refresh Database Schema in query builder not working for views

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

Wappler Version : 3.9.3
Operating System : Windows 10
Server Model: PHP
Database Type: MySQL
Hosting Type: Local WAMP

Expected behavior

What do you think should happen?

When I go into MySQL and make a change to the columns selected in a view, the “Refresh Database Schema” button should cause those changes to be reflected in a database query. This is how it worked in 3.7.3.

Actual behavior

What actually happens?

Since 3.9.3 I’m finding very often this doesn’t happen. Instead I have to:

  1. delete the view in the database
  2. refresh the schema in Wappler
  3. recreate the view in the database
  4. refresh the schema in Wappler again

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

Create a view, refresh the database schema. Then change the columns selected in the view and refresh the database schema again. There is a high probability that the change in the view will not be seen.

PLEASE DELETE THE BUG TEMPLATE DUMMY TEXT BEFORE POSTING THE TOPIC!

Do you see this issue in the Query builder dialog?
You should be able to refresh the data and see the changes when you do it in the database manager.
So instead of deleting your views and recreate them can you try doing this:

  1. Make changes to the view
  2. Open database manager and refresh your table/view there
  3. Open the query builder and check if the view is updated there?

Hi there @Teodor

Yes, that does work.

However I do not use Database Manager, and until I upgraded to 3.9.3 I could do this within a database query, so it definitely seems like a bug as the Refresh Database Schema button within a database query (and insert, update etc) no longer works.

I’ve just needed to change some columns in an actual database table and the same issue applies with tables too.

You don’t need to use it in order to refresh the schema. A lot easier than recreating the view every time.

Correct, seems like that we will check this.

1 Like

This is a known bug.

We encourage you to use the Database manager.

Thanks for the update @george

I have a whole methodolgy and familiarity for an immensely complex database within MySQL Workbench so unfortunately I won’t be changing that over to Database Manager.

Actually @Teodor, @George I’ve just discovered another bug which is part of this…

In Database Manager, if I refresh the Database itself, it does not refresh Views, it only refreshes Tables.

To refresh a view I need to go down and find the view itself.

1 Like

You don’t have to apply your database edits with the database manager, you can use it is view only of your database structure.

Managing your changes with database manager has a lot of advantages like version control and automatic up and downgrade.

But hey some people like manual hard labor :slight_smile:

Well @George, sometimes my database upgrades involve a stored procedure to upgrade the database content itself… so it is much easier for me to manage all of that in one place.

It’s really painfull if you change the (external) database, go to insert or query step, refresh and the new fields are not shown. Then you have to go to database manager, find the view, and refresh it there manually.

I don’t think that this is a good working experience.

2 Likes

Are there any intension to fix this problem? While implementing new server actions with new tables/database fields I’ve got to manually refresh the manually selected view/table in the database manager all the time.

1 Like

Yes, would be great to know the planned fix release for this…

Is there a specific reason why this issue won’t be fixed?

1 Like

This has been fixed in Wappler 3.9.7

This topic was automatically closed after 3 days. New replies are no longer allowed.