mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 13:51:19 +00:00
16 lines
230 B
MySQL
16 lines
230 B
MySQL
|
ALTER TABLE comment_like
|
||
|
ADD COLUMN post_id int;
|
||
|
|
||
|
UPDATE
|
||
|
comment_like
|
||
|
SET
|
||
|
post_id = comment.post_id
|
||
|
FROM
|
||
|
comment
|
||
|
WHERE
|
||
|
comment_id = comment.id;
|
||
|
|
||
|
ALTER TABLE comment_like
|
||
|
ALTER COLUMN post_id SET NOT NULL;
|
||
|
|