Ticket #145 (closed defect: fixed)
South creates fields in apparently random order
| Reported by: | justonia@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.6 |
| Component: | migrations | Version: | 0.6-pre |
| Keywords: | Cc: |
Description
Using the built in syncdb, when a table is created the fields are created in the order they are specified in the model. In south this is not the case. I recognize that you can't maintain the correct order as fields are added/subtracted since some backends (at least PostgreSQL) don't support column reordering.
I would suggest that the initial migration should create the fields in the correct order. For tables that don't change this will mimic django's behavior, and for tables that do, at least some of the fields will be in the proper order (I am thinking specifically of an autoincrement primary key column, having to search each table display in the sql shell for the id column can be annoying when you are used to having it consistently on the far left).
Attachments
Change History
Changed 4 years ago by juan@…
- Attachment preserve-field-ordering added
Patch to preserve ordering when outputting db.create_table
comment:3 Changed 4 years ago by andrew
Fixed again in [bb529915d955].

Fixed in [247].