Skip to content

Commit

Permalink
Fixed bug in diffdb command which crashes if a sqlite database has
Browse files Browse the repository at this point in the history
a unique column whose field name differs from the database column
name.
  • Loading branch information
J.A. Roberts Tunney authored and trbs committed Oct 24, 2009
1 parent 18826a2 commit 1366f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_extensions/management/commands/sqldiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class SqliteSQLDiff(SQLDiff):
def find_unique_missing_in_db(self, meta, table_indexes, table_name):
for field in meta.local_fields:
if field.unique:
attname = field.attname
attname = field.db_column or field.attname
if attname in table_indexes and table_indexes[attname]['unique']:
continue
if table_indexes[attname]['primary_key']:
Expand Down

0 comments on commit 1366f6d

Please sign in to comment.