fix: rename Note.metadata → entity_meta (reserved by SQLAlchemy Declarative API)

SQLAlchemy reserves 'metadata' as a class attribute on declarative models.
Renamed to 'entity_meta' with explicit column name 'metadata' so the DB
column is unchanged but the Python attribute no longer conflicts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-31 18:13:47 -04:00
parent 80f30b705d
commit 95056d5be7
4 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -58,7 +58,7 @@ async def create_note(
due_date: date | None = None,
recurrence_rule: dict | None = None,
note_type: str = "note",
metadata: dict | None = None,
entity_meta: dict | None = None,
) -> Note:
# Auto-populate project_id from milestone when not explicitly provided
if milestone_id is not None and project_id is None:
@@ -85,7 +85,7 @@ async def create_note(
due_date=due_date,
recurrence_rule=recurrence_rule,
note_type=note_type,
metadata=metadata,
entity_meta=entity_meta,
)
session.add(note)
await session.commit()