Skip to content

Commit

Permalink
Merge pull request #227 from fmazan/develop
Browse files Browse the repository at this point in the history
bugfix: removed double creation of unique index
  • Loading branch information
klen authored Aug 7, 2023
2 parents 6c29412 + ef2c1ed commit c24331f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions peewee_migrate/migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ def add_fields(self, model: Union[str, TModelType], **fields: pw.Field) -> TMode
meta.table_name, field.column_name, field
)
)
if field.unique:
self.__ops__.append(
self.__migrator__.add_index(meta.table_name, (field.column_name,), unique=True)
)
return model

add_columns = depricated_method(add_fields, "add_columns")
Expand Down

0 comments on commit c24331f

Please sign in to comment.