test
This commit is contained in:
parent
3cc96d8bce
commit
bb511ec197
7
sql.go
7
sql.go
@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func initDB() {
|
func initDB() {
|
||||||
@ -115,9 +116,9 @@ func initDB() {
|
|||||||
failOnError(err, "initDB : create table obj_msg_report")
|
failOnError(err, "initDB : create table obj_msg_report")
|
||||||
|
|
||||||
_, err = db.Exec(`INSERT INTO code_obj_type (id, intl_id, name)
|
_, err = db.Exec(`INSERT INTO code_obj_type (id, intl_id, name)
|
||||||
VALUES (` + objTypeUser + `, "user", "User")
|
VALUES (` + strconv.Itoa(objTypeUser) + `, "user", "User")
|
||||||
,(` + objTypeGuild + `, "guild", "Guild")
|
,(` + strconv.Itoa(objTypeGuild) + `, "guild", "Guild")
|
||||||
,(` + objTypeMessage + `, "msg", "Message");`)
|
,(` + strconv.Itoa(objTypeMessage) + `, "msg", "Message");`)
|
||||||
failOnError(err, "initDB : populate table code_obj_type")
|
failOnError(err, "initDB : populate table code_obj_type")
|
||||||
|
|
||||||
_, err = db.Exec(`INSERT INTO code_obj_sub_type (id, intl_id, name, obj_type_id)
|
_, err = db.Exec(`INSERT INTO code_obj_sub_type (id, intl_id, name, obj_type_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user