Squashing Migrations
Get the schema (dump) of the database, which contains the data of the
countries
table
and the entry in theusers
table for qa@tunex.io with a preset password.
To get a dump, you need to execute the initial deploy in a new environment, that is,
install Marionette right out of the box.Shut services down and start service db:
docker-compose down && docker-compose up -d db
Dump the database:
docker-compose exec db mysqldump -u root --password=theSTRONGpassword marionette > schema.sql
Next, in the Backend project, do the following:
Save the database dump obtained in step 3 asschema/schema.sql
.
Zip all js-files inapi/migrations
directory (look, it's just in case) and then delete them:cd api/migrations && tar -czvf migrations.tar.gz *.js && rm *.js
Release the updated backend and test it in a live database environment.
Note: This functionality was implemented in this commit https://gitlab.tunex.io/marionette-develop/backend/-/commit/e1f44f871804396ed05e2c36774b664aa2c01bc8
Â