﻿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
23618	Migrations only work for apps containing models	David Seddon	nobody	"Migrations only work for apps containing a `models.py`.  This means that if you create a data migration (`./manage.py makemigrations --empty <app>`) for an app without a `models.py`, it will fail to execute when running `./manage.py migrate`.

I think it would be better if apps containing migrations would run, regardless of having that empty file.

This is because it can be a nice structure to have a 'main' app responsible for general project-wide stuff, which includes running data migrations that aren't directly related to models.  An example might be assigning some permissions in the database to a particular role, but for a third party app.

Not sure if this is the only place where the check is made, but `django.db.migrations.loader.MigrationLoader.load_disk()` uses the following test to see whether to include the app:
{{{
if app_config.models_module is None:
    continue
}}}"	Cleanup/optimization	closed	Migrations	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
