Hi all,
Usually we didn’t have any problems with this. However, we tried updating one entity with Hue 4.2 or 4.3 database to 4.6 by doing the following:
- fresh HUE 4.6
make install
- Updating configs in
hue.ini
. -
sudo -u hue /usr/local/hue/build/env/bin/hue syncdb --noinput
Result:No changes detected
-
sudo -u hue /usr/local/hue/build/env/bin/hue migrate
Resulting in the following error:
Operations to perform:
Synchronize unmigrated apps: about, babeldjango, dashboard, django_extensions, django_prometheus, filebrowser, help, hive, indexer, jobbrowser, kafka, metadata, metastore, proxy, rdbms, staticfiles, webpack_loader, zookeeper
Apply all migrations: admin, auth, axes, beeswax, contenttypes, desktop, jobsub, oozie, pig, search, sessions, sites, useradmin
Synchronizing apps without migrations:
Creating tables…
Running deferred SQL…
Running migrations:
Applying contenttypes.0001_initial…Traceback (most recent call last):
File “/usr/local/hue/build/env/bin/hue”, line 11, in
load_entry_point(‘desktop’, ‘console_scripts’, ‘hue’)()
File “/usr/local/hue/desktop/core/src/desktop/manage_entry.py”, line 225, in entry
execute_from_command_line(sys.argv)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/management/init.py”, line 364, in execute_from_command_line
utility.execute()
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/management/init.py”, line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/management/base.py”, line 283, in run_from_argv
self.execute(*args, **cmd_options)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/management/base.py”, line 330, in execute
output = self.handle(*args, **options)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/management/commands/migrate.py”, line 204, in handle
fake_initial=fake_initial,
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/migrations/executor.py”, line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/migrations/executor.py”, line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/migrations/executor.py”, line 244, in apply_migration
state = migration.apply(state, schema_editor)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/migrations/migration.py”, line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/migrations/operations/models.py”, line 97, in database_forwards
schema_editor.create_model(model)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/backends/base/schema.py”, line 319, in create_model
self.execute(sql, params or None)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/backends/base/schema.py”, line 136, in execute
cursor.execute(sql, params)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/backends/utils.py”, line 62, in execute
return self.cursor.execute(sql)
django.db.utils.ProgrammingError: relation “django_content_type” already exists
However, running a query in HUE UI warns about missing tables in the database:
How should we proceed with the migration? Is there any way of skipping/overriding the “already exists” issue?
Thanks!