upd
This commit is contained in:
parent
528e95fde9
commit
ddfbdc4cdf
12
sql.go
12
sql.go
@ -65,12 +65,12 @@ func initDB() {
|
||||
}
|
||||
|
||||
_, err = db.Exec(`CREATE TABLE msg (
|
||||
id BIGINT UNSIGNED NOT NULL,
|
||||
user_id BIGINT UNSIGNED NOT NULL,
|
||||
direction ENUM('incoming', 'outgoing'),
|
||||
date TIMESTAMP NOT NULL,
|
||||
text VARCHAR(4096) NOT NULL,
|
||||
FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
|
||||
id BIGINT UNSIGNED NOT NULL
|
||||
,user_id BIGINT UNSIGNED NOT NULL
|
||||
,direction ENUM('incoming', 'outgoing')
|
||||
,date TIMESTAMP NOT NULL
|
||||
,text VARCHAR(4096) NOT NULL
|
||||
-- ,FOREIGN KEY (user_id) REFERENCES user(id) ON DELETE CASCADE
|
||||
) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci;`)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
Reference in New Issue
Block a user