mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
fix: enable RLS policies for workflow_mutations table
Enable Row-Level Security and add policies: - Allow anonymous (anon) inserts for telemetry data collection - Allow authenticated reads for data analysis and querying These policies are required for the telemetry system to function correctly with Supabase, as the MCP server uses the anon key to insert mutation data. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en
This commit is contained in:
@@ -147,19 +147,19 @@ COMMENT ON COLUMN workflow_mutations.operations IS
|
||||
COMMENT ON COLUMN workflow_mutations.validation_improved IS
|
||||
'Whether the mutation reduced validation errors (NULL if validation data unavailable)';
|
||||
|
||||
-- Row-level security (optional - uncomment if using Supabase auth)
|
||||
-- ALTER TABLE workflow_mutations ENABLE ROW LEVEL SECURITY;
|
||||
-- Row-level security
|
||||
ALTER TABLE workflow_mutations ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
-- Create policy for anonymous inserts (required for telemetry)
|
||||
-- CREATE POLICY "Allow anonymous inserts"
|
||||
-- ON workflow_mutations
|
||||
-- FOR INSERT
|
||||
-- TO anon
|
||||
-- WITH CHECK (true);
|
||||
CREATE POLICY "Allow anonymous inserts"
|
||||
ON workflow_mutations
|
||||
FOR INSERT
|
||||
TO anon
|
||||
WITH CHECK (true);
|
||||
|
||||
-- Create policy for authenticated reads (for analysis)
|
||||
-- CREATE POLICY "Allow authenticated reads"
|
||||
-- ON workflow_mutations
|
||||
-- FOR SELECT
|
||||
-- TO authenticated
|
||||
-- USING (true);
|
||||
CREATE POLICY "Allow authenticated reads"
|
||||
ON workflow_mutations
|
||||
FOR SELECT
|
||||
TO authenticated
|
||||
USING (true);
|
||||
|
||||
Reference in New Issue
Block a user