Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28482 closed Bug (duplicate)

migrate --fake produces stale content type warning when CreateModel exists in non-initial migration

Reported by: Amanda Ng Owned by: nobody
Component: Migrations Version: 1.10
Severity: Normal Keywords: migrate fake stale
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When a new table creation is specified in a subsequent (i.e. non 0001_initial.py) migration, and python manage.py migrate --fake is run, it prompts for deletion of the table as a "stale content type".

Steps to reproduce:

  1. Create new project.
  2. Create new app.
  3. Create a table (e.g. class table1(models.Model)...) in app.
  4. Run "python manage.py makemigrations"
  5. Run "python manage.py migrate"
  6. Create a new table in app (e.g. class table2(models.Model)...) in app.
  7. Add foreign key to table 1 in table 2.
  8. Run "python manage.py makemigrations"
  9. Run "python manage.py migrate"
  10. Delete 0002_* entry from django_migrations table
  11. Run "python manage.py migrate --fake"

Change History (1)

comment:1 by Mariusz Felisiak, 7 years ago

Resolution: duplicate
Status: newclosed
Version 0, edited 7 years ago by Mariusz Felisiak (next)
Note: See TracTickets for help on using tickets.
Back to Top