Move working documents to its own area, rename dashboard
This commit is contained in:
@@ -9,6 +9,8 @@ from sqlalchemy.engine import Engine
|
||||
TENANT_TABLES = {
|
||||
"client_users": None,
|
||||
"client_feature_access": None,
|
||||
"client_user_module_permissions": None,
|
||||
"client_access_audit_events": None,
|
||||
"raw_materials": None,
|
||||
"raw_material_price_versions": None,
|
||||
"mixes": None,
|
||||
@@ -123,6 +125,34 @@ def sync_tenant_ids(engine: Engine) -> dict[str, int]:
|
||||
"""
|
||||
),
|
||||
),
|
||||
(
|
||||
"client_user_module_permissions",
|
||||
text(
|
||||
"""
|
||||
UPDATE client_user_module_permissions
|
||||
SET tenant_id = (
|
||||
SELECT client_users.tenant_id
|
||||
FROM client_users
|
||||
WHERE client_users.id = client_user_module_permissions.client_user_id
|
||||
)
|
||||
WHERE tenant_id IS NULL OR tenant_id = '' OR tenant_id = 'default'
|
||||
"""
|
||||
),
|
||||
),
|
||||
(
|
||||
"client_access_audit_events",
|
||||
text(
|
||||
"""
|
||||
UPDATE client_access_audit_events
|
||||
SET tenant_id = (
|
||||
SELECT client_accounts.tenant_id
|
||||
FROM client_accounts
|
||||
WHERE client_accounts.id = client_access_audit_events.client_account_id
|
||||
)
|
||||
WHERE tenant_id IS NULL OR tenant_id = '' OR tenant_id = 'default'
|
||||
"""
|
||||
),
|
||||
),
|
||||
(
|
||||
"raw_materials",
|
||||
text(
|
||||
|
||||
Reference in New Issue
Block a user