Skip to content
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 columns by type, as hinted by name conventions #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NewAlexandria
Copy link

It's common that IDs are put at the top of a table's schema / DDL. Datetime fields (*_at) are often grouped, commonly after all other columns. The rest of the columns are sandwiched between them.

This PRs offers similar sorting technique.

  • group table columns by IDs, _at dates, and the rest
  • order IDs first, other non-dates, then the _at fields
  • each group sorted alphabetically

I wasn't able to get the tests to run. Welcome feedback on how to write better tests

IDs first, other non-dates, then the _at fields
each group sorted alphabetically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant