This commit is contained in:
shoopea 2019-05-08 18:36:29 +08:00
parent 871dec71a6
commit 5bfcd2a2a3

4
sql.go
View File

@ -64,8 +64,8 @@ func initDB() {
,obj_type_id SMALLINT UNSIGNED NOT NULL ,obj_type_id SMALLINT UNSIGNED NOT NULL
,obj_sub_type_id SMALLINT UNSIGNED NOT NULL ,obj_sub_type_id SMALLINT UNSIGNED NOT NULL
,PRIMARY KEY (id) ,PRIMARY KEY (id)
,FOREIGN KEY (obj_type_id) REFERENCSE code_obj_type(id) ON DELETE CASCADE ,FOREIGN KEY (obj_type_id) REFERENCES code_obj_type(id) ON DELETE CASCADE
,FOREIGN KEY (obj_sub_type_id) REFERENCSE code_obj_sub_type(id) ON DELETE CASCADE ,FOREIGN KEY (obj_sub_type_id) REFERENCES code_obj_sub_type(id) ON DELETE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`) ) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`)
failOnError(err, "initDB : create table obj") failOnError(err, "initDB : create table obj")