Django south migration attribute order

Bug #963089 reported by Ben Wyss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Won't Fix
Undecided
Unassigned

Bug Description

When using Django South to automatically generation a 0001_initial.py file (the file used for migrations), the db table attributers order is changed into a random order.

please see the notes here: https://bugs.launchpad.net/openquake/+bug/954017

Tags: ui
Ben Wyss (bmwyss)
Changed in openquake:
status: New → In Progress
Revision history for this message
Ben Wyss (bmwyss) wrote :

Based on the insight into some of the upcoming developments of the FE tool, I recommend that we do not impose column order in the backend, but rather in the Middleware; namely GeoServer. In this way, if we have a purely UI requirement to change the column order (even slightly) for a table, we do not need to make any changes to the DB.
To control a tables column name order in Geoserver one needs to create a sql view, see: http://docs.geoserver.org/latest/en/user/data/sqlview.html

For example to make a sql view in GeoServer for the fault view table one could use:

SELECT fault_name, length_min, length_max, length_pre, strike, episodi_is, episodi_ac, u_sm_d_min, u_sm_d_max, u_sm_d_pre, u_sm_d_com, low_d_min, low_d_max, low_d_pref, low_d_com, dip_min, dip_max, dip_pref, dip_com, dip_dir, down_thro, slip_typ, slip_r_min, slip_r_max, slip_r_pre, slip_com, aseis_slip, aseis_com, dis_min, dis_max, dis_pref, re_int_min, re_int_max, re_int_pre, mov_min, mov_max, mov_pref, all_com, compiler, contrib, created, geom
    FROM gem.fault_view

Revision history for this message
Ben Wyss (bmwyss) wrote :

Currently we are using Django-South version 0.7.0.
It seems that South 0.7.4 might correct the column order issue, but to test one must first update Django to <1.3, then upgrade south.

http://south.aeracode.org/ticket/1059

https://bitbucket.org/andrewgodwin/south/changeset/32cb89577c4c

Ben Wyss (bmwyss)
Changed in openquake:
status: In Progress → New
Revision history for this message
Ben Wyss (bmwyss) wrote :

This is not relevant anymore

Changed in openquake:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.