﻿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
35707	Squash migrations in django.contrib.auth for better performance and nicer output	Tim Abbott		"Provisioning a fresh database for any project using Django's contrib.auth system ends up spending about 0.3 seconds, and probably more importantly a nontrivial amount of output on the screen running the 12 migrations in django.contrib.auth in sequence. This can be optimized significantly by squashing the migrations using the `manage.py squashmigrations` algorithm.

Sample output using `ts  ""%b %d %H:%M:%.S""` for timing output:

Aug 23 17:07:23.116481   Applying auth.0002_alter_permission_name_max_length... OK
Aug 23 17:07:23.131759   Applying auth.0003_alter_user_email_max_length... OK
Aug 23 17:07:23.149192   Applying auth.0004_alter_user_username_opts... OK
Aug 23 17:07:23.166695   Applying auth.0005_alter_user_last_login_null... OK
Aug 23 17:07:23.169690   Applying auth.0006_require_contenttypes_0002... OK
Aug 23 17:07:23.191648   Applying auth.0007_alter_validators_add_error_messages... OK
Aug 23 17:07:23.207522   Applying auth.0008_alter_user_username_max_length... OK
Aug 23 17:07:23.234117   Applying auth.0009_alter_user_last_name_max_length... OK
Aug 23 17:07:23.332708   Applying auth.0010_alter_group_name_max_length... OK
Aug 23 17:07:23.417119   Applying auth.0011_update_proxy_permissions... OK
Aug 23 17:07:23.433407   Applying auth.0012_alter_user_first_name_max_length... OK

The django.contrib.auth.migrations tree hasn't see any new migrations since migration `0012_alter_user_first_name_max_length.py` was added in 2020, so it seems fairly likely that this won't need to be done on a recurring basis."	Cleanup/optimization	closed	contrib.auth	5.0	Normal	wontfix		Tim Abbott	Unreviewed	0	0	0	0	0	0
