Fix: Add extend_existing=True to prevent MetaData conflicts on plugin reload

Co-authored-by: Fu-Jie <33599649+Fu-Jie@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-31 04:14:16 +00:00
parent e510b3b580
commit 570381f5b3
3 changed files with 3 additions and 0 deletions

View File

@@ -383,6 +383,7 @@ class PluginTable(owui_Base):
"""Plugin storage table - inherits from OpenWebUI's Base"""
__tablename__ = "plugin_table_name"
__table_args__ = {"extend_existing": True} # Required to avoid conflicts on plugin reload
id = Column(Integer, primary_key=True, autoincrement=True)
unique_id = Column(String(255), unique=True, nullable=False, index=True)