﻿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
28677	on_delete is a required positional argument for ForeignKeys, even in migrations	Christian Kreuzberger	nobody	"Hi!

With version 2.0 you added `on_delete` as a required argument for ForeignKeys. This seems to also be true for existing migrations of pre-2.0 projects.
For instance, I attached a migration that I created last year with (i think) Django 1.8. This migration now fails with the following error (e.g., when running `python manage.py check`):


{{{
  File ""/home/user/projects/user_foreign_key_testapp/polls/migrations/0005_auto_20160414_1351.py"", line 7, in <module>
    class Migration(migrations.Migration):
  File ""/home/user/projects/user_foreign_key_testapp/polls/migrations/0005_auto_20160414_1351.py"", line 17, in Migration
    field=models.ForeignKey(related_name='choices', verbose_name=b'Which poll?', to='polls.Poll'),
TypeError: __init__() missing 1 required positional argument: 'on_delete'
}}}

I believe that I should not have to change all my existing migrations for all my projects, and therefore on_delete should not be required for those migrations."	Bug	closed	Migrations	2.0	Normal	invalid	migration foreignkey on_delete		Unreviewed	0	0	0	0	0	0
