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 ─
|
||||
# Only create UserTenant rows that don't already exist
|
||||
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
|
||||
u.id,
|
||||
u.tenant_id,
|
||||
@@ -91,7 +91,6 @@ def upgrade() -> None:
|
||||
COALESCE(u.role, 'viewer'),
|
||||
u.role_id,
|
||||
'active',
|
||||
NOW(),
|
||||
NOW()
|
||||
FROM users u
|
||||
WHERE NOT EXISTS (
|
||||
|
||||
Reference in New Issue
Block a user