This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-11-18 14:38:03 +07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
|
|
|
|
_ "github.com/mattn/go-sqlite3"
|
|
|
|
)
|
|
|
|
|
|
|
|
var db *sql.DB
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
var err error
|
|
|
|
db, err = sql.Open("sqlite3", "./bot.db")
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
db.SetMaxOpenConns(1)
|
|
|
|
db.Exec("CREATE TABLE xp(id STRING NOT NULL UNIQUE, xp INTEGER NOT NULL)")
|
|
|
|
db.Exec("CREATE TABLE shard(id STRING NOT NULL UNIQUE, shard INTEGER NOT NULL)")
|
2019-11-19 06:59:32 +07:00
|
|
|
db.Exec("CREATE TABLE prestige(id STRING NOT NULL UNIQUE, multiplier INTEGER NOT NULL)")
|
2019-11-18 14:38:03 +07:00
|
|
|
}
|