﻿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
30060	Improve extensibility of schema migration for custom backends for new Index/Check/Unique and other constraints	Pavel Tyslacki	nobody	"New in django 2.2 Index condition [https://code.djangoproject.com/ticket/29547] and Check/Unique constraints [https://code.djangoproject.com/ticket/29641] are a very useful, but have a some issues with extensibility by custom backends:

- sql generation for migrations splitted to `schema` and `indexes`/`constraints` modules, but custom backend for `indexes`/`constraints` modules don't appliable
- schema logic can be improved for extensibility to avoid huge overriding as `_alter_field` method

to fix it proposed:

- move sql generation from `Index`/`CheckConstraint`/`UniqueConstraint` to schema methods (similar to `_create_index_sql`)
- provide methods for sql generation for index/unique/primary key/foreign key/check constraints
"	Cleanup/optimization	closed	Database layer (models, ORM)	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
