steveandroulakis / mytardis-lighthouse-migrate-test

testing migrations from http://mytardis.lighthouseapp.com/ to Github Issues
0 stars 0 forks source link

Change type of ExperimentParameter, DatasetParameter, DatafileParameter string_value columns from TextField to CharField #274

Open steveandroulakis opened 11 years ago

steveandroulakis commented 11 years ago

Problem

Some databases (read: at least Oracle) do not support ordering (and other things like min/max aggregation) on CLOB columns.

ExperimentParameter, DatasetParameter, DatafileParameter define their string_value columns as TextField (CLOB or similar) rather than CharField (VARCHAR or similar)

Proposed fix

Add a migration to introduce a new TextField/CLOB column for long string values. Modify the existing LONGSTRING ParameterName "type" to use this new column (instead of double-using the CharField column) *For existing deployments with long strings in STRING ParameterNames, decisions will need to be made on a case-by-case basis whether to truncate the data or to change these to LONGSTRING. Add a migration to change type of string_value columns to CharField (with an appropriate maxlength).

Benefits

This change would enable the summary_table app (https://github.com/vluke/summary_table) to do sorting in-database rather than in-memory and allow proper pagination.

Notes

This is a fairly low-level change and probably affects a majority of deployments.

original LH ticket

This ticket has 0 attachment(s).

steveandroulakis commented 11 years ago

Change type of ExperimentParameter, DatasetParameter, DatafileParameter string_value columns from TextField to CharField

by stevage (at gmail)