mirror of
https://github.com/NicholaiVogel/dashore-incubator.git
synced 2026-03-30 22:38:56 +00:00
- Add parentId column to wishlist_comments for reply threading - Create wishlist_comment_votes table for up/down voting - Add deleteComment action (owner-only, cascades to replies) - Add toggleCommentVote action with toggle behavior - Update getItemWithComments to return nested CommentWithMeta - Create CommentItem component with voting UI and reply support - One level of reply depth enforced (can't reply to replies)
10 lines
369 B
SQL
10 lines
369 B
SQL
CREATE TABLE `wishlist_comment_votes` (
|
|
`id` text PRIMARY KEY NOT NULL,
|
|
`comment_id` text NOT NULL,
|
|
`user_id` text NOT NULL,
|
|
`vote_type` text NOT NULL,
|
|
`created_at` text NOT NULL,
|
|
FOREIGN KEY (`comment_id`) REFERENCES `wishlist_comments`(`id`) ON UPDATE no action ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE `wishlist_comments` ADD `parent_id` text; |