Fix: remove updated_at from user_tenants INSERT in migration 0037
This commit is contained in:
@@ -83,7 +83,7 @@ def upgrade() -> None:
|
|||||||
# ── 5. Data migration: copy tenant_id, role, role_id from users to user_tenants ─
|
# ── 5. Data migration: copy tenant_id, role, role_id from users to user_tenants ─
|
||||||
# Only create UserTenant rows that don't already exist
|
# Only create UserTenant rows that don't already exist
|
||||||
conn.execute(sa.text("""
|
conn.execute(sa.text("""
|
||||||
INSERT INTO user_tenants (user_id, tenant_id, is_default, role, role_id, status, created_at, updated_at)
|
INSERT INTO user_tenants (user_id, tenant_id, is_default, role, role_id, status, created_at)
|
||||||
SELECT
|
SELECT
|
||||||
u.id,
|
u.id,
|
||||||
u.tenant_id,
|
u.tenant_id,
|
||||||
@@ -91,7 +91,6 @@ def upgrade() -> None:
|
|||||||
COALESCE(u.role, 'viewer'),
|
COALESCE(u.role, 'viewer'),
|
||||||
u.role_id,
|
u.role_id,
|
||||||
'active',
|
'active',
|
||||||
NOW(),
|
|
||||||
NOW()
|
NOW()
|
||||||
FROM users u
|
FROM users u
|
||||||
WHERE NOT EXISTS (
|
WHERE NOT EXISTS (
|
||||||
|
|||||||
Reference in New Issue
Block a user