hwms / django-command-extensions

Automatically exported from code.google.com/p/django-command-extensions
MIT License
0 stars 0 forks source link

sqldiff ignores db_column flag on fields #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
a class model with a field that has
field_name=models.AnyField(db_column='db_field_name') will use
db_field_name in the database table and index names instead of plain
field_name.

What is the expected output? What do you see instead?

sqldiff should match up database columns and index names using
meta.db_column instead of meta.attname when it is present.

What version of the product are you using? 
current django-command-extenstions master, django revision 9498 (version
1.0.2), postgresql (8.2.4) on python (2.4.2)

Original issue reported on code.google.com by jehiah on 16 Apr 2009 at 5:11

GoogleCodeExporter commented 9 years ago

Original comment by v.oostv...@gmail.com on 16 Apr 2009 at 5:13

GoogleCodeExporter commented 9 years ago

Original comment by v.oostv...@gmail.com on 16 Apr 2009 at 5:14

GoogleCodeExporter commented 9 years ago
I've posted a patch for this (that works for me) here

http://github.com/jehiah/django-extensions/commit/2269708f0b0a74e6015933cfcf699a
23498d0e75

Original comment by jehiah on 16 Apr 2009 at 5:14

GoogleCodeExporter commented 9 years ago
Looks fine to me :)

Pulled your patch and pushed it into django-extensions master repo.
I'll leave this ticket open for couple of days before closing it so we have 
some test
to test it.

Thanks a lot jehiah!

Original comment by v.oostv...@gmail.com on 16 Apr 2009 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by v.oostv...@gmail.com on 21 Apr 2009 at 6:00