def alter_field(self, model, old_field, new_field, strict=False):
is_old_field_hstore = isinstance(old_field, HStoreField)<EOL>is_new_field_hstore = isinstance(new_field, HStoreField)<EOL>if not is_old_field_hstore and not is_new_field_hstore:<EOL><INDENT>return<EOL><DEDENT>old_uniqueness = getattr(old_field, '<STR_LIT>', []) or []<EOL>new_uniqueness = getattr(new_field, '<STR_LIT>', []) or []<EOL>if str(old_field.column) != str(new_field.column):<EOL><INDENT>for keys in self._iterate_uniqueness_keys(old_field):<EOL><INDENT>self._rename_hstore_unique(<EOL>model._meta.db_table,<EOL>model._meta.db_table,<EOL>old_field,<EOL>new_field,<EOL>keys<EOL>)<EOL><DEDENT><DEDENT>for keys in old_uniqueness:<EOL><INDENT>if keys not in new_uniqueness:<EOL><INDENT>self._drop_hstore_unique(<EOL>model,<EOL>old_field,<EOL>self._compose_keys(keys)<EOL>)<EOL><DEDENT><DEDENT>for keys in new_uniqueness:<EOL><INDENT>if keys not in old_uniqueness:<EOL><INDENT>self._create_hstore_unique(<EOL>model,<EOL>new_field,<EOL>self._compose_keys(keys)<EOL>)<EOL><DEDENT><DEDENT>
Ran when the configuration on a field changed.