feat: add location and categories fields, simplify event creation
Some checks failed
lint.yml / feat: add location and categories fields, simplify event creation (pull_request) Failing after 0s
Some checks failed
lint.yml / feat: add location and categories fields, simplify event creation (pull_request) Failing after 0s
- Add location (text) and categories (JSON list) to Event model - Make most CreateEvent fields optional: only title + start date required - Default end_date to start_date, closing_date to end_date - Categories stored as JSON text, parsed via validator - NIP-52 publisher includes location tag and t tags for categories - Migration m011 adds location and categories columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d69ec7dda2
commit
29045163a3
4 changed files with 48 additions and 15 deletions
|
|
@ -231,3 +231,15 @@ async def m010_add_events_settings(db):
|
|||
await db.execute(
|
||||
"INSERT OR IGNORE INTO events.settings (id, auto_approve) VALUES (1, FALSE);"
|
||||
)
|
||||
|
||||
|
||||
async def m011_add_location_and_categories(db):
|
||||
"""
|
||||
Add location and categories columns for NIP-52 calendar event support.
|
||||
"""
|
||||
await db.execute(
|
||||
"ALTER TABLE events.events ADD COLUMN location TEXT;"
|
||||
)
|
||||
await db.execute(
|
||||
"ALTER TABLE events.events ADD COLUMN categories TEXT;"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue