﻿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
27663	Make Index.create_sql() and SchemaEditor._create_index_sql() return SQL parameters as well	Markus Holtermann	Markus Holtermann	"Looking into #26167, I noticed that, in order to eventually have something like `FunctionalIndex(Concat(Lower(Ref('some_field', None)), Value('x')))`, Django needs to return the params for the SQL query and pass them to the SchemaEditor's `execute()` method.

When constructing the SQL for the expression `Concat(Lower(Ref('some_field', None)), Value('x')).as_sql(...)`, Django returns the SQL with placeholders for the values:
{{{#!python
>>> Concat(Lower(Ref('some_field', None)), Value('x')).as_sql(compiler, connection)
('CONCAT(LOWER(""some_field""), %s)', ['x'])
}}}

Since the whole API for `Index.create_sql()` and `SchemaEditor.add_index()` etc. API is new in Django 1.11 let's try to get ahead of a necessary deprecation at a later time by passing the SQL statement and empty params by default, for now."	Cleanup/optimization	closed	Migrations	dev	Release blocker	wontfix			Accepted	1	0	0	1	0	0
