Skip to content

Commit

Permalink
workspaces relationship fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amboyandrey committed Aug 10, 2024
1 parent 326ff8d commit 5cc770b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def upgrade() -> None:
"user_group", sa.Column("workspace_id", sa.Integer(), nullable=False)
)
op.create_foreign_key(
None, "user_group", "workspace", ["workspace_id"], ["workspace_id"]
"workspace__user_group", "user_group", "workspace", ["workspace_id"], ["workspace_id"]
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, "user_group", type_="foreignkey")
op.drop_constraint("workspace__user_group_fk", "user_group", type_="foreignkey")
op.drop_column("user_group", "workspace_id")
op.create_unique_constraint("chat_message_id_key", "chat_message", ["id"])
# ### end Alembic commands ###
4 changes: 2 additions & 2 deletions backend/alembic/versions/da12247ef2fc_workspace_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ def downgrade() -> None:
existing_type=sa.INTEGER(),
nullable=False,
)
op.drop_constraint(None, "api_key", type_="foreignkey")
op.drop_constraint(None, "api_key", type_="foreignkey")
op.drop_constraint("api_key__user_fk", "api_key", type_="foreignkey")
op.drop_constraint("api_key__user_fk", "api_key", type_="foreignkey")
op.create_table(
"slack_bot_config",
sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False),
Expand Down

0 comments on commit 5cc770b

Please sign in to comment.