lemmy/migrations/2024-10-23-091053_comment-vote-remote-postid/down.sql

16 lines
230 B
MySQL
Raw Permalink Normal View History

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;