7b0efb3c45
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>
18 lines
326 B
Go
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)
|
|
}
|
|
}
|