Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-2732

Hue isn't correctly doing add_column migrations with non-blank defaults

    Details

      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:

        Attachments

          Activity

            People

            • Assignee:
              erickt Erick Tryzelaar
              Reporter:
              erickt Erick Tryzelaar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: