Browse Source

HUE-8737 [core] Fix byte string cause migration fail in Python 3.5

Ying Chen 6 years ago
parent
commit
d16d61dbbb

+ 9 - 9
apps/beeswax/src/beeswax/migrations/0001_initial.py

@@ -37,14 +37,14 @@ class Migration(migrations.Migration):
                 ('operation_type', models.SmallIntegerField(null=True)),
                 ('operation_type', models.SmallIntegerField(null=True)),
                 ('modified_row_count', models.FloatField(null=True)),
                 ('modified_row_count', models.FloatField(null=True)),
                 ('log_context', models.CharField(max_length=1024, null=True)),
                 ('log_context', models.CharField(max_length=1024, null=True)),
-                ('server_host', models.CharField(default=b'', help_text='Host of the query server.', max_length=128)),
+                ('server_host', models.CharField(default='', help_text='Host of the query server.', max_length=128)),
                 ('server_port', models.PositiveIntegerField(default=10000, help_text='Port of the query server.')),
                 ('server_port', models.PositiveIntegerField(default=10000, help_text='Port of the query server.')),
-                ('server_name', models.CharField(default=b'', help_text='Name of the query server.', max_length=128)),
-                ('server_type', models.CharField(choices=[(b'beeswax', b'Beeswax'), (b'hiveserver2', b'Hive Server 2'), (b'mysql', b'MySQL'), (b'postgresql', b'PostgreSQL'), (b'sqlite', b'sqlite'), (b'oracle', b'oracle')], default=b'beeswax', help_text='Type of the query server.', max_length=128)),
-                ('query_type', models.SmallIntegerField(choices=[(0, b'HQL'), (1, b'IMPALA')], default=0, help_text='Type of the query.')),
+                ('server_name', models.CharField(default='', help_text='Name of the query server.', max_length=128)),
+                ('server_type', models.CharField(choices=[('beeswax', 'Beeswax'), ('hiveserver2', 'Hive Server 2'), ('mysql', 'MySQL'), ('postgresql', 'PostgreSQL'), ('sqlite', 'sqlite'), ('oracle', 'oracle')], default='beeswax', help_text='Type of the query server.', max_length=128)),
+                ('query_type', models.SmallIntegerField(choices=[(0, 'HQL'), (1, 'IMPALA')], default=0, help_text='Type of the query.')),
                 ('notify', models.BooleanField(default=False)),
                 ('notify', models.BooleanField(default=False)),
                 ('is_redacted', models.BooleanField(default=False)),
                 ('is_redacted', models.BooleanField(default=False)),
-                ('extra', models.TextField(default=b'{}')),
+                ('extra', models.TextField(default='{}')),
                 ('is_cleared', models.BooleanField(default=False)),
                 ('is_cleared', models.BooleanField(default=False)),
             ],
             ],
             options={
             options={
@@ -74,12 +74,12 @@ class Migration(migrations.Migration):
             fields=[
             fields=[
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('status_code', models.PositiveSmallIntegerField()),
                 ('status_code', models.PositiveSmallIntegerField()),
-                ('secret', models.TextField(max_length=b'100')),
-                ('guid', models.TextField(max_length=b'100')),
+                ('secret', models.TextField(max_length=100)),
+                ('guid', models.TextField(max_length=100)),
                 ('server_protocol_version', models.SmallIntegerField(default=0)),
                 ('server_protocol_version', models.SmallIntegerField(default=0)),
                 ('last_used', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Last used')),
                 ('last_used', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Last used')),
-                ('application', models.CharField(default=b'beeswax', help_text='Application we communicate with.', max_length=128)),
-                ('properties', models.TextField(default=b'{}')),
+                ('application', models.CharField(default='beeswax', help_text='Application we communicate with.', max_length=128)),
+                ('properties', models.TextField(default='{}')),
                 ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                 ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
             ],
             ],
         ),
         ),

+ 9 - 9
apps/jobsub/src/jobsub/migrations/0001_initial.py

@@ -65,13 +65,13 @@ class Migration(migrations.Migration):
             name='OozieJavaAction',
             name='OozieJavaAction',
             fields=[
             fields=[
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
-                ('files', models.CharField(default=b'[]', help_text='List of paths to files to be added to the distributed cache.', max_length=512)),
-                ('archives', models.CharField(default=b'[]', help_text='List of paths to archives to be added to the distributed cache.', max_length=512)),
+                ('files', models.CharField(default='[]', help_text='List of paths to files to be added to the distributed cache.', max_length=512)),
+                ('archives', models.CharField(default='[]', help_text='List of paths to archives to be added to the distributed cache.', max_length=512)),
                 ('jar_path', models.CharField(max_length=512)),
                 ('jar_path', models.CharField(max_length=512)),
                 ('main_class', models.CharField(max_length=256)),
                 ('main_class', models.CharField(max_length=256)),
                 ('args', models.TextField(blank=True)),
                 ('args', models.TextField(blank=True)),
                 ('java_opts', models.CharField(blank=True, max_length=256)),
                 ('java_opts', models.CharField(blank=True, max_length=256)),
-                ('job_properties', models.TextField(default=b'[]')),
+                ('job_properties', models.TextField(default='[]')),
             ],
             ],
             bases=('jobsub.oozieaction',),
             bases=('jobsub.oozieaction',),
         ),
         ),
@@ -79,9 +79,9 @@ class Migration(migrations.Migration):
             name='OozieMapreduceAction',
             name='OozieMapreduceAction',
             fields=[
             fields=[
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
-                ('files', models.CharField(default=b'[]', help_text='List of paths to files to be added to the distributed cache.', max_length=512)),
-                ('archives', models.CharField(default=b'[]', help_text='List of paths to archives to be added to the distributed cache.', max_length=512)),
-                ('job_properties', models.TextField(default=b'[]')),
+                ('files', models.CharField(default='[]', help_text='List of paths to files to be added to the distributed cache.', max_length=512)),
+                ('archives', models.CharField(default='[]', help_text='List of paths to archives to be added to the distributed cache.', max_length=512)),
+                ('job_properties', models.TextField(default='[]')),
                 ('jar_path', models.CharField(help_text='Path to jar files on HDFS.', max_length=512)),
                 ('jar_path', models.CharField(help_text='Path to jar files on HDFS.', max_length=512)),
             ],
             ],
             bases=('jobsub.oozieaction',),
             bases=('jobsub.oozieaction',),
@@ -90,9 +90,9 @@ class Migration(migrations.Migration):
             name='OozieStreamingAction',
             name='OozieStreamingAction',
             fields=[
             fields=[
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
                 ('oozieaction_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='jobsub.OozieAction')),
-                ('files', models.CharField(default=b'[]', max_length=512)),
-                ('archives', models.CharField(default=b'[]', max_length=512)),
-                ('job_properties', models.TextField(default=b'[]')),
+                ('files', models.CharField(default='[]', max_length=512)),
+                ('archives', models.CharField(default='[]', max_length=512)),
+                ('job_properties', models.TextField(default='[]')),
                 ('mapper', models.CharField(max_length=512)),
                 ('mapper', models.CharField(max_length=512)),
                 ('reducer', models.CharField(max_length=512)),
                 ('reducer', models.CharField(max_length=512)),
             ],
             ],

File diff suppressed because it is too large
+ 5 - 7
apps/oozie/src/oozie/migrations/0001_initial.py


+ 1 - 1
apps/pig/src/pig/migrations/0001_initial.py

@@ -27,7 +27,7 @@ class Migration(migrations.Migration):
             name='PigScript',
             name='PigScript',
             fields=[
             fields=[
                 ('document_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pig.Document')),
                 ('document_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='pig.Document')),
-                ('data', models.TextField(default=b'{"name": "", "parameters": [], "script": "", "hadoopProperties": [], "properties": [], "resources": [], "job_id": null}')),
+                ('data', models.TextField(default='{"name": "", "parameters": [], "script": "", "hadoopProperties": [], "properties": [], "resources": [], "job_id": null}')),
             ],
             ],
             bases=('pig.document',),
             bases=('pig.document',),
         ),
         ),

+ 2 - 2
apps/search/src/search/migrations/0001_initial.py

@@ -24,8 +24,8 @@ class Migration(migrations.Migration):
                 ('name', models.CharField(max_length=40, verbose_name='Solr index name pointing to')),
                 ('name', models.CharField(max_length=40, verbose_name='Solr index name pointing to')),
                 ('label', models.CharField(max_length=100, verbose_name='Friendlier name in UI')),
                 ('label', models.CharField(max_length=100, verbose_name='Friendlier name in UI')),
                 ('is_core_only', models.BooleanField(default=False)),
                 ('is_core_only', models.BooleanField(default=False)),
-                ('cores', models.TextField(default=b'{}', help_text='Solr json', verbose_name='Collection with cores data')),
-                ('properties', models.TextField(default=b'{}', help_text='Hue properties (e.g. results by pages number)', verbose_name='Properties')),
+                ('cores', models.TextField(default='{}', help_text='Solr json', verbose_name='Collection with cores data')),
+                ('properties', models.TextField(default='{}', help_text='Hue properties (e.g. results by pages number)', verbose_name='Properties')),
             ],
             ],
         ),
         ),
         migrations.CreateModel(
         migrations.CreateModel(

+ 1 - 1
apps/useradmin/src/useradmin/migrations/0001_initial.py

@@ -46,7 +46,7 @@ class Migration(migrations.Migration):
             fields=[
             fields=[
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('home_directory', models.CharField(max_length=1024, null=True)),
                 ('home_directory', models.CharField(max_length=1024, null=True)),
-                ('creation_method', models.CharField(default=b'HUE', max_length=64)),
+                ('creation_method', models.CharField(default='HUE', max_length=64)),
                 ('first_login', models.BooleanField(default=True, help_text='If this is users first login.', verbose_name='First Login')),
                 ('first_login', models.BooleanField(default=True, help_text='If this is users first login.', verbose_name='First Login')),
                 ('last_activity', models.DateTimeField(auto_now=True, db_index=True)),
                 ('last_activity', models.DateTimeField(auto_now=True, db_index=True)),
                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                 ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),

+ 1 - 1
desktop/core/src/desktop/migrations/0002_initial.py

@@ -24,7 +24,7 @@ class Migration(migrations.Migration):
                 ('app', models.CharField(db_index=True, help_text='App that this configuration belongs to.', max_length=32)),
                 ('app', models.CharField(db_index=True, help_text='App that this configuration belongs to.', max_length=32)),
                 ('properties', models.TextField(default=b'[]', help_text='JSON-formatted default properties values.')),
                 ('properties', models.TextField(default=b'[]', help_text='JSON-formatted default properties values.')),
                 ('is_default', models.BooleanField(db_index=True, default=False)),
                 ('is_default', models.BooleanField(db_index=True, default=False)),
-                ('groups', models.ManyToManyField(db_index=True, db_table=b'defaultconfiguration_groups', to='auth.Group')),
+                ('groups', models.ManyToManyField(db_index=True, db_table='defaultconfiguration_groups', to='auth.Group')),
             ],
             ],
             options={
             options={
                 'ordering': ['app', '-is_default', 'user'],
                 'ordering': ['app', '-is_default', 'user'],

Some files were not shown because too many files changed in this diff