DUMPS

As time goes by, migrations will be immense. We need to shrink it down, and dump is the answer for that. We have dumps to clear out migrations while migration schemas is dump in a .sql file that will be soon loaded as we migrate or need a fresh database environment.

In config.php the mysql_path help the dump to do it's thing correctly, beacause if we forgot to set the mysql_path, we cannot dump the database correctly that's why we need to locate our mysql/bin to tell the dump that we are using the mysql to dump the database.

The process of the dumps:

  • ensure database repository exist

  • we get the completed migrations on our database repository base on the last batch number

  • then we build the schema of the completed migrations

  • after that, we remove the migrations from the database repository

  • and dump the schme to a .sql file

Last updated