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")