This commit is contained in:
shoopea 2019-06-10 18:45:33 +08:00
parent 4476d9247b
commit ca41b506e7

6
sql.go
View File

@ -182,6 +182,12 @@ func initDB() {
,status VARCHAR(32) ,status VARCHAR(32)
,end DATETIME NOT NULL ,end DATETIME NOT NULL
,FOREIGN KEY (obj_id) REFERENCES obj(id) ON DELETE CASCADE ,FOREIGN KEY (obj_id) REFERENCES obj(id) ON DELETE CASCADE
,FOREIGN KEY (seller_id) REFERENCES obj_user(obj_id) ON DELETE CASCADE
,FOREIGN KEY (buyer_id) REFERENCES obj_user(obj_id) ON DELETE CASCADE
,FOREIGN KEY (seller_guild_id) REFERENCES obj_guild(obj_id) ON DELETE CASCADE
,FOREIGN KEY (buyer_guild_id) REFERENCES obj_guild(obj_id) ON DELETE CASCADE
,FOREIGN KEY (seller_castle_id) REFERENCES obj_castle(obj_id) ON DELETE CASCADE
,FOREIGN KEY (buyer_castle_id) REFERENCES obj_castle(obj_id) ON DELETE CASCADE
,KEY (lot_id) ,KEY (lot_id)
) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`) ) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`)
failOnError(err, "initDB : create table obj_msg_auction_announce") failOnError(err, "initDB : create table obj_msg_auction_announce")