Newbie again.
I searched a lot of the forums, but I don’t get it:
The challenge:
- Local Development, local database
- Remote Server, different database (in this case Railway, but it doesn’t matter)
What exactly do I have to do to get my project published (to an external folder_ with different database settings for production?
The docs and the forum are not a great help for a beginner, as they refer to different versions and features who work / behave differently.
What I tried:
- First and obvious: I entered the DB details on a new target. After publishing to the local folder, still
localhost
in the connections. - Went to the database manager, added a new database connection (was recommended somewhere, didn’t understand exactly what it does, but hey: I could connect to my remote database from within the database manager. Btw, after deleting them, I get tons of error messages in the logm see below *1 )
- Found a how to and a video somewhere where I can switch between my targets (bottom right of the window) and enter different settings. Seems legit, but no: under
connection properties
→connection options
the last entered dabase settings are visible → doesn’t work for me?
Edit: Define Database Connection Settings per Target - Next try: Database Manager, selected my database, pressed
Direct Database Connect
and entered my details (e.g.localhost
), then switched to my other target and I could enter new connections setting who are switching. However, it doesn’t change the database settings for the published project.
*1 Error from the console when switching targets:
TypeError: Cannot read properties of undefined (reading 'type') at r.delete (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:8:108014) at Object._execute (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.contextmenu_fontawesome.js:8:4351) at HTMLAnchorElement.<anonymous> (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.contextmenu_fontawesome.js:8:11516) at HTMLUListElement.dispatch (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5430:27) at HTMLUListElement.elemData.handle (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5234:28) at HTMLUListElement.sentryWrapped (/Applications/Wappler.app/Contents/Resources/app/node_modules/@sentry/browser/dist/helpers.js:75:23)
TypeError: Cannot read properties of undefined (reading 'type') at r.delete (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:8:108014) at Object._execute (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.contextmenu_fontawesome.js:8:4351) at HTMLAnchorElement.<anonymous> (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/jsTree/jstree.contextmenu_fontawesome.js:8:11516) at HTMLUListElement.dispatch (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5430:27) at HTMLUListElement.elemData.handle (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5234:28) at HTMLUListElement.sentryWrapped (/Applications/Wappler.app/Contents/Resources/app/node_modules/@sentry/browser/dist/helpers.js:75:23)
TypeError: Cannot read properties of null (reading 'data') at refreshSchemaForNode (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:8:163294) at HTMLButtonElement.<anonymous> (file:///Applications/Wappler.app/Contents/Resources/app/Shared/DMXzone/dmxAppCreator/UI/databaseManager.js:8:45179) at HTMLButtonElement.dispatch (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5430:27) at HTMLButtonElement.elemData.handle (/Applications/Wappler.app/Contents/Resources/app/node_modules/jquery/dist/jquery.js:5234:28) at HTMLButtonElement.sentryWrapped (/Applications/Wappler.app/Contents/Resources/app/node_modules/@sentry/browser/dist/helpers.js:75:23)