feat(fc3b): migration 0012 + AppSetting model

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-20 18:33:14 -04:00
parent e623e97be2
commit 2a18016b69
4 changed files with 94 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
"""AppSetting — small key/value app config (extension API key, etc.).
For settings that need DB persistence + runtime mutation. Use
`ImportSettings` for the structured import-tuning settings; this
table is for one-off scalar values keyed by string.
"""
from datetime import datetime
from sqlalchemy import DateTime, String, Text, func
from sqlalchemy.orm import Mapped, mapped_column
from .base import Base
class AppSetting(Base):
__tablename__ = "app_setting"
key: Mapped[str] = mapped_column(String(64), primary_key=True)
value: Mapped[str] = mapped_column(Text, nullable=False)
updated_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True), nullable=False,
server_default=func.now(), onupdate=func.now(),
)