refactor: Use user_tenants table to update
This commit is contained in:
parent
fa4c50f972
commit
c4807a0c67
1 changed files with 3 additions and 1 deletions
|
|
@ -95,7 +95,9 @@ def upgrade() -> None:
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
conn = op.get_bind()
|
conn = op.get_bind()
|
||||||
conn.execute(dataset.update().values(tenant_id=tenant_id_from_user, user_id=user.c.id))
|
conn.execute(
|
||||||
|
user_tenants.update().values(tenant_id=tenant_id_from_user, user_id=user.c.id)
|
||||||
|
)
|
||||||
|
|
||||||
tenant_id_column = _get_column(insp, "datasets", "tenant_id")
|
tenant_id_column = _get_column(insp, "datasets", "tenant_id")
|
||||||
if not tenant_id_column:
|
if not tenant_id_column:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue