diff --git a/src/cleveragents/infrastructure/database/migrations/versions/m11_001_standalone_invariants.py b/src/cleveragents/infrastructure/database/migrations/versions/m11_001_standalone_invariants.py index 9fe8ebd04..b6c2fad13 100644 --- a/src/cleveragents/infrastructure/database/migrations/versions/m11_001_standalone_invariants.py +++ b/src/cleveragents/infrastructure/database/migrations/versions/m11_001_standalone_invariants.py @@ -8,7 +8,7 @@ separate from action-level (``action_invariants``) and plan-level CLI invocations even when not attached to a specific action or plan. Revision ID: m11_001_standalone_invariants -Revises: m9_003_plan_result_success_column +Revises: m9_004_merge_invariants_branch Create Date: 2026-05-12 00:00:00 """ @@ -18,7 +18,7 @@ from alembic import op # revision identifiers, used by Alembic. revision: str = "m11_001_standalone_invariants" -down_revision: str | None = "m9_003_plan_result_success_column" +down_revision: str | None = "m9_004_merge_invariants_branch" branch_labels: str | None = None depends_on: str | None = None diff --git a/src/cleveragents/infrastructure/database/models.py b/src/cleveragents/infrastructure/database/models.py index 0dd4f4d31..be56635a9 100644 --- a/src/cleveragents/infrastructure/database/models.py +++ b/src/cleveragents/infrastructure/database/models.py @@ -3785,35 +3785,3 @@ class IndexedFileModel(Base): Index("ix_indexed_files_language", "language"), ) - -# --------------------------------------------------------------------------- -# Invariant Models (Stage M3 - invariant management, issue #8524) -# --------------------------------------------------------------------------- - - -class InvariantModel(Base): # type: ignore[misc] - """Database model for globally-scoped invariants. - - Invariants are user-defined constraints that must hold true across all - planning sessions. Each row represents a single invariant rule with - its description, creation timestamp, and active status. - - Table: ``invariants`` - """ - - __allow_unmapped__ = True - __tablename__ = "invariants" - - # PK: UUID stored as a 36-character string - id = Column(String(36), primary_key=True) - - # Human-readable description of the invariant constraint - description = Column(Text, nullable=False) - - # Timestamp of creation (ISO-8601 string, UTC) - created_at = Column(String(30), nullable=False) - - # Whether this invariant is currently active (default True) - is_active = Column(Boolean, nullable=False, default=True, server_default="1") - - __table_args__ = (Index("ix_invariants_is_active", "is_active"),)