mirror of https://github.com/velour/catbase.git
babbler: create tables no matter what
This commit is contained in:
parent
df29c89d84
commit
6af9114a37
|
@ -56,7 +56,6 @@ type BabblerArc struct {
|
||||||
func New(bot bot.Bot) *BabblerPlugin {
|
func New(bot bot.Bot) *BabblerPlugin {
|
||||||
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
||||||
|
|
||||||
if bot.DBVersion() == 1 {
|
|
||||||
if _, err := bot.DB().Exec(`create table if not exists babblers (
|
if _, err := bot.DB().Exec(`create table if not exists babblers (
|
||||||
id integer primary key,
|
id integer primary key,
|
||||||
babbler string
|
babbler string
|
||||||
|
@ -89,7 +88,6 @@ func New(bot bot.Bot) *BabblerPlugin {
|
||||||
);`); err != nil {
|
);`); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
plugin := &BabblerPlugin{
|
plugin := &BabblerPlugin{
|
||||||
Bot: bot,
|
Bot: bot,
|
||||||
|
|
Loading…
Reference in New Issue