Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Cannot migrate with newest master version of the Tracker #4

Open
TreZc0 opened this issue Jan 20, 2018 · 1 comment
Open

Cannot migrate with newest master version of the Tracker #4

TreZc0 opened this issue Jan 20, 2018 · 1 comment

Comments

@TreZc0
Copy link

TreZc0 commented Jan 20, 2018

Hey everyone,
the toplevel here references a really old (2 years) version of the tracker. Sadly, we kinda need to use the current master version with its bugfixes.
The deployment goes alright up until i try to do python manage.py migrate:
Applying tracker.0001_squashed_0039_upgrade_to_19...Traceback (most recent call last):

  File "manage.py", line 13, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py", line 200, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 92, in migrate
    self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/migration.py", line 115, in apply
    operation.state_forwards(self.app_label, project_state)
  File "/usr/local/lib/python2.7/dist-packages/django/db/migrations/operations/fields.py", line 181, in state_forwards
    state.models[app_label, self.model_name_lower].fields
KeyError: ('tracker', u'credentialsmodel')

I already cleaned all required dist-packages and reinstalled them hoping this would fix the issue, but sadly it won't - any ideas?

@jofo8948
Copy link

jofo8948 commented Feb 7, 2018

Try removing the squashed migration from the tracker migrations folder. That helped for me.
The squashed ones are just a compact way of applying all the others in one go to save time.

Except when it doesn't work.
But you might want to stick with a version before the 1.9 upgrade. Been having various issues with it that I had to patch myself for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants