mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-27 02:46:58 -05:00
Reverted to commit 026a4e9362
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
-- Add escalation tracking fields to content_submissions table
|
||||
ALTER TABLE public.content_submissions
|
||||
ADD COLUMN IF NOT EXISTS escalated BOOLEAN DEFAULT FALSE,
|
||||
ADD COLUMN IF NOT EXISTS escalation_reason TEXT,
|
||||
ADD COLUMN IF NOT EXISTS escalated_at TIMESTAMP WITH TIME ZONE,
|
||||
ADD COLUMN IF NOT EXISTS escalated_by UUID REFERENCES auth.users(id);
|
||||
|
||||
-- Add index for escalated submissions
|
||||
CREATE INDEX IF NOT EXISTS idx_content_submissions_escalated
|
||||
ON public.content_submissions(escalated)
|
||||
WHERE escalated = TRUE;
|
||||
|
||||
-- Add index for escalated_by
|
||||
CREATE INDEX IF NOT EXISTS idx_content_submissions_escalated_by
|
||||
ON public.content_submissions(escalated_by);
|
||||
|
||||
-- Add comments for documentation
|
||||
COMMENT ON COLUMN public.content_submissions.escalated IS 'Whether this submission has been escalated to admin';
|
||||
COMMENT ON COLUMN public.content_submissions.escalation_reason IS 'Reason for escalation';
|
||||
COMMENT ON COLUMN public.content_submissions.escalated_at IS 'Timestamp when submission was escalated';
|
||||
COMMENT ON COLUMN public.content_submissions.escalated_by IS 'User who escalated the submission';
|
||||
@@ -1,15 +0,0 @@
|
||||
-- The content_submissions table already has RLS policies defined
|
||||
-- We just need to ensure RLS is enabled (it should already be enabled from previous migrations)
|
||||
-- This migration verifies RLS is enabled
|
||||
|
||||
-- Verify RLS is enabled on content_submissions
|
||||
ALTER TABLE public.content_submissions ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
-- Verify all existing RLS policies are in place
|
||||
-- (They should already exist from previous migrations, but we document them here)
|
||||
|
||||
-- Users can create submissions (already exists)
|
||||
-- Users can view their own submissions (already exists)
|
||||
-- Moderators can view all content submissions (already exists)
|
||||
-- Moderators can update content submissions (already exists)
|
||||
-- Moderators can delete content submissions (already exists)
|
||||
Reference in New Issue
Block a user