mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-14 00:37:07 +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;
|
ADD COLUMN post_id int REFERENCES post ON UPDATE CASCADE ON DELETE CASCADE;
|
||||||
|
|
||||||
UPDATE
|
UPDATE
|
||||||
comment_like
|
comment_actions
|
||||||
SET
|
SET
|
||||||
post_id = (
|
post_id = (
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -10,8 +10,7 @@ SET
|
||||||
FROM
|
FROM
|
||||||
comment
|
comment
|
||||||
WHERE
|
WHERE
|
||||||
comment.id = comment_like.comment_id);
|
comment.id = comment_actions.comment_id)
|
||||||
|
WHERE
|
||||||
ALTER TABLE comment_like
|
liked IS NOT NULL;
|
||||||
ALTER COLUMN post_id SET NOT NULL;
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue