`CREATE TABLE Users (id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL, hash VARCHAR(60) NOT NULL, apikey VARCHAR(32));`,
`CREATE TABLE Campaigns (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, created_date TEXT NOT NULL, completed_date TEXT, status TEXT NOT NULL);`,
}
fmt.Println("Creating db at "+config.Conf.DBPath)
//Create the tables needed
for_,stmt:=rangecreateTablesSQL{
_,err=Conn.Exec(stmt)
iferr!=nil{
returnerr
}
}
//Create the default user
stmt,err:=Conn.Prepare(`INSERT INTO Users (username, hash, apikey) VALUES (?, ?, ?);`)