refactor: add droping of index as well

This commit is contained in:
Igor Ilic 2025-11-05 18:04:05 +01:00
parent 1ef5805c57
commit ce64f242b7

View file

@ -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 ###