Wappler Version : 3.0.0 Beta 5
Operating System : W10Pro-latest
Expected behavior
What do you think should happen?
The project's database structure and data were saved as a backup while on the local (Docker) target.
When deploying a new (remote Docker) target that database structure (of the default db database) should be copied to the new target on deployment, according to @George. This is my db structure on the local Docker target:
Actual behavior
What actually happens?
The database structure is not copied and demo database structure from Wappler is created on the Docker remote target:
How to reproduce
Setup a local docker target with default db Database (PostgreSQL)
Create a database structure, tables and fields
Save Database Data and Structure:
Setup a remote Docker target, also with PostgreSQL database:
Deploy the project on the remote target
Check the default db database structure in the database manager and see the expected database structure is not there.
While being advised before to try the beta version as a solution for this issue, I also tried on stable version before and had the same problems there.
I also mentioned this problem to @George and @Teodor in a private conversation before, there's even a video where I reproduce the issue in this post.
EDIT: I tried the same process on a local docker target, also doesn't copy the database structure and data.
Please let me know if you need more details. Thanks.
To anyone who’s experiencing these problems, here’s a solution/workaround for it:
In Wappler, open your app on the origin target you want to copy the database data and structure from (in my case the local docker target).
Click the Save Database Data and Structure button.
Go to the specific target’s database initialization folder: .wappler/targets/your_origin_target/db_init
Copy the db_save.sql file to your new target’s database initialization folder: .wappler/targets/your_new_target/db_init (in my case the remote docker target)
Deploy your app on the new target and find your database structure and data there
Hey @Emiel! Thanks for your reply! George helped me and it was the postgres log option on enviroment config, it should be set to “off” for production env!
Maybe this is a necessary config to postgres DB + docker
that is only meant for initial database creation and not recommended if you have created the database structure with the database manager from the start. You can then just use the database manager to apply your changes and don’t have to deal with sql code any more.