Add markdown event descriptions for hosts to provide context
Hosts can now add a free-form description (with markdown rendering via goldmark) when creating or editing events. Descriptions render safely with no raw HTML passthrough. Includes ALTER TABLE migration for existing databases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -5,10 +5,13 @@ SELECT * FROM events WHERE slug = ?;
|
||||
SELECT * FROM events WHERE admin_token = ?;
|
||||
|
||||
-- name: CreateEvent :one
|
||||
INSERT INTO events (slug, title, date, time, location, admin_token)
|
||||
VALUES (?, ?, ?, ?, ?, ?)
|
||||
INSERT INTO events (slug, title, date, time, location, admin_token, description)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?)
|
||||
RETURNING *;
|
||||
|
||||
-- name: UpdateEventDescription :exec
|
||||
UPDATE events SET description = ? WHERE id = ?;
|
||||
|
||||
-- name: UpdateEvent :exec
|
||||
UPDATE events SET title = ?, date = ?, time = ?, location = ? WHERE id = ?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user