migrate from sqlite3 file to psql

This commit is contained in:
Blake Ridgway
2026-04-17 19:38:35 -05:00
parent ba1770b493
commit b6ef3a73f2
5 changed files with 81 additions and 157 deletions

View File

@@ -17,10 +17,10 @@ func main() {
_ = godotenv.Load()
token := mustEnv("DISCORD_TOKEN")
dbPath := getEnv("DB_PATH", "cycling_bot.db")
dbURL := mustEnv("DATABASE_URL")
guildID := getEnv("GUILD_ID", "") // empty = global commands (takes ~1h to propagate)
database, err := db.Open(dbPath)
database, err := db.Open(dbURL)
if err != nil {
log.Fatalf("open database: %v", err)
}