google-code-export / ords

Automatically exported from code.google.com/p/ords
1 stars 0 forks source link

Users would like to be able to reorder fields in a table #621

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a new field to an existing table.
2. Realize it would make more sense for the new field to be located in the 
middle of the list of fields, rather than at the end (e.g. perhaps this is a 
bibliographic database, and you have just added a field for publication place - 
you'd like this to display immediately after the name of the publisher, rather 
than right at the end of the record).
3. Realize you can't do this.

What is the expected output? What do you see instead?
We had this functionality previously, but lost it during the schema designer 
upgrade. A user at this afternoon's ORDS training course asked if it was 
possible, so I'm re-adding it to the issues list for future consideration.

This is helpful not just when adding a new field to an existing table, but also 
when designing a database - you don't always think of all the fields you want 
in precisely the right order straight away, and it's useful to be able to play 
about with things until they're in the most sensible order.

(When this came up for discussion a while ago, it was suggested that any 
practical solution to this problem wouldn't actually change the order of fields 
in the underlying database, but just change the order in which they're 
displayed. This is probably fine, though might confuse people if they export 
their data.)

(Assigning to Mark because this relates to the schema designer, though unless 
this is something that can be done _very_ quickly, I realize it probably won't 
ultimately be him that actually does any work on this.)

Please use labels and text to provide additional information.

Original issue reported on code.google.com by meriel.p...@gmail.com on 16 Feb 2015 at 5:56

GoogleCodeExporter commented 9 years ago
Just to add background information to this based on our previous discussions - 
this feature was "removed" when I refactored the schema designer as it's not 
actually possible to re-order fields in Postgres.  Previously, the schema 
designer used an XML representation of the schema which could store the fields 
in a different order, but now the schema is read directly from the database.

Currently, there is a database table for storing the positions of tables in the 
schema designer.  It is feasible that this or a similar table could be used to 
store an alternative order for the fields, although I suspect the work to 
implement such a feature would be significant, an would create inconsistencies 
with the editing view and export as mentioned.  The code for moving fields is 
still in the schema designer code, but commented out.

Original comment by marxjohn...@gmail.com on 17 Feb 2015 at 9:01

GoogleCodeExporter commented 9 years ago
Just noting that another user has said it would be useful to have this feature 
- see ticket number 2693695 in the ORDS RT queue. 

(That ticket also raises the point that the documentation needs updating to 
reflect the current state of the system - I'll do that ASAP.)

I've reassigned this to Scott, as it no longer makes sense to have it assigned 
to Mark - feel free to reassign again if you're not the most appropriate person 
to look at this.

Original comment by meriel.p...@gmail.com on 11 Mar 2015 at 2:55