test
This commit is contained in:
parent
af34558920
commit
44f622608b
19
sql.go
19
sql.go
@ -64,6 +64,16 @@ func initDB() {
|
|||||||
failOnError(err, "initDB : create table code_obj_sub_type")
|
failOnError(err, "initDB : create table code_obj_sub_type")
|
||||||
log.Println("initDB : code_obj_sub_type created ...")
|
log.Println("initDB : code_obj_sub_type created ...")
|
||||||
|
|
||||||
|
_, err = db.Exec(`CREATE TABLE code_obj_castle (
|
||||||
|
id SMALLINT UNSIGNED NOT NULL
|
||||||
|
,user_id VARCHAR(32) NOT NULL
|
||||||
|
,intl_id VARCHAR(32) NOT NULL
|
||||||
|
,name VARCHAR(80) NOT NULL
|
||||||
|
,PRIMARY KEY (id)
|
||||||
|
) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`)
|
||||||
|
failOnError(err, "initDB : create table obj_castle")
|
||||||
|
log.Println("initDB : obj_guild created ...")
|
||||||
|
|
||||||
_, err = db.Exec(`CREATE TABLE obj (
|
_, err = db.Exec(`CREATE TABLE obj (
|
||||||
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
|
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
|
||||||
,obj_type_id SMALLINT UNSIGNED NOT NULL
|
,obj_type_id SMALLINT UNSIGNED NOT NULL
|
||||||
@ -101,15 +111,6 @@ func initDB() {
|
|||||||
failOnError(err, "initDB : create table obj_guild")
|
failOnError(err, "initDB : create table obj_guild")
|
||||||
log.Println("initDB : obj_guild created ...")
|
log.Println("initDB : obj_guild created ...")
|
||||||
|
|
||||||
_, err = db.Exec(`CREATE TABLE code_obj_castle (
|
|
||||||
id SMALLINT UNSIGNED NOT NULL
|
|
||||||
,user_id VARCHAR(32) NOT NULL
|
|
||||||
,intl_id VARCHAR(32) NOT NULL
|
|
||||||
,name VARCHAR(80) NOT NULL
|
|
||||||
) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`)
|
|
||||||
failOnError(err, "initDB : create table obj_castle")
|
|
||||||
log.Println("initDB : obj_guild created ...")
|
|
||||||
|
|
||||||
_, err = db.Exec(`CREATE TABLE obj_war (
|
_, err = db.Exec(`CREATE TABLE obj_war (
|
||||||
obj_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
|
obj_id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT
|
||||||
,start_time DATETIME NOT NULL
|
,start_time DATETIME NOT NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user