Wappler Version : 4.0.0 Beta 6
Operating System : Windows 10
Server Model: PHP
Database Type: Postgres
Hosting Type: IIS
Expected behavior
What do you think should happen?
Be able to edit existing queries in server actions
Actual behavior
What actually happens?
When I open an existing query, a warning says that a table does not exist. However, I am able to refresh the table schema in the database manager. Every time I try to edit the query, the set of existing and not existing tables vary.
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
Connect to a Postgres database with several schema.
Create a server action using tables from different schemas.
I refresh both schemas in the manager first.
But it seems that when I refresh one, it forgets the structure of the other schemas.
For example, it cannot find data_selected.article, so I refresh data_selected. Then it can find it, but it cannot find ariane.accessory_link anymore. So I refresh ariane, then it can find ariane.accessory_link but cannot find data_selected.article anymore.
hmm seems like some database errors occur. Do you see any errors in the properties panel, when you click on any of the “no columns info available…”
What is your exact Postgres version and where is it running?
Do you had this problem btw with Wappler 3? Or is it specific to Wappler 4 beta?
I don’t actually see any errors in the log. Did you try refreshing those tables and schemas in the database manager? where you got errors on the other schema. I would really like to see a log of that.
I found a manual work-around, but not very convenient on the long term.
I went to the .wappler/targets/targetname/databases/ folder and opened the connection json. I manually added all the database structure, restarted Wappler. I could edit the query.
Then, I went back to the database manager, refreshed one table schema. The issue came back.
I checked on the connection json. Only the structure of that schema stayed, the structure of all other schemas disappeared.
So I decided to check on what happens when I refresh other tables. Every time I refresh a table in the database manager, it drops the structure of the other schemas. I don’t know why it does it this way. But I understand why I cannot edit queries based on several schemas, because it can keep in memory only the structure of one schema.
I attach the json files created after each time I refreshed table structure from different schema.
I cannot refresh schemas, but I can refresh Tables of schema. That will show only the table names of the schema, not their columns. If the JSON, I can see strcuture of the first schema and table names of the second.
I need to refresh each table to get its columns, and then I lose the structure of first schema.