1

I am upgrading my django application from 1.5 to 1.11. I am upgrading 3rd party packages too. While upgrading django-cms 2.4 to 3.5 I am facing some migration issues. I have an already existing mysql database. So after upgrading django-cms:

1) I deleted all the migration except __init__.py from django-cms migration folder.

2)Deleted data from django_migration data from my db using delete from django_migrations;.

3)Then I performed python manage.py makemigration cms and then python manage.py migrate cms --fake.

But while running application I am getting table cms_urlconfrevision does not exist. Because some new tables are creating in new version of django-cms. As per my understanding no new tables will create while perform --fake migration. So I performed python manage.py migrate to create new tables but it showing error some table already exists. Please help me to get rid of this error.

Reference : Django 1.8: Create initial migrations for existing schema

Akhi
  • 221
  • 1
  • 3
  • 14

2 Answers2

0

You may have to manually delete/create table in the database you are using.

Mohit Solanki
  • 2,122
  • 12
  • 20
0

Per the link you referenced, do it other way around:

3.Reset the migrations for the "built-in" apps: python manage.py migrate --fake

  1. For each app run: python manage.py makemigrations . Take care of dependencies (models with ForeignKey's should run after their parent model).
python manage.py migrate --fake
python manage.py makemigration cms
python manage.py migrate --fake-initial
Mick T
  • 377
  • 4
  • 10