semantics: complete DEF-to-region migration, fix regressions
- Convert legacy [DEF🆔Type] anchors to #region/#endregion across 329 files
- Reinstate _normalize_timestamp_value in sql_generator.py
- Fix MarkerLogger→logger migration in events.py (molecular CoT markers)
- Fix dataset_review orchestrator dependencies (_build_execution_snapshot)
- Fix config_manager stale-record deletion (moved to save path only)
- Add 77 missing [/DEF:] closers in 5 unbalanced test files
- Update assistant_chat.integration.test.js for #region format
- Apply molecular-cot-logging markers (REASON/REFLECT/EXPLORE) via logger.* methods
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
# #region MappingModels [C:3] [TYPE Module] [SEMANTICS database, mapping, environment, migration, sqlalchemy, sqlite]
|
||||
# @BRIEF Defines the database schema for environment metadata and database mappings using SQLAlchemy.
|
||||
# @LAYER Domain
|
||||
# @INVARIANT All primary keys are UUID strings.
|
||||
# @RELATION DEPENDS_ON -> [sqlalchemy]
|
||||
#
|
||||
# @BRIEF Defines the database schema for environment metadata and database mappings using SQLAlchemy.
|
||||
# @LAYER: Domain
|
||||
# @RELATION DEPENDS_ON -> sqlalchemy
|
||||
|
||||
#
|
||||
# @INVARIANT: All primary keys are UUID strings.
|
||||
# @CONSTRAINT: source_env_id and target_env_id must be valid environment IDs.
|
||||
|
||||
# [SECTION: IMPORTS]
|
||||
from sqlalchemy import Column, String, Boolean, DateTime, ForeignKey, Enum as SQLEnum
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.sql import func
|
||||
import uuid
|
||||
import enum
|
||||
# [/SECTION]
|
||||
|
||||
Base = declarative_base()
|
||||
|
||||
@@ -39,7 +37,7 @@ class MigrationStatus(enum.Enum):
|
||||
|
||||
# #region Environment [C:3] [TYPE Class]
|
||||
# @BRIEF Represents a Superset instance environment.
|
||||
# @RELATION DEPENDS_ON -> [MappingModels]
|
||||
# @RELATION DEPENDS_ON -> MappingModels
|
||||
class Environment(Base):
|
||||
__tablename__ = "environments"
|
||||
|
||||
@@ -80,7 +78,7 @@ class MigrationJob(Base):
|
||||
# #region ResourceMapping [C:3] [TYPE Class]
|
||||
# @BRIEF Maps a universal UUID for a resource to its actual ID on a specific environment.
|
||||
# @TEST_DATA: resource_mapping_record -> {'environment_id': 'prod-env-1', 'resource_type': 'chart', 'uuid': '123e4567-e89b-12d3-a456-426614174000', 'remote_integer_id': '42'}
|
||||
# @RELATION: DEPENDS_ON -> MappingModels
|
||||
# @RELATION DEPENDS_ON -> MappingModels
|
||||
class ResourceMapping(Base):
|
||||
__tablename__ = "resource_mappings"
|
||||
|
||||
@@ -94,3 +92,4 @@ class ResourceMapping(Base):
|
||||
# #endregion ResourceMapping
|
||||
|
||||
# #endregion MappingModels
|
||||
|
||||
|
||||
Reference in New Issue
Block a user