﻿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
22683	Schema tests and .extra queryset method	Maximiliano Robaina	nobody	"Running schema tests I caught an issue, more precisely, in `test_add_field_default_transform`.
At the end, this test method is doing:
{{{#!python
self.assertEqual(Author.objects.extra(where=[""thing = 1""]).count(), 2)
}}}
The problem here is what in this where clause, the ""thing"" field must be quoted.

In firebird :
{{{#!sql
    SELECT * FROM AUTHOR WHERE thing = 1   -- Here thing (in lowercase) and THING (in uppercase) are equivalent, are the same object
}}}
is different of:
{{{#!sql   
    SELECT * FROM AUTHOR WHERE ""thing"" = 1   --  field is quoted
}}}
For a more generic test I think we need to avoid use .extra method or another raw sql statement.

For a more complete discussion about it, see at 
https://groups.google.com/forum/?hl=es#!topic/django-developers/KRHD77KlZ28
"	Cleanup/optimization	closed	Migrations	1.7-beta-2	Normal	wontfix			Accepted	0	0	0	0	0	0
