Skip to content

Commit

Permalink
Fix bug when calling sqlmigrate
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeskens committed Aug 1, 2023
1 parent f7fd84d commit 51031ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_iseries/schemaEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def alter_field(self, model, old_field, new_field, strict=False):
self.execute(
self.sql_create_fk % {
'table': self.quote_name(model._meta.db_table),
'name': self._create_index_name(model, [new_field.column], suffix="_fk"),
'name': self._create_index_name(self.quote_name(model._meta.db_table), [new_field.column], suffix="_fk"),
'column': self.quote_name(new_field.column),
'to_table': self.quote_name(new_field.remote_field.model._meta.db_table),
'to_column': self.quote_name(new_field.remote_field.get_related_field().column),
Expand Down

1 comment on commit 51031ac

@soundstripe
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good fix. Would you care to put it in a PR against https://github.com/soundstripe/django-pyodbc-iseries ? If not I can put it in myself, just thought I'd ask.

Please sign in to comment.