When using sql output field names are not quoted.
to reproduce:
1. create a model with a field named "order"
2. syncb
3. remove the field from the DB
4. sqldiff outputs invalid sql:
BEGIN
ALTER TABLE my_model
DROP COLUMN order;
COMMIT;
"order" should be quoted, preferably "my_model" should be, too.
If I refer to django/db/backends/creation.py, they use
connection.ops.quote_name (as "qn"), like this:
style.SQL_FIELD(qn(f.column))
in sqldiff.py it happens around lines 260-265.
Original issue reported on code.google.com by bert.mat...@gmail.com on 27 Mar 2009 at 3:36
Original issue reported on code.google.com by
bert.mat...@gmail.com
on 27 Mar 2009 at 3:36