fix(db): add ondelete cascade to all FK constraints, fix multimodal flag persistence
- Add ondelete=CASCADE/SET NULL to all environment and translate FK constraints - Add is_multimodal to GET /api/settings/consolidated response - Fix toggleActive to not overwrite is_multimodal with false - New SearchableMultiSelect component for dashboard search with multi-select - Fix validation task page: task data unwrapping, date formatting, dashboard multi-select - Fix infinite effect loop on dashboards page via queueMicrotask guard - 3 new Alembic migrations (merge f0e9d8c7b6a5, translate b0c1d2e3f4a5)
This commit is contained in:
@@ -58,8 +58,8 @@ class DatabaseMapping(Base):
|
||||
__tablename__ = "database_mappings"
|
||||
|
||||
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
source_env_id = Column(String, ForeignKey("environments.id"), nullable=False)
|
||||
target_env_id = Column(String, ForeignKey("environments.id"), nullable=False)
|
||||
source_env_id = Column(String, ForeignKey("environments.id", ondelete="CASCADE"), nullable=False)
|
||||
target_env_id = Column(String, ForeignKey("environments.id", ondelete="CASCADE"), nullable=False)
|
||||
source_db_uuid = Column(String, nullable=False)
|
||||
target_db_uuid = Column(String, nullable=False)
|
||||
source_db_name = Column(String, nullable=False)
|
||||
@@ -73,8 +73,8 @@ class MigrationJob(Base):
|
||||
__tablename__ = "migration_jobs"
|
||||
|
||||
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
source_env_id = Column(String, ForeignKey("environments.id"), nullable=False)
|
||||
target_env_id = Column(String, ForeignKey("environments.id"), nullable=False)
|
||||
source_env_id = Column(String, ForeignKey("environments.id", ondelete="CASCADE"), nullable=False)
|
||||
target_env_id = Column(String, ForeignKey("environments.id", ondelete="CASCADE"), nullable=False)
|
||||
status = Column(SQLEnum(MigrationStatus), default=MigrationStatus.PENDING)
|
||||
replace_db = Column(Boolean, default=False)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
@@ -88,7 +88,7 @@ class ResourceMapping(Base):
|
||||
__tablename__ = "resource_mappings"
|
||||
|
||||
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||
environment_id = Column(String, ForeignKey("environments.id"), nullable=False)
|
||||
environment_id = Column(String, ForeignKey("environments.id", ondelete="CASCADE"), nullable=False)
|
||||
resource_type = Column(SQLEnum(ResourceType), nullable=False)
|
||||
uuid = Column(String, nullable=False)
|
||||
remote_integer_id = Column(String, nullable=False) # Stored as string to handle potentially large or composite IDs safely, though Superset usually uses integers.
|
||||
|
||||
Reference in New Issue
Block a user