Skip to content

Instantly share code, notes, and snippets.

@mekanix
Created August 4, 2017 10:41
Show Gist options
  • Save mekanix/dab5b77f937813261397b2c3a57ebfbf to your computer and use it in GitHub Desktop.
Save mekanix/dab5b77f937813261397b2c3a57ebfbf to your computer and use it in GitHub Desktop.
~/repos/geonode ♦ python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: tasks, floppyforms, modeltranslation, django_extensions, djcelery, polymorphic, treebeard, corsheaders, django_forms_bootstrap, catalogue, humanize, geoserver, storages, mptt, friendlytagloader, staticfiles, metadataxsl, geoexplorer, sitemaps, proxy, gis, pinax_theme_bootstrap, pagination, autocomplete_light, messages, leaflet, api, social, security
Apply all migrations: dialogos, people, tastypie, agon_ratings, documents, actstream, sites, maps, contenttypes, announcements, user_messages, layers, sessions, guardian, auth, base, kombu_transport_django, groups, services, oauth2_provider, account, admin, upload, avatar, taggit
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying layers.26_to_27...Traceback (most recent call last):
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
output = self.handle(*args, **options)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 222, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/migrations/executor.py", line 110, in migrate
self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/migrations/executor.py", line 148, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/migrations/migration.py", line 115, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/migrations/operations/special.py", line 183, in database_forwards
self.code(from_state.apps, schema_editor)
File "/usr/home/meka/repos/geonode/geonode/layers/migrations/26_to_27.py", line 10, in copy_typename
for row in Layer.objects.all():
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/models/query.py", line 162, in __iter__
self._fetch_all()
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/models/query.py", line 965, in _fetch_all
self._result_cache = list(self.iterator())
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/models/query.py", line 238, in iterator
results = compiler.execute_sql()
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/utils.py", line 98, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/home/meka/.virtualenvs/geonode/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: column base_resourcebase.alternate does not exist
LINE 1: ...loaded_preserve", "base_resourcebase"."group_id", "base_reso...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment