properly persist channels

This commit is contained in:
Jeremy Latt 2014-02-25 15:57:35 -08:00
parent a30bb540e9
commit b30e247e77
4 changed files with 33 additions and 20 deletions

View file

@ -33,10 +33,10 @@ func initDB(config *irc.Config) {
_, err = db.Exec(`
CREATE TABLE channel (
name TEXT NOT NULL UNIQUE,
flags TEXT,
key TEXT,
topic TEXT,
user_limit INTEGER)`)
flags TEXT NOT NULL,
key TEXT NOT NULL,
topic TEXT NOT NULL,
user_limit INTEGER DEFAULT 0)`)
if err != nil {
log.Fatal(err)
}