Coverage for app/updates/_001_base.py: 100%
5 statements
« prev ^ index » next coverage.py v7.9.2, created at 2026-02-19 12:47 +0000
« prev ^ index » next coverage.py v7.9.2, created at 2026-02-19 12:47 +0000
1# app/updates/_001_base.py
2from neo4j import ManagedTransaction
4ID = 1
5DESCRIPTION = "Create constraints + init meta"
7def upgrade(tx: ManagedTransaction) -> None:
8 tx.run("""
9 CREATE CONSTRAINT sys_kind_key_unique IF NOT EXISTS
10 FOR (m:__sys__)
11 REQUIRE (m.kind, m.key) IS UNIQUE
12 """)