Skip to content

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Nov 24, 2021
1 parent 82669a0 commit 20a5c90
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion superset/connectors/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2043,7 +2043,7 @@ def after_delete( # pylint: disable=unused-argument
session.delete(dataset)

@staticmethod
def after_update( # pylint: disable=unused-argument, too-many-branches, too-many-locals
def after_update( # pylint: disable=too-many-branches, too-many-locals, too-many-statements
mapper: Mapper, connection: Connection, target: "SqlaTable",
) -> None:
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def upgrade():
sa.Column("table_id", sa.INTEGER(), autoincrement=False, nullable=False),
sa.Column("column_id", sa.INTEGER(), autoincrement=False, nullable=False),
sa.ForeignKeyConstraint(
["column_id"], ["columns.id"], name="sl_table_columns_ibfk_2"
["column_id"], ["sl_columns.id"], name="sl_table_columns_ibfk_2"
),
sa.ForeignKeyConstraint(
["table_id"], ["tables.id"], name="sl_table_columns_ibfk_1"
["table_id"], ["sl_tables.id"], name="sl_table_columns_ibfk_1"
),
)

Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/datasets/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def test_dataset_attributes(app_context: None, session: Session) -> None:
session.flush()

dataset = session.query(SqlaTable).one()
# If this tests fails because attributes changed, make sure to update
# If this test fails because attributes changed, make sure to update
# ``SqlaTable.after_insert`` accordingly.
assert sorted(dataset.__dict__.keys()) == [
"_sa_instance_state",
Expand Down

0 comments on commit 20a5c90

Please sign in to comment.