This commit is contained in:
shoopea 2019-05-08 21:40:25 +08:00
parent c21f11d928
commit 624e7d6a30

12
sql.go
View File

@ -142,12 +142,12 @@ func initDB() {
_, err = db.Exec(`CREATE TABLE obj_auction_announce ( _, err = db.Exec(`CREATE TABLE obj_auction_announce (
obj_id BIGINT UNSIGNED NOT NULL obj_id BIGINT UNSIGNED NOT NULL
,lot_id BIGINT UNSIGNED NOT NULL ,lot_id BIGINT UNSIGNED NOT NULL
,item VARCHAR(80) NOT NULL ,item VARCHAR(80)
,condition VARCHAR(32) NOT NULL ,condition VARCHAR(32)
,quality VARCHAR(32) NOT NULL ,quality VARCHAR(32)
,seller VARCHAR(32) NOT NULL ,seller VARCHAR(32)
,buyer VARCHAR(32) NOT NULL ,buyer VARCHAR(32)
,status VARCHAR(32) NOT NULL ,status VARCHAR(32)
,end TIMESTAMP NOT NULL ,end TIMESTAMP NOT NULL
,FOREIGN KEY (obj_id) REFERENCES obj(id) ON DELETE CASCADE ,FOREIGN KEY (obj_id) REFERENCES obj(id) ON DELETE CASCADE
,UNIQUE KEY (lot_id) ,UNIQUE KEY (lot_id)