From ca41b506e79f014485639ff67b3ecdfcbe67f474 Mon Sep 17 00:00:00 2001 From: shoopea Date: Mon, 10 Jun 2019 18:45:33 +0800 Subject: [PATCH] test --- sql.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql.go b/sql.go index 2395de6..df6abb9 100644 --- a/sql.go +++ b/sql.go @@ -182,6 +182,12 @@ func initDB() { ,status VARCHAR(32) ,end DATETIME NOT NULL ,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) ) ENGINE = InnoDB CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;`) failOnError(err, "initDB : create table obj_msg_auction_announce")