-- RLS for 002_enrichment_schema tables (after migration 002).

ALTER TABLE campaign_settings ENABLE ROW LEVEL SECURITY;
ALTER TABLE campaign_enriched_emails ENABLE ROW LEVEL SECURITY;
ALTER TABLE inbox_messages ENABLE ROW LEVEL SECURITY;

DROP POLICY IF EXISTS campaign_settings_auth_all ON campaign_settings;
DROP POLICY IF EXISTS campaign_enriched_emails_auth_all ON campaign_enriched_emails;
DROP POLICY IF EXISTS inbox_messages_auth_all ON inbox_messages;

CREATE POLICY campaign_settings_auth_all ON campaign_settings
  FOR ALL TO authenticated USING (true) WITH CHECK (true);
CREATE POLICY campaign_enriched_emails_auth_all ON campaign_enriched_emails
  FOR ALL TO authenticated USING (true) WITH CHECK (true);
CREATE POLICY inbox_messages_auth_all ON inbox_messages
  FOR ALL TO authenticated USING (true) WITH CHECK (true);
