-
Notifications
You must be signed in to change notification settings - Fork 36
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
Sort table column definitions alphabetically #11
Conversation
@RKushnir Nice idea! Sometimes there is a benefit to certain alignments in Postgres (i.e. column order matters), so if someone bootstraps a production database from the Maybe we can make this an opt-in setting somehow? |
Hi @lfittl Yes, I was thinking about that. We could introduce a configuration object to turn this on/off. I'll update my PR with that. Should it be enabled by default? |
@lfittl I added the configuration boilerplate and a setting for this feature, which is disabled by default. |
@lfittl Is there anything else I need to do for this? It would be great to finish it while it's still fresh in memory. |
@RKushnir Apologies for the very delayed response on this! Could you rebase the configuration option on the approach that is now in master? |
Hi @lfittl Done. Please, have a look. |
@RKushnir Merged - sorry for the long wait! |
Thanks, @lfittl ! 🎉 I'm glad we can now remove this patch from our code. |
@lfittl Can we have a new release, tho? |
@RKushnir Released 0.4.0 today - thanks for the reminder! |
When developers simultaneously work on the tasks that require new columns in the database,
it's possible that their local databases will end up with columns being added in different order, leading to inconsistent database structure dumps.
By sorting the columns alphabetically we enforce the same order for everyone, keeping the file consistent.