phpvms icon indicating copy to clipboard operation
phpvms copied to clipboard

Squash migrations

Open arthurpar06 opened this issue 1 month ago • 1 comments

This PR squashes all migrations into a single .sql file, enabling faster migration and a cleaner migrations folder. As we were performing some inserts into the migrations, I relocated them to seeds (base.yml).

This can be merged immediately, but it's advisable to ensure that we won't add new migrations until the release, as it would be preferable to have an empty migrations folder in the release.

Commands:

# For testing
php artisan migrate --database=testing # to have a sqlite db to dump
php artisan schema:dump --database=testing
# then rename testing-schema.sql to memory-schema.sql


# For mysql (use --prune to remove the migrations from the migrations folder)
php artisan schema:dump --prune

Closes #1731

arthurpar06 avatar May 12 '24 17:05 arthurpar06