mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 05:37:48 +01:00
Every roadmap item can be marked 'I need this' or 'not for me' and commented on; anything missing can be suggested, with similar suggestions shown while typing; every changelog entry has a comment thread. No account: a random key the browser keeps. Rules (spam, one vote per browser, duplicates, honeypot) are bip-kit's; Heidi supplies a Postgres FeedbackStore (4 tables, migration 0003), the allowed ids, and rate limits. Roadmap items carry stable ids shared by de/en; changelog entries are numbered within their day from the oldest. Also: shipped items (situations, feedback) move from roadmap to changelog, and the situations notice no longer claims Idiotikon attestation, which nothing checks yet. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
31 lines
1.3 KiB
SQL
31 lines
1.3 KiB
SQL
CREATE TABLE "feedback_comments" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"target_id" text NOT NULL,
|
|
"voter" text NOT NULL,
|
|
"body" text NOT NULL,
|
|
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "feedback_stances" (
|
|
"target_id" text NOT NULL,
|
|
"voter" text NOT NULL,
|
|
"stance" text NOT NULL,
|
|
"updated_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
CONSTRAINT "feedback_stances_target_id_voter_pk" PRIMARY KEY("target_id","voter")
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "feedback_suggestions" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"body" text NOT NULL,
|
|
"created_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE "feedback_support" (
|
|
"suggestion_id" uuid NOT NULL,
|
|
"voter" text NOT NULL,
|
|
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
CONSTRAINT "feedback_support_suggestion_id_voter_pk" PRIMARY KEY("suggestion_id","voter")
|
|
);
|
|
--> statement-breakpoint
|
|
ALTER TABLE "feedback_support" ADD CONSTRAINT "feedback_support_suggestion_id_feedback_suggestions_id_fk" FOREIGN KEY ("suggestion_id") REFERENCES "public"."feedback_suggestions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
CREATE INDEX "feedback_comments_target_idx" ON "feedback_comments" USING btree ("target_id","created_at"); |