feat: add admin apis
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- Admin panel support. All additive — existing columns/queries are untouched,
|
||||
-- so the public API and the existing frontend keep working unchanged.
|
||||
|
||||
-- Feedback replies: an admin can write a reply that gets emailed to the
|
||||
-- submitter. reply_message holds the text, replied_at stamps when it was sent
|
||||
-- (one-way, like resolved_at). Replying also resolves the row.
|
||||
ALTER TABLE feedback
|
||||
ADD COLUMN IF NOT EXISTS reply_message TEXT,
|
||||
ADD COLUMN IF NOT EXISTS replied_at TIMESTAMPTZ;
|
||||
|
||||
-- Admin → user direct messages reuse the notifications feed. Event-driven
|
||||
-- notifications carry no free text, so add an optional body column that only
|
||||
-- the 'admin_message' kind populates (all existing kinds leave it NULL).
|
||||
ALTER TABLE notifications
|
||||
ADD COLUMN IF NOT EXISTS body TEXT;
|
||||
Reference in New Issue
Block a user