浏览代码

[oozie] Coordinator new field is not initialized in some cases

Romain Rigaux 12 年之前
父节点
当前提交
9438113cd2
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      apps/oozie/src/oozie/migrations/0016_auto__add_field_coordinator_job_properties.py

+ 7 - 0
apps/oozie/src/oozie/migrations/0016_auto__add_field_coordinator_job_properties.py

@@ -11,6 +11,13 @@ class Migration(SchemaMigration):
         # Adding field 'Coordinator.job_properties'
         db.add_column('oozie_coordinator', 'job_properties', self.gf('django.db.models.fields.TextField')(default='[]'), keep_default=False)
 
+        try:
+          from oozie.models import Coordinator
+          Coordinator.objects.all().update(job_properties='[]')
+        except Exception, e:
+          import logging
+          logging.warn(e)
+
 
     def backwards(self, orm):