Database Structure not copied to fresh remote Docker target on deployment

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:
image

Actual behavior

What actually happens?
The database structure is not copied and demo database structure from Wappler is created on the Docker remote target:
image

How to reproduce

  1. Setup a local docker target with default db Database (PostgreSQL)
  2. Create a database structure, tables and fields
  3. Save Database Data and Structure:
    image
  4. Setup a remote Docker target, also with PostgreSQL database:
    image
  5. Deploy the project on the remote target
  6. 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.

1 Like

To anyone who’s experiencing these problems, here’s a solution/workaround for it:

  1. 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).
  2. Click the Save Database Data and Structure button.
  3. Go to the specific target’s database initialization folder: .wappler/targets/your_origin_target/db_init
  4. 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)
  5. Deploy your app on the new target and find your database structure and data there :raised_hands:
2 Likes