feat: add Nostr event tracking columns to events table
Migration m009 adds nostr_event_id and nostr_event_created_at to track published NIP-52 calendar events. Enables correlation between LNbits events and their Nostr representations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f965cf07c9
commit
f76e21e960
2 changed files with 14 additions and 0 deletions
|
|
@ -202,3 +202,15 @@ async def m008_add_event_status(db):
|
||||||
await db.execute(
|
await db.execute(
|
||||||
"ALTER TABLE events.events ADD COLUMN status TEXT NOT NULL DEFAULT 'approved';"
|
"ALTER TABLE events.events ADD COLUMN status TEXT NOT NULL DEFAULT 'approved';"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
async def m009_add_nostr_columns(db):
|
||||||
|
"""
|
||||||
|
Add columns to track published NIP-52 Nostr calendar events.
|
||||||
|
"""
|
||||||
|
await db.execute(
|
||||||
|
"ALTER TABLE events.events ADD COLUMN nostr_event_id TEXT;"
|
||||||
|
)
|
||||||
|
await db.execute(
|
||||||
|
"ALTER TABLE events.events ADD COLUMN nostr_event_created_at INTEGER;"
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ class Event(BaseModel):
|
||||||
banner: str | None = None
|
banner: str | None = None
|
||||||
extra: EventExtra = Field(default_factory=EventExtra)
|
extra: EventExtra = Field(default_factory=EventExtra)
|
||||||
status: str = "approved" # proposed, approved, rejected
|
status: str = "approved" # proposed, approved, rejected
|
||||||
|
nostr_event_id: str | None = None
|
||||||
|
nostr_event_created_at: int | None = None
|
||||||
|
|
||||||
|
|
||||||
class TicketExtra(BaseModel):
|
class TicketExtra(BaseModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue