Add extend_existing=True to MenuNode and ContainerRelation models
Prevents SQLAlchemy 'table already defined' error if the table gets registered by a stale glue submodule or cached Docker layer before the shared model is loaded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,7 @@ class ContainerRelation(Base):
|
||||
),
|
||||
Index("ix_container_relations_parent", "parent_type", "parent_id"),
|
||||
Index("ix_container_relations_child", "child_type", "child_id"),
|
||||
{"extend_existing": True},
|
||||
)
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
|
||||
|
||||
Reference in New Issue
Block a user