Replies: 2 comments
-
That's already possible: Squashing Migrations php artisan schema:dump |
Beta Was this translation helpful? Give feedback.
0 replies
-
IMO, as you mentioned "... where developer prefer ..." for me that's back to how we (as developer) manage our migration files and not necessarily need to be a feature from the framework itself. The framework already gives us an easy way to generate a migration file then it's up to the developer to manage the content inside. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem Description
Laravel migrations generate separate files for each table or schema update, which can quickly lead to dozens (or hundreds) of files in projects with many iterations. Managing or editing these migrations becomes cumbersome when:
Developers need to update older migrations.
Reviewing the entire database schema requires navigating through multiple files.
While the current structure works well for tracking changes over time, it’s not ideal for scenarios where developers prefer a single schema definition for clarity and simplicity, especially during the early stages of development.
Proposed Solution
Introduce a "combined migration mode" in Laravel, where all table schemas can optionally be combined into a single file for easier editing and visualization.
Beta Was this translation helpful? Give feedback.
All reactions