I use Navicat to create the database. Usually, schema changes are picked up by Wappler - eg column changes. At ther times it seems almost impossible to get Wappler to recognise changes, particularly when adding a new table. Is there a specific way this should be done? I don’t think this was a problem in the past.
Below are the methods I try.
Database Manager:
Refresh icon at the top
Database Connections > db : right-click Refresh List + Refresh Full Schema
Database Connections > db > Tables : right-click Refresh Schema
Workflows/Server Connect:Globals > Database Connections > db : Test Connection button (with Direct Connecion option selected)
Database Query Builder
Refresh Button
Restarting Wappler
Would it be simpler to edit a config file? If so, which one(s)? This one:
.wappler\targets\targetname\databases\db.json
?
All you need to do is to refresh full schema in database manager. Once everything is refreshed there all the database connector dialogs (insert/update/query) will have the new tables.
I included this in my list. It’s the first thing I try. I’ve tried this many times. Sometimes it works - recently, more often not.
I think I’ve found a way to resolve it:
Delete the contents of:
.wappler\targets\targetname\databases\db.json
Click Test Connection button in:
Globals > Database Connections > db
(this creates the basic table schema )
Refresh full schema in database manager
(creates the rest of the schema - column details etc)
It seems like a bug, but as nobody else has mentioned it, as far as I know, perhaps it’s something with my set up. I can’t remember how I fixed it last time. Perhaps I deleted the cache files.
I can't really recreate this issue locally. When using an external db tool to create a table in my mysql db, then refresh schema in the db manager, then after refresh i see all the new tables.
I newer have had this problem att all. I use mysql and updates the database often with an sql editor of some kind.
I just use “refresh all schema” in database manager and it gets any changes I have done. And if I have a api that calls to a database, open in editor when I refresh the schema I somethimes have to refresh the database ther also.
Thanks @Teodor - and @brad and @tehowden. I’ve created new tables for testing and they appeared using the method you suggested. I don’t know why some tables refuse to appear.
Sometimes there are permissions on tables and you have to allow access to them? I know I have had to change permissions when setting up Microsoft SQL tables.