﻿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
24184	Migrate auto-fake behavior is not safe	Carl Meyer	Markus Holtermann	"Currently, `manage.py migrate` will auto-fake-apply initial migrations if it sees that the tables already exist, but it doesn't do any checking that the schema of those tables actually matches the schema that the migration would have created. And our documentation doesn't call out the importance of making sure that your existing schema matches the models you used to generate the initial migrations.

In an ideal world, we might keep the current behavior and automatically verify a full schema match before auto-faking, but I doubt that's feasible and in any case would be a major new feature.

Short of that, I think the unsafe auto-fake behavior should not be the default; it should require a flag like `--fake-if-exists` or something (needs bikeshedding) to turn it on. Wherever that flag is documented/demonstrated in the docs (e.g. in the [[https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south upgrade-from-South docs]]), we should be very clear that it is only safe to use if you are sure that your schema is properly up-to-date with your models used to generate your initial migration.

(This ticket was motivated by #24178.)"	Bug	closed	Migrations	1.7	Normal	fixed		Markus Holtermann	Ready for checkin	1	0	0	0	0	0
