Wappler Version : last stable 6.0.0
Operating System : Sonoma 14.1.1
Server Model: Node.JS
Database Type: DO PostgreSQL
Hosting Type: custom server
I have some ERROR CONNECTION - when I try to add field in table - process with applying database successfully, but new field not show in table. When I trying refresh full scheme - have error
An error has occurred connecting to the database!
SELECT DISTINCT rc.TABLE_NAME AS ‘table’, kcu.COLUMN_NAME AS ‘column’, c.ORDINAL_POSITION, rc.REFERENCED_TABLE_NAME AS ‘foreign_key_table’, kcu.REFERENCED_COLUMN_NAME AS ‘foreign_key_column’, rc.CONSTRAINT_NAME AS ‘constraint_name’, rc.UPDATE_RULE AS on_update, rc.DELETE_RULE AS on_delete FROM information_schema.referential_constraints AS rc JOIN information_schema.key_column_usage AS kcu ON rc.CONSTRAINT_NAME = kcu.CONSTRAINT_NAME JOIN information_schema.columns c ON c.TABLE_NAME = rc.TABLE_NAME AND c.COLUMN_NAME = kcu.COLUMN_NAME WHERE rc.CONSTRAINT_SCHEMA = $1 ORDER BY rc.TABLE_NAME, c.ORDINAL_POSITION - syntax error at or near “‘table’”
ChatGPT gave advise - The issue is related to the use of single quotes around aliases like 'table' . In PostgreSQL, double quotes should be used for aliases, not single quotes. Also, it’s advisable to use lowercase identifiers for table and column names to avoid potential conflicts.
No, the problem was with adding fields to the table - the names were normal, lower case, Wappler just didn’t reflect the changes and seemed to be trying to re-create the fields on further actions - but that’s my guess.
Did you try manualky refreshing the schema after applying the changes?
Sometime it does not refresh automatically so wappler get confused thinking the fields are not present (by reference to local schema copy) so tries to reapply them again.