Skip to content

Commit

Permalink
alembic: fix syntax issue for mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
kpsherva committed Jun 14, 2023
1 parent 66976bc commit 9c8f046
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def upgrade():
pass


# fmt: off
def downgrade():
"""Downgrade database."""
op.alter_column(
Expand All @@ -36,5 +37,6 @@ def downgrade():
"accounts_role",
["role_id"],
["id"],
ondelete="CASCADE",
ondelete="CASCADE"
)
# fmt: on
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
depends_on = None


# fmt: off
def upgrade():
"""Upgrade database."""
op.alter_column(
Expand All @@ -41,8 +42,9 @@ def upgrade():
"accounts_role",
["role_id"],
["id"],
ondelete="CASCADE",
ondelete="CASCADE"
)
# fmt: on


def downgrade():
Expand Down

0 comments on commit 9c8f046

Please sign in to comment.