Files
bbq/migrate.go
T
ryan 7b0efb3c45 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>
2026-05-17 08:02:24 -04:00

18 lines
326 B
Go

package main
import (
"database/sql"
"log"
"strings"
)
func runMigrations(database *sql.DB) {
_, err := database.Exec(`ALTER TABLE events ADD COLUMN description TEXT DEFAULT ''`)
if err != nil {
if strings.Contains(err.Error(), "duplicate column name") {
return
}
log.Printf("migration warning: %v", err)
}
}