Moving everything using Packages messes up my Data

Hi there,

Since I am live with my app, I try to implement a Dev environment. I set up another instance and wanted to copy the whole app+user+roles+scripts+etc. via Package from PROD to DEV. But that what User and Roles and APPs do not have the same IDs anymore. I have some Tables which have the ID of the creator an Information, and also some foreign-key-relations. They are all messed up now.

Is there a way to transport everything in a consistent way?

Thank You very much in advance.

Admin Application Version: 2.2.3
DreamFactory Version: 2.2.1

Greetings
Julian

@Julian_Kallidat

You can export the system database from dev instance and import in to prod db server.

Before import edit the ‘create’ statement in the .sql file to use another database name and save the changes to the .sql file. Next import the database in to the PHPMyAdmin or other SQL tool for the prod Dreamfactory instance and create a default database user and password for the newly imported database.

Copy the app_key from the dev .env file and replace the app_key in the prod .env to ensure you can retrieve any hashed database values and prevent token signature errors.

At this point also edit the .env file to point to the database you’ve just imported as well as employ the user you’ve just created. Then follow the steps as described here:

https://wiki.dreamfactory.com/DreamFactory/Installation#Switch_System_Database

Once the prod instance is pointed to the new database run the following commands:

  1. php artisan migrate --seed

  2. php artisan dreamfactory:service-type-migrate

  3. php artisan clear-compiled

  4. php artisan cache:clear

  5. php artisan optimize

Restart the web server and check that the services,roles,user and scripts etc… are showing up.