feat: implement wiki and submission management services with corresponding database schema and API endpoints
Build and Release / release (push) Successful in 2m3s
Build and Release / release (push) Successful in 2m3s
This commit is contained in:
@@ -3,6 +3,7 @@ CREATE TABLE IF NOT EXISTS wiki_content (
|
||||
wiki_id UUID NOT NULL REFERENCES wikis(id) ON DELETE CASCADE,
|
||||
title TEXT NOT NULL,
|
||||
content TEXT,
|
||||
preview TEXT,
|
||||
is_deleted BOOLEAN NOT NULL DEFAULT false,
|
||||
created_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
|
||||
+2
-2
@@ -95,9 +95,9 @@ SELECT * FROM wikis WHERE slug = ANY($1::text[]) AND is_deleted = false;
|
||||
|
||||
-- name: CreateWikiContent :one
|
||||
INSERT INTO wiki_content (
|
||||
id, wiki_id, title, content
|
||||
id, wiki_id, title, content, preview
|
||||
) VALUES (
|
||||
COALESCE(sqlc.narg('id')::uuid, uuidv7()), $1, $2, $3
|
||||
COALESCE(sqlc.narg('id')::uuid, uuidv7()), $1, $2, $3, $4
|
||||
)
|
||||
RETURNING *;
|
||||
|
||||
|
||||
@@ -112,6 +112,7 @@ CREATE TABLE IF NOT EXISTS wiki_content (
|
||||
wiki_id UUID NOT NULL REFERENCES wikis(id) ON DELETE CASCADE,
|
||||
title TEXT NOT NULL,
|
||||
content TEXT,
|
||||
preview TEXT,
|
||||
is_deleted BOOLEAN NOT NULL DEFAULT false,
|
||||
created_at TIMESTAMPTZ DEFAULT now()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user