refactor: add droping of index as well
This commit is contained in:
parent
1ef5805c57
commit
ce64f242b7
1 changed files with 2 additions and 3 deletions
|
|
@ -126,11 +126,10 @@ def upgrade() -> None:
|
|||
conn = op.get_bind()
|
||||
conn.execute(dataset.update().values(tenant_id=tenant_id_from_dataset_owner))
|
||||
|
||||
op.create_index(op.f("ix_datasets_tenant_id"), "datasets", ["tenant_id"], unique=False)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("user_tenants")
|
||||
op.drop_index(op.f("ix_datasets_tenant_id"), table_name="datasets")
|
||||
op.drop_column("datasets", "tenant_id")
|
||||
op.drop_table("user_tenants")
|
||||
# ### end Alembic commands ###
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue