Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.6.0, 3.7.0, 3.8.0
-
Fix Version/s: 3.9.0
-
Component/s: app.dashboard, con.hive, con.oozie, core.api, core.users
-
Labels:None
Description
South didn't do what we thought it did with respect to default values. When we make a schema migration that adds a new column, as in:
db.add_column('oozie_node', 'data', self.gf('django.db.models.fields.TextField')(default='{}', blank=True), keep_default=False)
while it looks like it would be setting the default value to '{}', south does not actually set the default value for any old records. Instead, we need to write an explicit data migration that explicitly adds these values. This Stack Overflow comment goes into more detail.
Looking through the code, these might be potentially impacted by this issue:
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0002_auto__add_field_queryhistory_notify.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0003_auto__add_field_queryhistory_server_name__add_field_queryhistory_serve.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0004_auto__add_session__add_field_queryhistory_server_type__add_field_query.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0005_auto__add_field_queryhistory_statement_number.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0006_auto__add_field_session_application.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0007_auto__add_field_savedquery_is_trashed.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0008_auto__add_field_queryhistory_query_type.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0009_auto__add_field_savedquery_is_redacted__add_field_queryhistory_is_reda.py
- https://github.com/cloudera/hue/blob/master/apps/beeswax/src/beeswax/migrations/0009_auto__add_field_savedquery_is_redacted__add_field_queryhistory_is_reda.py
- https://github.com/cloudera/hue/blob/master/apps/jobsub/src/jobsub/migrations/0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad.py
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0015_auto__add_field_dataset_advanced_start_instance__add_field_dataset_ins.py
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0016_auto__add_field_coordinator_job_properties.py
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0018_auto__add_field_workflow_managed.py
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0019_auto__add_field_java_capture_output.py
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0021_auto__chg_field_java_args__add_field_job_is_trashed.py:
- https://github.com/cloudera/hue/blob/master/apps/oozie/src/oozie/migrations/0023_auto__add_field_node_data__add_field_job_data.py
- https://github.com/cloudera/hue/blob/master/apps/useradmin/src/useradmin/migrations/0002_add_ldap_support.py
- https://github.com/cloudera/hue/blob/master/desktop/core/src/desktop/migrations/0006_settings_add_tour.py