From e63c05ca0b2639fd155de5ed993c30bcfdd750d0 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 6 May 2019 11:09:31 +0800 Subject: [PATCH] fix column --- sql.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql.go b/sql.go index 281d46e..8c6d978 100644 --- a/sql.go +++ b/sql.go @@ -58,8 +58,9 @@ func initDB() { failOnError(err, "initDB : create table code_obj_sub_type") _, err = db.Exec(`CREATE TABLE obj ( - id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT - ,obj_type_id SMALLINT UNSIGNED NOT NULL + id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT + ,obj_type_id SMALLINT UNSIGNED NOT NULL + ,obj_sub_type_id SMALLINT UNSIGNED NOT NULL ,PRIMARY KEY (id) ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARSET=utf8 COLLATE utf8_unicode_ci;`) failOnError(err, "initDB : create table obj")