Foreign key fix
This commit is contained in:
parent
202c820a9a
commit
70a4b46cf1
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ CREATE TABLE post_score
|
||||||
user_id INTEGER,
|
user_id INTEGER,
|
||||||
score INTEGER,
|
score INTEGER,
|
||||||
FOREIGN KEY(post_id) REFERENCES post(id) ON DELETE CASCADE ON UPDATE SET NULL,
|
FOREIGN KEY(post_id) REFERENCES post(id) ON DELETE CASCADE ON UPDATE SET NULL,
|
||||||
FOREIGN KEY(user_id) REFERENCES post(id) ON DELETE CASCADE ON UPDATE SET NULL
|
FOREIGN KEY(user_id) REFERENCES user(id) ON DELETE CASCADE ON UPDATE SET NULL
|
||||||
);
|
);
|
||||||
CREATE INDEX idx_fk_post_score_post_id ON post_score(post_id);
|
CREATE INDEX idx_fk_post_score_post_id ON post_score(post_id);
|
||||||
CREATE INDEX idx_fk_post_score_user_id ON post_score(user_id);
|
CREATE INDEX idx_fk_post_score_user_id ON post_score(user_id);
|
||||||
|
|
Loading…
Reference in a new issue