This commit is contained in:
shoopea 2019-05-06 12:01:01 +08:00
parent 3cc96d8bce
commit bb511ec197

7
sql.go
View File

@ -2,6 +2,7 @@ package main
import (
"log"
"strconv"
)
func initDB() {
@ -115,9 +116,9 @@ func initDB() {
failOnError(err, "initDB : create table obj_msg_report")
_, err = db.Exec(`INSERT INTO code_obj_type (id, intl_id, name)
VALUES (` + objTypeUser + `, "user", "User")
,(` + objTypeGuild + `, "guild", "Guild")
,(` + objTypeMessage + `, "msg", "Message");`)
VALUES (` + strconv.Itoa(objTypeUser) + `, "user", "User")
,(` + strconv.Itoa(objTypeGuild) + `, "guild", "Guild")
,(` + strconv.Itoa(objTypeMessage) + `, "msg", "Message");`)
failOnError(err, "initDB : populate table code_obj_type")
_, err = db.Exec(`INSERT INTO code_obj_sub_type (id, intl_id, name, obj_type_id)