DEV Community

Mahmoud Ramadan
Mahmoud Ramadan

Posted on

Custom Fresh v2.1.0: Take Control of Laravel Database Resets

Custom Fresh v2.1.0 β€” flexible Laravel database resets

πŸš€ Custom Fresh v2.1.0 is here!

Laravel database resets are easy until your project has tables you need to keep.

Reference data, imported records, configuration tables, and other data not managed by migrations can be lost when using migrate:fresh.

Custom Fresh gives you more control over what gets reset and what stays.

Keep specific tables during database resets:

php artisan db:fresh --keep=users,settings
Enter fullscreen mode Exit fullscreen mode

Keep raw data without relying on migrations:

php artisan db:fresh --keep-raw=locations
Enter fullscreen mode Exit fullscreen mode

Reset the data without rebuilding the schema:

php artisan db:fresh --freeze-schema
Enter fullscreen mode Exit fullscreen mode

What’s new in v2.1.0

  • ❄️ Freeze Schema β€” reset data without rebuilding the schema.
  • πŸ’Ύ Keep Raw Data β€” preserve tables without migrations.
  • βš™οΈ Presets & Config β€” customize reset behavior for your workflow.
  • πŸ”— Related Tables β€” handle related data more reliably.
  • 🌱 Seed Fresh β€” reset and seed your database in one step.
  • ⚠️ Safer Resets β€” improved foreign-key warnings and safeguards.
  • πŸ§ͺ Better Testing & CI β€” expanded test coverage and GitHub Actions.

A Laravel package to make database resets more flexible, predictable, and safe.

πŸ‘‰ Check out Custom Fresh:

https://github.com/mahmoudmohamedramadan/custom-fresh

Top comments (0)