yogthos / migratus

MIGRATE ALL THE THINGS!
651 stars 95 forks source link

Add functionality for squashing migrations #271

Closed Gwonwoo-Nam closed 1 month ago

Gwonwoo-Nam commented 1 month ago

resolves #263

Why?

Over time, projects can accumulate numerous migrations, making them harder to manage and potentially slowing down the migration process. By squashing older migrations into a single file, the migration process becomes more streamlined and manageable. This PR introduces three core function for squashing multiple migrations into a single migration file, which simplifies the management of large migration histories.

Core Functions

The squashing process is broken down into three distinct steps to reduce the risk of human errors, to preview before applying changes.

Validations

yogthos commented 1 month ago

Looks great! 🎉