AP2.3a: Operating Context API mit ui_profile_json und Archetyp-Sync.
Test Suite / pytest-backend (push) Waiting to run
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Test Suite / pytest-backend (push) Waiting to run
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
ad6740ffa8
commit
4ad908bfbf
7 files changed
+486
-3
No files matched your search
@@ -14,17 +14,20 @@ def sync_entity_field_registry_to_db() -> int:
|
||||
try:
|
||||
with conn.cursor() as cur:
|
||||
for archetype in ENTITY_ARCHETYPES:
|
||||
ui_profile = archetype.get("ui_profile_json") or {}
|
||||
cur.execute(
|
||||
"""
|
||||
INSERT INTO entity_archetypes (
|
||||
archetype_key, entity_type, label, description, is_system
|
||||
archetype_key, entity_type, label, description, is_system,
|
||||
ui_profile_json
|
||||
)
|
||||
VALUES (%s, %s, %s, %s, %s)
|
||||
VALUES (%s, %s, %s, %s, %s, %s::jsonb)
|
||||
ON CONFLICT (archetype_key) DO UPDATE SET
|
||||
entity_type = EXCLUDED.entity_type,
|
||||
label = EXCLUDED.label,
|
||||
description = EXCLUDED.description,
|
||||
is_system = EXCLUDED.is_system,
|
||||
ui_profile_json = EXCLUDED.ui_profile_json,
|
||||
updated_at = NOW()
|
||||
""",
|
||||
(
|
||||
@@ -33,6 +36,7 @@ def sync_entity_field_registry_to_db() -> int:
|
||||
archetype["label"],
|
||||
archetype["description"],
|
||||
archetype["is_system"],
|
||||
json.dumps(ui_profile),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user