Changes between Initial Version and Version 1 of Ticket #22683


Ignore:
Timestamp:
May 26, 2014, 7:27:32 PM (10 years ago)
Author:
Shai Berger
Comment:

Added some formatting to description.

We should be able to get rid of the raw sql there, since the model has the added column.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22683

    • Property Triage Stage UnreviewedAccepted
    • Property Type UncategorizedCleanup/optimization
    • Property Version 1.61.7-beta-2
  • Ticket #22683 – Description

    initial v1  
    1 Running schema tests I caught an issue, more precisely, in test_add_field_default_transform.
     1Running schema tests I caught an issue, more precisely, in `test_add_field_default_transform`.
    22At the end, this test method is doing:
    3 
     3{{{#!python
    44self.assertEqual(Author.objects.extra(where=["thing = 1"]).count(), 2)
    5 
     5}}}
    66The problem here is what in this where clause, the "thing" field must be quoted.
    77
    88In firebird :
    9 
    10     SELECT * FROM AUTHOR WHERE thing = 1   <-- Here thing (in lowercase) and THING (in uppercase) are equivalent, are the same object
    11 
     9{{{#!sql
     10    SELECT * FROM AUTHOR WHERE thing = 1   -- Here thing (in lowercase) and THING (in uppercase) are equivalent, are the same object
     11}}}
    1212is different of:
    13    
    14     SELECT * FROM AUTHOR WHERE "thing" = 1   <--  field is quoted
    15 
     13{{{#!sql   
     14    SELECT * FROM AUTHOR WHERE "thing" = 1   --  field is quoted
     15}}}
    1616For a more generic test I think we need to avoid use .extra method or another raw sql statement.
    1717
Back to Top