mirror of
https://codeberg.org/likwid/likwid.git
synced 2026-02-10 05:23:09 +00:00
- Backend: Rust/Axum with PostgreSQL, plugin architecture - Frontend: Astro with polished UI - Voting methods: Approval, Ranked Choice, Schulze, STAR, Quadratic - Features: Liquid delegation, transparent moderation, structured deliberation - Documentation: User and admin guides in /docs - Deployment: Docker/Podman compose files for production and demo - Demo: Seeded data with 3 communities, 13 users, 7 proposals License: AGPLv3
16 lines
672 B
SQL
16 lines
672 B
SQL
-- Comments table for proposal discussions
|
|
CREATE TABLE comments (
|
|
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
proposal_id UUID NOT NULL REFERENCES proposals(id) ON DELETE CASCADE,
|
|
author_id UUID NOT NULL REFERENCES users(id),
|
|
content TEXT NOT NULL,
|
|
parent_id UUID REFERENCES comments(id) ON DELETE CASCADE,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX idx_comments_proposal ON comments(proposal_id);
|
|
CREATE INDEX idx_comments_parent ON comments(parent_id);
|
|
|
|
CREATE TRIGGER comments_updated_at BEFORE UPDATE ON comments
|
|
FOR EACH ROW EXECUTE FUNCTION update_updated_at();
|