﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28785	Tracking migrations	Ramez Kabbani	Abhinav Yadav	"Migrations exist in django in two locations: 
1. In the codebase under app_name/migrations
2. As a db entry in django_migrations

I've come across the following scenario where I expected Django to give an error but it didn't not.

Assume we have 4 migrations for an app, and migration 1 through 3 are applied. 
    

{{{
# Content of Postgres DB
     
    32 | app_name     | 0001_initial        
    33 | app_name    | 0002_migration2
    34 | app_name     | 0003_migration3
}}}

All migrations except 0001_initial.py were deleted including the folder pycache. We then run makemigrations


{{{
# Contents of migration folder after makemigrations was ran.
    
0001_initial.py  0002_name.py  __init__.py  __pycache__
    
# Run makemigrations
No Changes Detected
     
# Output of showmigrations
     
    app_name
    [X] 0001_initial
    [X] 0002_name
}}}

Contents of Postgres django_migrations, however, remain unchanged still with an entry for a third migration. I expected an error in one of the following commands but received none: makemigrations, migrate, showmigrations.

Also, migrate --fake app_name 0002_name does not lead to the deletion of 0003_migration3 entry in django_migrations"	New feature	closed	Migrations	1.11	Normal	wontfix			Accepted	1	0	1	1	0	0
