mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-13 00:07:08 +00:00
Update down.sql
This commit is contained in:
parent
8883f776c8
commit
b7e8981d29
1 changed files with 5 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
|||
ALTER TABLE comment_like
|
||||
ALTER TABLE comment_actions
|
||||
ADD COLUMN post_id int REFERENCES post ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
UPDATE
|
||||
comment_like
|
||||
comment_actions
|
||||
SET
|
||||
post_id = (
|
||||
SELECT
|
||||
|
@ -10,8 +10,7 @@ SET
|
|||
FROM
|
||||
comment
|
||||
WHERE
|
||||
comment.id = comment_like.comment_id);
|
||||
|
||||
ALTER TABLE comment_like
|
||||
ALTER COLUMN post_id SET NOT NULL;
|
||||
comment.id = comment_actions.comment_id)
|
||||
WHERE
|
||||
liked IS NOT NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue