fix column

This commit is contained in:
shoopea 2019-05-06 11:09:31 +08:00
parent 47161d7167
commit e63c05ca0b

5
sql.go
View File

@ -58,8 +58,9 @@ func initDB() {
failOnError(err, "initDB : create table code_obj_sub_type") failOnError(err, "initDB : create table code_obj_sub_type")
_, 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
,obj_sub_type_id SMALLINT UNSIGNED NOT NULL
,PRIMARY KEY (id) ,PRIMARY KEY (id)
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARSET=utf8 COLLATE utf8_unicode_ci;`) ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARSET=utf8 COLLATE utf8_unicode_ci;`)
failOnError(err, "initDB : create table obj") failOnError(err, "initDB : create table obj")