-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output columns in database schema order, not A-Z order. #998
Comments
I've had problems with this in the past because, in reality, people run database migrations in different orders. Let's say we have three developers working at the same time Consider this timeline: Monday
Tuesday
Every time Developer 2 runs Why do this at all?I'm not convinced there's a lot of value to trying to manage the order of columns in the database. Unless you have an exceptional situation, you're micro-optimising for very little benefit.
|
Currently, when columns appear in the model, they are output in A-Z order. I would like the output to be in the order of the columns in the database. This is because I design my models with strict control over the order of columns in the database.
For example, date columns such as created_at and updated_at should be placed last in the table, and foreign keys such as user_id should be placed above them.
Commands
Version
The text was updated successfully, but these errors were encountered: