ox-it / ords

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

Changes to primary keys are not retained unless field name is all lower case with no spaces #772

Open MerielP opened 8 years ago

MerielP commented 8 years ago

To reproduce this error, attempt to change the primary key field of a table - perhaps because you've uploaded a CSV file and want to use a field of your choice rather than the one ORDS created.

If the name of the field you wish to make the primary key contains spaces or upper case letters, it will appear to work perfectly - the new primary key will be in bold, and the schema designer will save the changes without any problems. However, if you go out of the schema designer and then back into it again, you will discover that the table now has no primary key at all.

If you edit the field name so that it is all lower case with no spaces, the changes will now be retained - you can leave the schema and return, and the new primary key will still be there.

This doesn't seem to be a very new bug (it happens on App as well as Staging), but it does look very much as though this is related to the cluster of bugs (e.g. #769 and #771) around spaces etc. in field names.