diff --git a/.github/workflows/schema-lint.yml b/.github/workflows/schema-lint.yml index eb4e3dc..740b9d1 100644 --- a/.github/workflows/schema-lint.yml +++ b/.github/workflows/schema-lint.yml @@ -154,6 +154,7 @@ jobs: -e 'http_request' \ -e 'supabase_admin' \ -e 'net\.http' \ + -e 'supabase_vault' \ isotope-complete.sql > /tmp/schema_test.sql echo "Running schema against PostgreSQL 16..." diff --git a/isotope-complete.sql b/isotope-complete.sql index 9e33eda..097e6ab 100644 --- a/isotope-complete.sql +++ b/isotope-complete.sql @@ -34,7 +34,6 @@ GRANT USAGE ON SCHEMA public TO anon, authenticated, service_role; CREATE EXTENSION IF NOT EXISTS "pg_stat_statements"; CREATE EXTENSION IF NOT EXISTS "pgcrypto"; CREATE EXTENSION IF NOT EXISTS "plpgsql"; -CREATE EXTENSION IF NOT EXISTS "supabase_vault"; CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE IF NOT EXISTS "public"."backup_manifests" ( "id" uuid not null default gen_random_uuid(), @@ -4226,7 +4225,6 @@ DROP POLICY IF EXISTS "users_update_policy" ON "public"."users"; CREATE POLICY "users_update_policy" ON "public"."users" AS PERMISSIVE FOR UPDATE USING ((auth.uid() = id)) WITH CHECK ((auth.uid() = id)); GRANT DELETE ON TABLE "public"."backup_manifests" TO anon; GRANT INSERT ON TABLE "public"."backup_manifests" TO anon; -GRANT MAINTAIN ON TABLE "public"."backup_manifests" TO anon; GRANT REFERENCES ON TABLE "public"."backup_manifests" TO anon; GRANT SELECT ON TABLE "public"."backup_manifests" TO anon; GRANT TRIGGER ON TABLE "public"."backup_manifests" TO anon; @@ -4234,7 +4232,6 @@ GRANT TRUNCATE ON TABLE "public"."backup_manifests" TO anon; GRANT UPDATE ON TABLE "public"."backup_manifests" TO anon; GRANT DELETE ON TABLE "public"."backup_manifests" TO authenticated; GRANT INSERT ON TABLE "public"."backup_manifests" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."backup_manifests" TO authenticated; GRANT REFERENCES ON TABLE "public"."backup_manifests" TO authenticated; GRANT SELECT ON TABLE "public"."backup_manifests" TO authenticated; GRANT TRIGGER ON TABLE "public"."backup_manifests" TO authenticated; @@ -4242,7 +4239,6 @@ GRANT TRUNCATE ON TABLE "public"."backup_manifests" TO authenticated; GRANT UPDATE ON TABLE "public"."backup_manifests" TO authenticated; GRANT DELETE ON TABLE "public"."backup_manifests" TO service_role; GRANT INSERT ON TABLE "public"."backup_manifests" TO service_role; -GRANT MAINTAIN ON TABLE "public"."backup_manifests" TO service_role; GRANT REFERENCES ON TABLE "public"."backup_manifests" TO service_role; GRANT SELECT ON TABLE "public"."backup_manifests" TO service_role; GRANT TRIGGER ON TABLE "public"."backup_manifests" TO service_role; @@ -4250,7 +4246,6 @@ GRANT TRUNCATE ON TABLE "public"."backup_manifests" TO service_role; GRANT UPDATE ON TABLE "public"."backup_manifests" TO service_role; GRANT DELETE ON TABLE "public"."buddy_invites" TO anon; GRANT INSERT ON TABLE "public"."buddy_invites" TO anon; -GRANT MAINTAIN ON TABLE "public"."buddy_invites" TO anon; GRANT REFERENCES ON TABLE "public"."buddy_invites" TO anon; GRANT SELECT ON TABLE "public"."buddy_invites" TO anon; GRANT TRIGGER ON TABLE "public"."buddy_invites" TO anon; @@ -4258,7 +4253,6 @@ GRANT TRUNCATE ON TABLE "public"."buddy_invites" TO anon; GRANT UPDATE ON TABLE "public"."buddy_invites" TO anon; GRANT DELETE ON TABLE "public"."buddy_invites" TO authenticated; GRANT INSERT ON TABLE "public"."buddy_invites" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."buddy_invites" TO authenticated; GRANT REFERENCES ON TABLE "public"."buddy_invites" TO authenticated; GRANT SELECT ON TABLE "public"."buddy_invites" TO authenticated; GRANT TRIGGER ON TABLE "public"."buddy_invites" TO authenticated; @@ -4266,7 +4260,6 @@ GRANT TRUNCATE ON TABLE "public"."buddy_invites" TO authenticated; GRANT UPDATE ON TABLE "public"."buddy_invites" TO authenticated; GRANT DELETE ON TABLE "public"."buddy_invites" TO service_role; GRANT INSERT ON TABLE "public"."buddy_invites" TO service_role; -GRANT MAINTAIN ON TABLE "public"."buddy_invites" TO service_role; GRANT REFERENCES ON TABLE "public"."buddy_invites" TO service_role; GRANT SELECT ON TABLE "public"."buddy_invites" TO service_role; GRANT TRIGGER ON TABLE "public"."buddy_invites" TO service_role; @@ -4274,7 +4267,6 @@ GRANT TRUNCATE ON TABLE "public"."buddy_invites" TO service_role; GRANT UPDATE ON TABLE "public"."buddy_invites" TO service_role; GRANT DELETE ON TABLE "public"."community_device_tokens" TO anon; GRANT INSERT ON TABLE "public"."community_device_tokens" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_device_tokens" TO anon; GRANT REFERENCES ON TABLE "public"."community_device_tokens" TO anon; GRANT SELECT ON TABLE "public"."community_device_tokens" TO anon; GRANT TRIGGER ON TABLE "public"."community_device_tokens" TO anon; @@ -4282,7 +4274,6 @@ GRANT TRUNCATE ON TABLE "public"."community_device_tokens" TO anon; GRANT UPDATE ON TABLE "public"."community_device_tokens" TO anon; GRANT DELETE ON TABLE "public"."community_device_tokens" TO authenticated; GRANT INSERT ON TABLE "public"."community_device_tokens" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_device_tokens" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_device_tokens" TO authenticated; GRANT SELECT ON TABLE "public"."community_device_tokens" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_device_tokens" TO authenticated; @@ -4290,7 +4281,6 @@ GRANT TRUNCATE ON TABLE "public"."community_device_tokens" TO authenticated; GRANT UPDATE ON TABLE "public"."community_device_tokens" TO authenticated; GRANT DELETE ON TABLE "public"."community_device_tokens" TO service_role; GRANT INSERT ON TABLE "public"."community_device_tokens" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_device_tokens" TO service_role; GRANT REFERENCES ON TABLE "public"."community_device_tokens" TO service_role; GRANT SELECT ON TABLE "public"."community_device_tokens" TO service_role; GRANT TRIGGER ON TABLE "public"."community_device_tokens" TO service_role; @@ -4298,7 +4288,6 @@ GRANT TRUNCATE ON TABLE "public"."community_device_tokens" TO service_role; GRANT UPDATE ON TABLE "public"."community_device_tokens" TO service_role; GRANT DELETE ON TABLE "public"."community_enrollments" TO anon; GRANT INSERT ON TABLE "public"."community_enrollments" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_enrollments" TO anon; GRANT REFERENCES ON TABLE "public"."community_enrollments" TO anon; GRANT SELECT ON TABLE "public"."community_enrollments" TO anon; GRANT TRIGGER ON TABLE "public"."community_enrollments" TO anon; @@ -4306,7 +4295,6 @@ GRANT TRUNCATE ON TABLE "public"."community_enrollments" TO anon; GRANT UPDATE ON TABLE "public"."community_enrollments" TO anon; GRANT DELETE ON TABLE "public"."community_enrollments" TO authenticated; GRANT INSERT ON TABLE "public"."community_enrollments" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_enrollments" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_enrollments" TO authenticated; GRANT SELECT ON TABLE "public"."community_enrollments" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_enrollments" TO authenticated; @@ -4314,7 +4302,6 @@ GRANT TRUNCATE ON TABLE "public"."community_enrollments" TO authenticated; GRANT UPDATE ON TABLE "public"."community_enrollments" TO authenticated; GRANT DELETE ON TABLE "public"."community_enrollments" TO service_role; GRANT INSERT ON TABLE "public"."community_enrollments" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_enrollments" TO service_role; GRANT REFERENCES ON TABLE "public"."community_enrollments" TO service_role; GRANT SELECT ON TABLE "public"."community_enrollments" TO service_role; GRANT TRIGGER ON TABLE "public"."community_enrollments" TO service_role; @@ -4322,7 +4309,6 @@ GRANT TRUNCATE ON TABLE "public"."community_enrollments" TO service_role; GRANT UPDATE ON TABLE "public"."community_enrollments" TO service_role; GRANT DELETE ON TABLE "public"."community_event_attendees" TO anon; GRANT INSERT ON TABLE "public"."community_event_attendees" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_event_attendees" TO anon; GRANT REFERENCES ON TABLE "public"."community_event_attendees" TO anon; GRANT SELECT ON TABLE "public"."community_event_attendees" TO anon; GRANT TRIGGER ON TABLE "public"."community_event_attendees" TO anon; @@ -4330,7 +4316,6 @@ GRANT TRUNCATE ON TABLE "public"."community_event_attendees" TO anon; GRANT UPDATE ON TABLE "public"."community_event_attendees" TO anon; GRANT DELETE ON TABLE "public"."community_event_attendees" TO authenticated; GRANT INSERT ON TABLE "public"."community_event_attendees" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_event_attendees" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_event_attendees" TO authenticated; GRANT SELECT ON TABLE "public"."community_event_attendees" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_event_attendees" TO authenticated; @@ -4338,7 +4323,6 @@ GRANT TRUNCATE ON TABLE "public"."community_event_attendees" TO authenticated; GRANT UPDATE ON TABLE "public"."community_event_attendees" TO authenticated; GRANT DELETE ON TABLE "public"."community_event_attendees" TO service_role; GRANT INSERT ON TABLE "public"."community_event_attendees" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_event_attendees" TO service_role; GRANT REFERENCES ON TABLE "public"."community_event_attendees" TO service_role; GRANT SELECT ON TABLE "public"."community_event_attendees" TO service_role; GRANT TRIGGER ON TABLE "public"."community_event_attendees" TO service_role; @@ -4346,7 +4330,6 @@ GRANT TRUNCATE ON TABLE "public"."community_event_attendees" TO service_role; GRANT UPDATE ON TABLE "public"."community_event_attendees" TO service_role; GRANT DELETE ON TABLE "public"."community_events" TO anon; GRANT INSERT ON TABLE "public"."community_events" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_events" TO anon; GRANT REFERENCES ON TABLE "public"."community_events" TO anon; GRANT SELECT ON TABLE "public"."community_events" TO anon; GRANT TRIGGER ON TABLE "public"."community_events" TO anon; @@ -4354,7 +4337,6 @@ GRANT TRUNCATE ON TABLE "public"."community_events" TO anon; GRANT UPDATE ON TABLE "public"."community_events" TO anon; GRANT DELETE ON TABLE "public"."community_events" TO authenticated; GRANT INSERT ON TABLE "public"."community_events" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_events" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_events" TO authenticated; GRANT SELECT ON TABLE "public"."community_events" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_events" TO authenticated; @@ -4362,7 +4344,6 @@ GRANT TRUNCATE ON TABLE "public"."community_events" TO authenticated; GRANT UPDATE ON TABLE "public"."community_events" TO authenticated; GRANT DELETE ON TABLE "public"."community_events" TO service_role; GRANT INSERT ON TABLE "public"."community_events" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_events" TO service_role; GRANT REFERENCES ON TABLE "public"."community_events" TO service_role; GRANT SELECT ON TABLE "public"."community_events" TO service_role; GRANT TRIGGER ON TABLE "public"."community_events" TO service_role; @@ -4370,7 +4351,6 @@ GRANT TRUNCATE ON TABLE "public"."community_events" TO service_role; GRANT UPDATE ON TABLE "public"."community_events" TO service_role; GRANT DELETE ON TABLE "public"."community_friends" TO anon; GRANT INSERT ON TABLE "public"."community_friends" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_friends" TO anon; GRANT REFERENCES ON TABLE "public"."community_friends" TO anon; GRANT SELECT ON TABLE "public"."community_friends" TO anon; GRANT TRIGGER ON TABLE "public"."community_friends" TO anon; @@ -4378,7 +4358,6 @@ GRANT TRUNCATE ON TABLE "public"."community_friends" TO anon; GRANT UPDATE ON TABLE "public"."community_friends" TO anon; GRANT DELETE ON TABLE "public"."community_friends" TO authenticated; GRANT INSERT ON TABLE "public"."community_friends" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_friends" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_friends" TO authenticated; GRANT SELECT ON TABLE "public"."community_friends" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_friends" TO authenticated; @@ -4386,7 +4365,6 @@ GRANT TRUNCATE ON TABLE "public"."community_friends" TO authenticated; GRANT UPDATE ON TABLE "public"."community_friends" TO authenticated; GRANT DELETE ON TABLE "public"."community_friends" TO service_role; GRANT INSERT ON TABLE "public"."community_friends" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_friends" TO service_role; GRANT REFERENCES ON TABLE "public"."community_friends" TO service_role; GRANT SELECT ON TABLE "public"."community_friends" TO service_role; GRANT TRIGGER ON TABLE "public"."community_friends" TO service_role; @@ -4394,7 +4372,6 @@ GRANT TRUNCATE ON TABLE "public"."community_friends" TO service_role; GRANT UPDATE ON TABLE "public"."community_friends" TO service_role; GRANT DELETE ON TABLE "public"."community_join_requests" TO anon; GRANT INSERT ON TABLE "public"."community_join_requests" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_join_requests" TO anon; GRANT REFERENCES ON TABLE "public"."community_join_requests" TO anon; GRANT SELECT ON TABLE "public"."community_join_requests" TO anon; GRANT TRIGGER ON TABLE "public"."community_join_requests" TO anon; @@ -4402,7 +4379,6 @@ GRANT TRUNCATE ON TABLE "public"."community_join_requests" TO anon; GRANT UPDATE ON TABLE "public"."community_join_requests" TO anon; GRANT DELETE ON TABLE "public"."community_join_requests" TO authenticated; GRANT INSERT ON TABLE "public"."community_join_requests" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_join_requests" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_join_requests" TO authenticated; GRANT SELECT ON TABLE "public"."community_join_requests" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_join_requests" TO authenticated; @@ -4410,7 +4386,6 @@ GRANT TRUNCATE ON TABLE "public"."community_join_requests" TO authenticated; GRANT UPDATE ON TABLE "public"."community_join_requests" TO authenticated; GRANT DELETE ON TABLE "public"."community_join_requests" TO service_role; GRANT INSERT ON TABLE "public"."community_join_requests" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_join_requests" TO service_role; GRANT REFERENCES ON TABLE "public"."community_join_requests" TO service_role; GRANT SELECT ON TABLE "public"."community_join_requests" TO service_role; GRANT TRIGGER ON TABLE "public"."community_join_requests" TO service_role; @@ -4418,7 +4393,6 @@ GRANT TRUNCATE ON TABLE "public"."community_join_requests" TO service_role; GRANT UPDATE ON TABLE "public"."community_join_requests" TO service_role; GRANT DELETE ON TABLE "public"."community_reports" TO anon; GRANT INSERT ON TABLE "public"."community_reports" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_reports" TO anon; GRANT REFERENCES ON TABLE "public"."community_reports" TO anon; GRANT SELECT ON TABLE "public"."community_reports" TO anon; GRANT TRIGGER ON TABLE "public"."community_reports" TO anon; @@ -4426,7 +4400,6 @@ GRANT TRUNCATE ON TABLE "public"."community_reports" TO anon; GRANT UPDATE ON TABLE "public"."community_reports" TO anon; GRANT DELETE ON TABLE "public"."community_reports" TO authenticated; GRANT INSERT ON TABLE "public"."community_reports" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_reports" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_reports" TO authenticated; GRANT SELECT ON TABLE "public"."community_reports" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_reports" TO authenticated; @@ -4434,7 +4407,6 @@ GRANT TRUNCATE ON TABLE "public"."community_reports" TO authenticated; GRANT UPDATE ON TABLE "public"."community_reports" TO authenticated; GRANT DELETE ON TABLE "public"."community_reports" TO service_role; GRANT INSERT ON TABLE "public"."community_reports" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_reports" TO service_role; GRANT REFERENCES ON TABLE "public"."community_reports" TO service_role; GRANT SELECT ON TABLE "public"."community_reports" TO service_role; GRANT TRIGGER ON TABLE "public"."community_reports" TO service_role; @@ -4442,7 +4414,6 @@ GRANT TRUNCATE ON TABLE "public"."community_reports" TO service_role; GRANT UPDATE ON TABLE "public"."community_reports" TO service_role; GRANT DELETE ON TABLE "public"."community_start_alerts" TO anon; GRANT INSERT ON TABLE "public"."community_start_alerts" TO anon; -GRANT MAINTAIN ON TABLE "public"."community_start_alerts" TO anon; GRANT REFERENCES ON TABLE "public"."community_start_alerts" TO anon; GRANT SELECT ON TABLE "public"."community_start_alerts" TO anon; GRANT TRIGGER ON TABLE "public"."community_start_alerts" TO anon; @@ -4450,7 +4421,6 @@ GRANT TRUNCATE ON TABLE "public"."community_start_alerts" TO anon; GRANT UPDATE ON TABLE "public"."community_start_alerts" TO anon; GRANT DELETE ON TABLE "public"."community_start_alerts" TO authenticated; GRANT INSERT ON TABLE "public"."community_start_alerts" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."community_start_alerts" TO authenticated; GRANT REFERENCES ON TABLE "public"."community_start_alerts" TO authenticated; GRANT SELECT ON TABLE "public"."community_start_alerts" TO authenticated; GRANT TRIGGER ON TABLE "public"."community_start_alerts" TO authenticated; @@ -4458,7 +4428,6 @@ GRANT TRUNCATE ON TABLE "public"."community_start_alerts" TO authenticated; GRANT UPDATE ON TABLE "public"."community_start_alerts" TO authenticated; GRANT DELETE ON TABLE "public"."community_start_alerts" TO service_role; GRANT INSERT ON TABLE "public"."community_start_alerts" TO service_role; -GRANT MAINTAIN ON TABLE "public"."community_start_alerts" TO service_role; GRANT REFERENCES ON TABLE "public"."community_start_alerts" TO service_role; GRANT SELECT ON TABLE "public"."community_start_alerts" TO service_role; GRANT TRIGGER ON TABLE "public"."community_start_alerts" TO service_role; @@ -4466,7 +4435,6 @@ GRANT TRUNCATE ON TABLE "public"."community_start_alerts" TO service_role; GRANT UPDATE ON TABLE "public"."community_start_alerts" TO service_role; GRANT DELETE ON TABLE "public"."daily_logs" TO anon; GRANT INSERT ON TABLE "public"."daily_logs" TO anon; -GRANT MAINTAIN ON TABLE "public"."daily_logs" TO anon; GRANT REFERENCES ON TABLE "public"."daily_logs" TO anon; GRANT SELECT ON TABLE "public"."daily_logs" TO anon; GRANT TRIGGER ON TABLE "public"."daily_logs" TO anon; @@ -4474,7 +4442,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_logs" TO anon; GRANT UPDATE ON TABLE "public"."daily_logs" TO anon; GRANT DELETE ON TABLE "public"."daily_logs" TO authenticated; GRANT INSERT ON TABLE "public"."daily_logs" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."daily_logs" TO authenticated; GRANT REFERENCES ON TABLE "public"."daily_logs" TO authenticated; GRANT SELECT ON TABLE "public"."daily_logs" TO authenticated; GRANT TRIGGER ON TABLE "public"."daily_logs" TO authenticated; @@ -4482,7 +4449,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_logs" TO authenticated; GRANT UPDATE ON TABLE "public"."daily_logs" TO authenticated; GRANT DELETE ON TABLE "public"."daily_logs" TO service_role; GRANT INSERT ON TABLE "public"."daily_logs" TO service_role; -GRANT MAINTAIN ON TABLE "public"."daily_logs" TO service_role; GRANT REFERENCES ON TABLE "public"."daily_logs" TO service_role; GRANT SELECT ON TABLE "public"."daily_logs" TO service_role; GRANT TRIGGER ON TABLE "public"."daily_logs" TO service_role; @@ -4490,7 +4456,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_logs" TO service_role; GRANT UPDATE ON TABLE "public"."daily_logs" TO service_role; GRANT DELETE ON TABLE "public"."daily_user_stats" TO anon; GRANT INSERT ON TABLE "public"."daily_user_stats" TO anon; -GRANT MAINTAIN ON TABLE "public"."daily_user_stats" TO anon; GRANT REFERENCES ON TABLE "public"."daily_user_stats" TO anon; GRANT SELECT ON TABLE "public"."daily_user_stats" TO anon; GRANT TRIGGER ON TABLE "public"."daily_user_stats" TO anon; @@ -4498,7 +4463,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_user_stats" TO anon; GRANT UPDATE ON TABLE "public"."daily_user_stats" TO anon; GRANT DELETE ON TABLE "public"."daily_user_stats" TO authenticated; GRANT INSERT ON TABLE "public"."daily_user_stats" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."daily_user_stats" TO authenticated; GRANT REFERENCES ON TABLE "public"."daily_user_stats" TO authenticated; GRANT SELECT ON TABLE "public"."daily_user_stats" TO authenticated; GRANT TRIGGER ON TABLE "public"."daily_user_stats" TO authenticated; @@ -4506,7 +4470,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_user_stats" TO authenticated; GRANT UPDATE ON TABLE "public"."daily_user_stats" TO authenticated; GRANT DELETE ON TABLE "public"."daily_user_stats" TO service_role; GRANT INSERT ON TABLE "public"."daily_user_stats" TO service_role; -GRANT MAINTAIN ON TABLE "public"."daily_user_stats" TO service_role; GRANT REFERENCES ON TABLE "public"."daily_user_stats" TO service_role; GRANT SELECT ON TABLE "public"."daily_user_stats" TO service_role; GRANT TRIGGER ON TABLE "public"."daily_user_stats" TO service_role; @@ -4514,7 +4477,6 @@ GRANT TRUNCATE ON TABLE "public"."daily_user_stats" TO service_role; GRANT UPDATE ON TABLE "public"."daily_user_stats" TO service_role; GRANT DELETE ON TABLE "public"."exams" TO anon; GRANT INSERT ON TABLE "public"."exams" TO anon; -GRANT MAINTAIN ON TABLE "public"."exams" TO anon; GRANT REFERENCES ON TABLE "public"."exams" TO anon; GRANT SELECT ON TABLE "public"."exams" TO anon; GRANT TRIGGER ON TABLE "public"."exams" TO anon; @@ -4522,7 +4484,6 @@ GRANT TRUNCATE ON TABLE "public"."exams" TO anon; GRANT UPDATE ON TABLE "public"."exams" TO anon; GRANT DELETE ON TABLE "public"."exams" TO authenticated; GRANT INSERT ON TABLE "public"."exams" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."exams" TO authenticated; GRANT REFERENCES ON TABLE "public"."exams" TO authenticated; GRANT SELECT ON TABLE "public"."exams" TO authenticated; GRANT TRIGGER ON TABLE "public"."exams" TO authenticated; @@ -4530,7 +4491,6 @@ GRANT TRUNCATE ON TABLE "public"."exams" TO authenticated; GRANT UPDATE ON TABLE "public"."exams" TO authenticated; GRANT DELETE ON TABLE "public"."exams" TO service_role; GRANT INSERT ON TABLE "public"."exams" TO service_role; -GRANT MAINTAIN ON TABLE "public"."exams" TO service_role; GRANT REFERENCES ON TABLE "public"."exams" TO service_role; GRANT SELECT ON TABLE "public"."exams" TO service_role; GRANT TRIGGER ON TABLE "public"."exams" TO service_role; @@ -4538,7 +4498,6 @@ GRANT TRUNCATE ON TABLE "public"."exams" TO service_role; GRANT UPDATE ON TABLE "public"."exams" TO service_role; GRANT DELETE ON TABLE "public"."focus_sessions" TO anon; GRANT INSERT ON TABLE "public"."focus_sessions" TO anon; -GRANT MAINTAIN ON TABLE "public"."focus_sessions" TO anon; GRANT REFERENCES ON TABLE "public"."focus_sessions" TO anon; GRANT SELECT ON TABLE "public"."focus_sessions" TO anon; GRANT TRIGGER ON TABLE "public"."focus_sessions" TO anon; @@ -4546,7 +4505,6 @@ GRANT TRUNCATE ON TABLE "public"."focus_sessions" TO anon; GRANT UPDATE ON TABLE "public"."focus_sessions" TO anon; GRANT DELETE ON TABLE "public"."focus_sessions" TO authenticated; GRANT INSERT ON TABLE "public"."focus_sessions" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."focus_sessions" TO authenticated; GRANT REFERENCES ON TABLE "public"."focus_sessions" TO authenticated; GRANT SELECT ON TABLE "public"."focus_sessions" TO authenticated; GRANT TRIGGER ON TABLE "public"."focus_sessions" TO authenticated; @@ -4554,7 +4512,6 @@ GRANT TRUNCATE ON TABLE "public"."focus_sessions" TO authenticated; GRANT UPDATE ON TABLE "public"."focus_sessions" TO authenticated; GRANT DELETE ON TABLE "public"."focus_sessions" TO service_role; GRANT INSERT ON TABLE "public"."focus_sessions" TO service_role; -GRANT MAINTAIN ON TABLE "public"."focus_sessions" TO service_role; GRANT REFERENCES ON TABLE "public"."focus_sessions" TO service_role; GRANT SELECT ON TABLE "public"."focus_sessions" TO service_role; GRANT TRIGGER ON TABLE "public"."focus_sessions" TO service_role; @@ -4562,7 +4519,6 @@ GRANT TRUNCATE ON TABLE "public"."focus_sessions" TO service_role; GRANT UPDATE ON TABLE "public"."focus_sessions" TO service_role; GRANT DELETE ON TABLE "public"."group_announcements" TO anon; GRANT INSERT ON TABLE "public"."group_announcements" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_announcements" TO anon; GRANT REFERENCES ON TABLE "public"."group_announcements" TO anon; GRANT SELECT ON TABLE "public"."group_announcements" TO anon; GRANT TRIGGER ON TABLE "public"."group_announcements" TO anon; @@ -4570,7 +4526,6 @@ GRANT TRUNCATE ON TABLE "public"."group_announcements" TO anon; GRANT UPDATE ON TABLE "public"."group_announcements" TO anon; GRANT DELETE ON TABLE "public"."group_announcements" TO authenticated; GRANT INSERT ON TABLE "public"."group_announcements" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_announcements" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_announcements" TO authenticated; GRANT SELECT ON TABLE "public"."group_announcements" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_announcements" TO authenticated; @@ -4578,7 +4533,6 @@ GRANT TRUNCATE ON TABLE "public"."group_announcements" TO authenticated; GRANT UPDATE ON TABLE "public"."group_announcements" TO authenticated; GRANT DELETE ON TABLE "public"."group_announcements" TO service_role; GRANT INSERT ON TABLE "public"."group_announcements" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_announcements" TO service_role; GRANT REFERENCES ON TABLE "public"."group_announcements" TO service_role; GRANT SELECT ON TABLE "public"."group_announcements" TO service_role; GRANT TRIGGER ON TABLE "public"."group_announcements" TO service_role; @@ -4586,7 +4540,6 @@ GRANT TRUNCATE ON TABLE "public"."group_announcements" TO service_role; GRANT UPDATE ON TABLE "public"."group_announcements" TO service_role; GRANT DELETE ON TABLE "public"."group_challenge_participants" TO anon; GRANT INSERT ON TABLE "public"."group_challenge_participants" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_challenge_participants" TO anon; GRANT REFERENCES ON TABLE "public"."group_challenge_participants" TO anon; GRANT SELECT ON TABLE "public"."group_challenge_participants" TO anon; GRANT TRIGGER ON TABLE "public"."group_challenge_participants" TO anon; @@ -4594,7 +4547,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenge_participants" TO anon; GRANT UPDATE ON TABLE "public"."group_challenge_participants" TO anon; GRANT DELETE ON TABLE "public"."group_challenge_participants" TO authenticated; GRANT INSERT ON TABLE "public"."group_challenge_participants" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_challenge_participants" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_challenge_participants" TO authenticated; GRANT SELECT ON TABLE "public"."group_challenge_participants" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_challenge_participants" TO authenticated; @@ -4602,7 +4554,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenge_participants" TO authenticated GRANT UPDATE ON TABLE "public"."group_challenge_participants" TO authenticated; GRANT DELETE ON TABLE "public"."group_challenge_participants" TO service_role; GRANT INSERT ON TABLE "public"."group_challenge_participants" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_challenge_participants" TO service_role; GRANT REFERENCES ON TABLE "public"."group_challenge_participants" TO service_role; GRANT SELECT ON TABLE "public"."group_challenge_participants" TO service_role; GRANT TRIGGER ON TABLE "public"."group_challenge_participants" TO service_role; @@ -4610,7 +4561,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenge_participants" TO service_role; GRANT UPDATE ON TABLE "public"."group_challenge_participants" TO service_role; GRANT DELETE ON TABLE "public"."group_challenges" TO anon; GRANT INSERT ON TABLE "public"."group_challenges" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_challenges" TO anon; GRANT REFERENCES ON TABLE "public"."group_challenges" TO anon; GRANT SELECT ON TABLE "public"."group_challenges" TO anon; GRANT TRIGGER ON TABLE "public"."group_challenges" TO anon; @@ -4618,7 +4568,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenges" TO anon; GRANT UPDATE ON TABLE "public"."group_challenges" TO anon; GRANT DELETE ON TABLE "public"."group_challenges" TO authenticated; GRANT INSERT ON TABLE "public"."group_challenges" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_challenges" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_challenges" TO authenticated; GRANT SELECT ON TABLE "public"."group_challenges" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_challenges" TO authenticated; @@ -4626,7 +4575,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenges" TO authenticated; GRANT UPDATE ON TABLE "public"."group_challenges" TO authenticated; GRANT DELETE ON TABLE "public"."group_challenges" TO service_role; GRANT INSERT ON TABLE "public"."group_challenges" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_challenges" TO service_role; GRANT REFERENCES ON TABLE "public"."group_challenges" TO service_role; GRANT SELECT ON TABLE "public"."group_challenges" TO service_role; GRANT TRIGGER ON TABLE "public"."group_challenges" TO service_role; @@ -4634,7 +4582,6 @@ GRANT TRUNCATE ON TABLE "public"."group_challenges" TO service_role; GRANT UPDATE ON TABLE "public"."group_challenges" TO service_role; GRANT DELETE ON TABLE "public"."group_chat_messages" TO anon; GRANT INSERT ON TABLE "public"."group_chat_messages" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_chat_messages" TO anon; GRANT REFERENCES ON TABLE "public"."group_chat_messages" TO anon; GRANT SELECT ON TABLE "public"."group_chat_messages" TO anon; GRANT TRIGGER ON TABLE "public"."group_chat_messages" TO anon; @@ -4642,7 +4589,6 @@ GRANT TRUNCATE ON TABLE "public"."group_chat_messages" TO anon; GRANT UPDATE ON TABLE "public"."group_chat_messages" TO anon; GRANT DELETE ON TABLE "public"."group_chat_messages" TO authenticated; GRANT INSERT ON TABLE "public"."group_chat_messages" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_chat_messages" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_chat_messages" TO authenticated; GRANT SELECT ON TABLE "public"."group_chat_messages" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_chat_messages" TO authenticated; @@ -4650,7 +4596,6 @@ GRANT TRUNCATE ON TABLE "public"."group_chat_messages" TO authenticated; GRANT UPDATE ON TABLE "public"."group_chat_messages" TO authenticated; GRANT DELETE ON TABLE "public"."group_chat_messages" TO service_role; GRANT INSERT ON TABLE "public"."group_chat_messages" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_chat_messages" TO service_role; GRANT REFERENCES ON TABLE "public"."group_chat_messages" TO service_role; GRANT SELECT ON TABLE "public"."group_chat_messages" TO service_role; GRANT TRIGGER ON TABLE "public"."group_chat_messages" TO service_role; @@ -4658,7 +4603,6 @@ GRANT TRUNCATE ON TABLE "public"."group_chat_messages" TO service_role; GRANT UPDATE ON TABLE "public"."group_chat_messages" TO service_role; GRANT DELETE ON TABLE "public"."group_invites" TO anon; GRANT INSERT ON TABLE "public"."group_invites" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_invites" TO anon; GRANT REFERENCES ON TABLE "public"."group_invites" TO anon; GRANT SELECT ON TABLE "public"."group_invites" TO anon; GRANT TRIGGER ON TABLE "public"."group_invites" TO anon; @@ -4666,7 +4610,6 @@ GRANT TRUNCATE ON TABLE "public"."group_invites" TO anon; GRANT UPDATE ON TABLE "public"."group_invites" TO anon; GRANT DELETE ON TABLE "public"."group_invites" TO authenticated; GRANT INSERT ON TABLE "public"."group_invites" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_invites" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_invites" TO authenticated; GRANT SELECT ON TABLE "public"."group_invites" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_invites" TO authenticated; @@ -4674,7 +4617,6 @@ GRANT TRUNCATE ON TABLE "public"."group_invites" TO authenticated; GRANT UPDATE ON TABLE "public"."group_invites" TO authenticated; GRANT DELETE ON TABLE "public"."group_invites" TO service_role; GRANT INSERT ON TABLE "public"."group_invites" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_invites" TO service_role; GRANT REFERENCES ON TABLE "public"."group_invites" TO service_role; GRANT SELECT ON TABLE "public"."group_invites" TO service_role; GRANT TRIGGER ON TABLE "public"."group_invites" TO service_role; @@ -4682,7 +4624,6 @@ GRANT TRUNCATE ON TABLE "public"."group_invites" TO service_role; GRANT UPDATE ON TABLE "public"."group_invites" TO service_role; GRANT DELETE ON TABLE "public"."group_members" TO anon; GRANT INSERT ON TABLE "public"."group_members" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_members" TO anon; GRANT REFERENCES ON TABLE "public"."group_members" TO anon; GRANT SELECT ON TABLE "public"."group_members" TO anon; GRANT TRIGGER ON TABLE "public"."group_members" TO anon; @@ -4690,7 +4631,6 @@ GRANT TRUNCATE ON TABLE "public"."group_members" TO anon; GRANT UPDATE ON TABLE "public"."group_members" TO anon; GRANT DELETE ON TABLE "public"."group_members" TO authenticated; GRANT INSERT ON TABLE "public"."group_members" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_members" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_members" TO authenticated; GRANT SELECT ON TABLE "public"."group_members" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_members" TO authenticated; @@ -4698,7 +4638,6 @@ GRANT TRUNCATE ON TABLE "public"."group_members" TO authenticated; GRANT UPDATE ON TABLE "public"."group_members" TO authenticated; GRANT DELETE ON TABLE "public"."group_members" TO service_role; GRANT INSERT ON TABLE "public"."group_members" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_members" TO service_role; GRANT REFERENCES ON TABLE "public"."group_members" TO service_role; GRANT SELECT ON TABLE "public"."group_members" TO service_role; GRANT TRIGGER ON TABLE "public"."group_members" TO service_role; @@ -4706,7 +4645,6 @@ GRANT TRUNCATE ON TABLE "public"."group_members" TO service_role; GRANT UPDATE ON TABLE "public"."group_members" TO service_role; GRANT DELETE ON TABLE "public"."group_milestones" TO anon; GRANT INSERT ON TABLE "public"."group_milestones" TO anon; -GRANT MAINTAIN ON TABLE "public"."group_milestones" TO anon; GRANT REFERENCES ON TABLE "public"."group_milestones" TO anon; GRANT SELECT ON TABLE "public"."group_milestones" TO anon; GRANT TRIGGER ON TABLE "public"."group_milestones" TO anon; @@ -4714,7 +4652,6 @@ GRANT TRUNCATE ON TABLE "public"."group_milestones" TO anon; GRANT UPDATE ON TABLE "public"."group_milestones" TO anon; GRANT DELETE ON TABLE "public"."group_milestones" TO authenticated; GRANT INSERT ON TABLE "public"."group_milestones" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."group_milestones" TO authenticated; GRANT REFERENCES ON TABLE "public"."group_milestones" TO authenticated; GRANT SELECT ON TABLE "public"."group_milestones" TO authenticated; GRANT TRIGGER ON TABLE "public"."group_milestones" TO authenticated; @@ -4722,7 +4659,6 @@ GRANT TRUNCATE ON TABLE "public"."group_milestones" TO authenticated; GRANT UPDATE ON TABLE "public"."group_milestones" TO authenticated; GRANT DELETE ON TABLE "public"."group_milestones" TO service_role; GRANT INSERT ON TABLE "public"."group_milestones" TO service_role; -GRANT MAINTAIN ON TABLE "public"."group_milestones" TO service_role; GRANT REFERENCES ON TABLE "public"."group_milestones" TO service_role; GRANT SELECT ON TABLE "public"."group_milestones" TO service_role; GRANT TRIGGER ON TABLE "public"."group_milestones" TO service_role; @@ -4730,7 +4666,6 @@ GRANT TRUNCATE ON TABLE "public"."group_milestones" TO service_role; GRANT UPDATE ON TABLE "public"."group_milestones" TO service_role; GRANT DELETE ON TABLE "public"."groups" TO anon; GRANT INSERT ON TABLE "public"."groups" TO anon; -GRANT MAINTAIN ON TABLE "public"."groups" TO anon; GRANT REFERENCES ON TABLE "public"."groups" TO anon; GRANT SELECT ON TABLE "public"."groups" TO anon; GRANT TRIGGER ON TABLE "public"."groups" TO anon; @@ -4738,7 +4673,6 @@ GRANT TRUNCATE ON TABLE "public"."groups" TO anon; GRANT UPDATE ON TABLE "public"."groups" TO anon; GRANT DELETE ON TABLE "public"."groups" TO authenticated; GRANT INSERT ON TABLE "public"."groups" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."groups" TO authenticated; GRANT REFERENCES ON TABLE "public"."groups" TO authenticated; GRANT SELECT ON TABLE "public"."groups" TO authenticated; GRANT TRIGGER ON TABLE "public"."groups" TO authenticated; @@ -4746,7 +4680,6 @@ GRANT TRUNCATE ON TABLE "public"."groups" TO authenticated; GRANT UPDATE ON TABLE "public"."groups" TO authenticated; GRANT DELETE ON TABLE "public"."groups" TO service_role; GRANT INSERT ON TABLE "public"."groups" TO service_role; -GRANT MAINTAIN ON TABLE "public"."groups" TO service_role; GRANT REFERENCES ON TABLE "public"."groups" TO service_role; GRANT SELECT ON TABLE "public"."groups" TO service_role; GRANT TRIGGER ON TABLE "public"."groups" TO service_role; @@ -4754,7 +4687,6 @@ GRANT TRUNCATE ON TABLE "public"."groups" TO service_role; GRANT UPDATE ON TABLE "public"."groups" TO service_role; GRANT DELETE ON TABLE "public"."habits" TO anon; GRANT INSERT ON TABLE "public"."habits" TO anon; -GRANT MAINTAIN ON TABLE "public"."habits" TO anon; GRANT REFERENCES ON TABLE "public"."habits" TO anon; GRANT SELECT ON TABLE "public"."habits" TO anon; GRANT TRIGGER ON TABLE "public"."habits" TO anon; @@ -4762,7 +4694,6 @@ GRANT TRUNCATE ON TABLE "public"."habits" TO anon; GRANT UPDATE ON TABLE "public"."habits" TO anon; GRANT DELETE ON TABLE "public"."habits" TO authenticated; GRANT INSERT ON TABLE "public"."habits" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."habits" TO authenticated; GRANT REFERENCES ON TABLE "public"."habits" TO authenticated; GRANT SELECT ON TABLE "public"."habits" TO authenticated; GRANT TRIGGER ON TABLE "public"."habits" TO authenticated; @@ -4770,7 +4701,6 @@ GRANT TRUNCATE ON TABLE "public"."habits" TO authenticated; GRANT UPDATE ON TABLE "public"."habits" TO authenticated; GRANT DELETE ON TABLE "public"."habits" TO service_role; GRANT INSERT ON TABLE "public"."habits" TO service_role; -GRANT MAINTAIN ON TABLE "public"."habits" TO service_role; GRANT REFERENCES ON TABLE "public"."habits" TO service_role; GRANT SELECT ON TABLE "public"."habits" TO service_role; GRANT TRIGGER ON TABLE "public"."habits" TO service_role; @@ -4778,7 +4708,6 @@ GRANT TRUNCATE ON TABLE "public"."habits" TO service_role; GRANT UPDATE ON TABLE "public"."habits" TO service_role; GRANT DELETE ON TABLE "public"."mock_tests" TO anon; GRANT INSERT ON TABLE "public"."mock_tests" TO anon; -GRANT MAINTAIN ON TABLE "public"."mock_tests" TO anon; GRANT REFERENCES ON TABLE "public"."mock_tests" TO anon; GRANT SELECT ON TABLE "public"."mock_tests" TO anon; GRANT TRIGGER ON TABLE "public"."mock_tests" TO anon; @@ -4786,7 +4715,6 @@ GRANT TRUNCATE ON TABLE "public"."mock_tests" TO anon; GRANT UPDATE ON TABLE "public"."mock_tests" TO anon; GRANT DELETE ON TABLE "public"."mock_tests" TO authenticated; GRANT INSERT ON TABLE "public"."mock_tests" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."mock_tests" TO authenticated; GRANT REFERENCES ON TABLE "public"."mock_tests" TO authenticated; GRANT SELECT ON TABLE "public"."mock_tests" TO authenticated; GRANT TRIGGER ON TABLE "public"."mock_tests" TO authenticated; @@ -4794,7 +4722,6 @@ GRANT TRUNCATE ON TABLE "public"."mock_tests" TO authenticated; GRANT UPDATE ON TABLE "public"."mock_tests" TO authenticated; GRANT DELETE ON TABLE "public"."mock_tests" TO service_role; GRANT INSERT ON TABLE "public"."mock_tests" TO service_role; -GRANT MAINTAIN ON TABLE "public"."mock_tests" TO service_role; GRANT REFERENCES ON TABLE "public"."mock_tests" TO service_role; GRANT SELECT ON TABLE "public"."mock_tests" TO service_role; GRANT TRIGGER ON TABLE "public"."mock_tests" TO service_role; @@ -4802,7 +4729,6 @@ GRANT TRUNCATE ON TABLE "public"."mock_tests" TO service_role; GRANT UPDATE ON TABLE "public"."mock_tests" TO service_role; GRANT DELETE ON TABLE "public"."notifications" TO anon; GRANT INSERT ON TABLE "public"."notifications" TO anon; -GRANT MAINTAIN ON TABLE "public"."notifications" TO anon; GRANT REFERENCES ON TABLE "public"."notifications" TO anon; GRANT SELECT ON TABLE "public"."notifications" TO anon; GRANT TRIGGER ON TABLE "public"."notifications" TO anon; @@ -4810,7 +4736,6 @@ GRANT TRUNCATE ON TABLE "public"."notifications" TO anon; GRANT UPDATE ON TABLE "public"."notifications" TO anon; GRANT DELETE ON TABLE "public"."notifications" TO authenticated; GRANT INSERT ON TABLE "public"."notifications" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."notifications" TO authenticated; GRANT REFERENCES ON TABLE "public"."notifications" TO authenticated; GRANT SELECT ON TABLE "public"."notifications" TO authenticated; GRANT TRIGGER ON TABLE "public"."notifications" TO authenticated; @@ -4818,7 +4743,6 @@ GRANT TRUNCATE ON TABLE "public"."notifications" TO authenticated; GRANT UPDATE ON TABLE "public"."notifications" TO authenticated; GRANT DELETE ON TABLE "public"."notifications" TO service_role; GRANT INSERT ON TABLE "public"."notifications" TO service_role; -GRANT MAINTAIN ON TABLE "public"."notifications" TO service_role; GRANT REFERENCES ON TABLE "public"."notifications" TO service_role; GRANT SELECT ON TABLE "public"."notifications" TO service_role; GRANT TRIGGER ON TABLE "public"."notifications" TO service_role; @@ -4826,7 +4750,6 @@ GRANT TRUNCATE ON TABLE "public"."notifications" TO service_role; GRANT UPDATE ON TABLE "public"."notifications" TO service_role; GRANT DELETE ON TABLE "public"."store_items" TO anon; GRANT INSERT ON TABLE "public"."store_items" TO anon; -GRANT MAINTAIN ON TABLE "public"."store_items" TO anon; GRANT REFERENCES ON TABLE "public"."store_items" TO anon; GRANT SELECT ON TABLE "public"."store_items" TO anon; GRANT TRIGGER ON TABLE "public"."store_items" TO anon; @@ -4834,7 +4757,6 @@ GRANT TRUNCATE ON TABLE "public"."store_items" TO anon; GRANT UPDATE ON TABLE "public"."store_items" TO anon; GRANT DELETE ON TABLE "public"."store_items" TO authenticated; GRANT INSERT ON TABLE "public"."store_items" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."store_items" TO authenticated; GRANT REFERENCES ON TABLE "public"."store_items" TO authenticated; GRANT SELECT ON TABLE "public"."store_items" TO authenticated; GRANT TRIGGER ON TABLE "public"."store_items" TO authenticated; @@ -4842,7 +4764,6 @@ GRANT TRUNCATE ON TABLE "public"."store_items" TO authenticated; GRANT UPDATE ON TABLE "public"."store_items" TO authenticated; GRANT DELETE ON TABLE "public"."store_items" TO service_role; GRANT INSERT ON TABLE "public"."store_items" TO service_role; -GRANT MAINTAIN ON TABLE "public"."store_items" TO service_role; GRANT REFERENCES ON TABLE "public"."store_items" TO service_role; GRANT SELECT ON TABLE "public"."store_items" TO service_role; GRANT TRIGGER ON TABLE "public"."store_items" TO service_role; @@ -4850,7 +4771,6 @@ GRANT TRUNCATE ON TABLE "public"."store_items" TO service_role; GRANT UPDATE ON TABLE "public"."store_items" TO service_role; GRANT DELETE ON TABLE "public"."study_sessions_log" TO anon; GRANT INSERT ON TABLE "public"."study_sessions_log" TO anon; -GRANT MAINTAIN ON TABLE "public"."study_sessions_log" TO anon; GRANT REFERENCES ON TABLE "public"."study_sessions_log" TO anon; GRANT SELECT ON TABLE "public"."study_sessions_log" TO anon; GRANT TRIGGER ON TABLE "public"."study_sessions_log" TO anon; @@ -4858,7 +4778,6 @@ GRANT TRUNCATE ON TABLE "public"."study_sessions_log" TO anon; GRANT UPDATE ON TABLE "public"."study_sessions_log" TO anon; GRANT DELETE ON TABLE "public"."study_sessions_log" TO authenticated; GRANT INSERT ON TABLE "public"."study_sessions_log" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."study_sessions_log" TO authenticated; GRANT REFERENCES ON TABLE "public"."study_sessions_log" TO authenticated; GRANT SELECT ON TABLE "public"."study_sessions_log" TO authenticated; GRANT TRIGGER ON TABLE "public"."study_sessions_log" TO authenticated; @@ -4866,7 +4785,6 @@ GRANT TRUNCATE ON TABLE "public"."study_sessions_log" TO authenticated; GRANT UPDATE ON TABLE "public"."study_sessions_log" TO authenticated; GRANT DELETE ON TABLE "public"."study_sessions_log" TO service_role; GRANT INSERT ON TABLE "public"."study_sessions_log" TO service_role; -GRANT MAINTAIN ON TABLE "public"."study_sessions_log" TO service_role; GRANT REFERENCES ON TABLE "public"."study_sessions_log" TO service_role; GRANT SELECT ON TABLE "public"."study_sessions_log" TO service_role; GRANT TRIGGER ON TABLE "public"."study_sessions_log" TO service_role; @@ -4874,7 +4792,6 @@ GRANT TRUNCATE ON TABLE "public"."study_sessions_log" TO service_role; GRANT UPDATE ON TABLE "public"."study_sessions_log" TO service_role; GRANT DELETE ON TABLE "public"."subjects" TO anon; GRANT INSERT ON TABLE "public"."subjects" TO anon; -GRANT MAINTAIN ON TABLE "public"."subjects" TO anon; GRANT REFERENCES ON TABLE "public"."subjects" TO anon; GRANT SELECT ON TABLE "public"."subjects" TO anon; GRANT TRIGGER ON TABLE "public"."subjects" TO anon; @@ -4882,7 +4799,6 @@ GRANT TRUNCATE ON TABLE "public"."subjects" TO anon; GRANT UPDATE ON TABLE "public"."subjects" TO anon; GRANT DELETE ON TABLE "public"."subjects" TO authenticated; GRANT INSERT ON TABLE "public"."subjects" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."subjects" TO authenticated; GRANT REFERENCES ON TABLE "public"."subjects" TO authenticated; GRANT SELECT ON TABLE "public"."subjects" TO authenticated; GRANT TRIGGER ON TABLE "public"."subjects" TO authenticated; @@ -4890,7 +4806,6 @@ GRANT TRUNCATE ON TABLE "public"."subjects" TO authenticated; GRANT UPDATE ON TABLE "public"."subjects" TO authenticated; GRANT DELETE ON TABLE "public"."subjects" TO service_role; GRANT INSERT ON TABLE "public"."subjects" TO service_role; -GRANT MAINTAIN ON TABLE "public"."subjects" TO service_role; GRANT REFERENCES ON TABLE "public"."subjects" TO service_role; GRANT SELECT ON TABLE "public"."subjects" TO service_role; GRANT TRIGGER ON TABLE "public"."subjects" TO service_role; @@ -4898,7 +4813,6 @@ GRANT TRUNCATE ON TABLE "public"."subjects" TO service_role; GRANT UPDATE ON TABLE "public"."subjects" TO service_role; GRANT DELETE ON TABLE "public"."sync_items" TO anon; GRANT INSERT ON TABLE "public"."sync_items" TO anon; -GRANT MAINTAIN ON TABLE "public"."sync_items" TO anon; GRANT REFERENCES ON TABLE "public"."sync_items" TO anon; GRANT SELECT ON TABLE "public"."sync_items" TO anon; GRANT TRIGGER ON TABLE "public"."sync_items" TO anon; @@ -4906,7 +4820,6 @@ GRANT TRUNCATE ON TABLE "public"."sync_items" TO anon; GRANT UPDATE ON TABLE "public"."sync_items" TO anon; GRANT DELETE ON TABLE "public"."sync_items" TO authenticated; GRANT INSERT ON TABLE "public"."sync_items" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."sync_items" TO authenticated; GRANT REFERENCES ON TABLE "public"."sync_items" TO authenticated; GRANT SELECT ON TABLE "public"."sync_items" TO authenticated; GRANT TRIGGER ON TABLE "public"."sync_items" TO authenticated; @@ -4914,7 +4827,6 @@ GRANT TRUNCATE ON TABLE "public"."sync_items" TO authenticated; GRANT UPDATE ON TABLE "public"."sync_items" TO authenticated; GRANT DELETE ON TABLE "public"."sync_items" TO service_role; GRANT INSERT ON TABLE "public"."sync_items" TO service_role; -GRANT MAINTAIN ON TABLE "public"."sync_items" TO service_role; GRANT REFERENCES ON TABLE "public"."sync_items" TO service_role; GRANT SELECT ON TABLE "public"."sync_items" TO service_role; GRANT TRIGGER ON TABLE "public"."sync_items" TO service_role; @@ -4922,7 +4834,6 @@ GRANT TRUNCATE ON TABLE "public"."sync_items" TO service_role; GRANT UPDATE ON TABLE "public"."sync_items" TO service_role; GRANT DELETE ON TABLE "public"."tasks" TO anon; GRANT INSERT ON TABLE "public"."tasks" TO anon; -GRANT MAINTAIN ON TABLE "public"."tasks" TO anon; GRANT REFERENCES ON TABLE "public"."tasks" TO anon; GRANT SELECT ON TABLE "public"."tasks" TO anon; GRANT TRIGGER ON TABLE "public"."tasks" TO anon; @@ -4930,7 +4841,6 @@ GRANT TRUNCATE ON TABLE "public"."tasks" TO anon; GRANT UPDATE ON TABLE "public"."tasks" TO anon; GRANT DELETE ON TABLE "public"."tasks" TO authenticated; GRANT INSERT ON TABLE "public"."tasks" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."tasks" TO authenticated; GRANT REFERENCES ON TABLE "public"."tasks" TO authenticated; GRANT SELECT ON TABLE "public"."tasks" TO authenticated; GRANT TRIGGER ON TABLE "public"."tasks" TO authenticated; @@ -4938,7 +4848,6 @@ GRANT TRUNCATE ON TABLE "public"."tasks" TO authenticated; GRANT UPDATE ON TABLE "public"."tasks" TO authenticated; GRANT DELETE ON TABLE "public"."tasks" TO service_role; GRANT INSERT ON TABLE "public"."tasks" TO service_role; -GRANT MAINTAIN ON TABLE "public"."tasks" TO service_role; GRANT REFERENCES ON TABLE "public"."tasks" TO service_role; GRANT SELECT ON TABLE "public"."tasks" TO service_role; GRANT TRIGGER ON TABLE "public"."tasks" TO service_role; @@ -4946,7 +4855,6 @@ GRANT TRUNCATE ON TABLE "public"."tasks" TO service_role; GRANT UPDATE ON TABLE "public"."tasks" TO service_role; GRANT DELETE ON TABLE "public"."tests" TO anon; GRANT INSERT ON TABLE "public"."tests" TO anon; -GRANT MAINTAIN ON TABLE "public"."tests" TO anon; GRANT REFERENCES ON TABLE "public"."tests" TO anon; GRANT SELECT ON TABLE "public"."tests" TO anon; GRANT TRIGGER ON TABLE "public"."tests" TO anon; @@ -4954,7 +4862,6 @@ GRANT TRUNCATE ON TABLE "public"."tests" TO anon; GRANT UPDATE ON TABLE "public"."tests" TO anon; GRANT DELETE ON TABLE "public"."tests" TO authenticated; GRANT INSERT ON TABLE "public"."tests" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."tests" TO authenticated; GRANT REFERENCES ON TABLE "public"."tests" TO authenticated; GRANT SELECT ON TABLE "public"."tests" TO authenticated; GRANT TRIGGER ON TABLE "public"."tests" TO authenticated; @@ -4962,7 +4869,6 @@ GRANT TRUNCATE ON TABLE "public"."tests" TO authenticated; GRANT UPDATE ON TABLE "public"."tests" TO authenticated; GRANT DELETE ON TABLE "public"."tests" TO service_role; GRANT INSERT ON TABLE "public"."tests" TO service_role; -GRANT MAINTAIN ON TABLE "public"."tests" TO service_role; GRANT REFERENCES ON TABLE "public"."tests" TO service_role; GRANT SELECT ON TABLE "public"."tests" TO service_role; GRANT TRIGGER ON TABLE "public"."tests" TO service_role; @@ -4970,7 +4876,6 @@ GRANT TRUNCATE ON TABLE "public"."tests" TO service_role; GRANT UPDATE ON TABLE "public"."tests" TO service_role; GRANT DELETE ON TABLE "public"."user_display_profiles" TO anon; GRANT INSERT ON TABLE "public"."user_display_profiles" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_display_profiles" TO anon; GRANT REFERENCES ON TABLE "public"."user_display_profiles" TO anon; GRANT SELECT ON TABLE "public"."user_display_profiles" TO anon; GRANT TRIGGER ON TABLE "public"."user_display_profiles" TO anon; @@ -4978,7 +4883,6 @@ GRANT TRUNCATE ON TABLE "public"."user_display_profiles" TO anon; GRANT UPDATE ON TABLE "public"."user_display_profiles" TO anon; GRANT DELETE ON TABLE "public"."user_display_profiles" TO authenticated; GRANT INSERT ON TABLE "public"."user_display_profiles" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_display_profiles" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_display_profiles" TO authenticated; GRANT SELECT ON TABLE "public"."user_display_profiles" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_display_profiles" TO authenticated; @@ -4986,7 +4890,6 @@ GRANT TRUNCATE ON TABLE "public"."user_display_profiles" TO authenticated; GRANT UPDATE ON TABLE "public"."user_display_profiles" TO authenticated; GRANT DELETE ON TABLE "public"."user_display_profiles" TO service_role; GRANT INSERT ON TABLE "public"."user_display_profiles" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_display_profiles" TO service_role; GRANT REFERENCES ON TABLE "public"."user_display_profiles" TO service_role; GRANT SELECT ON TABLE "public"."user_display_profiles" TO service_role; GRANT TRIGGER ON TABLE "public"."user_display_profiles" TO service_role; @@ -4994,7 +4897,6 @@ GRANT TRUNCATE ON TABLE "public"."user_display_profiles" TO service_role; GRANT UPDATE ON TABLE "public"."user_display_profiles" TO service_role; GRANT DELETE ON TABLE "public"."user_inventory" TO anon; GRANT INSERT ON TABLE "public"."user_inventory" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_inventory" TO anon; GRANT REFERENCES ON TABLE "public"."user_inventory" TO anon; GRANT SELECT ON TABLE "public"."user_inventory" TO anon; GRANT TRIGGER ON TABLE "public"."user_inventory" TO anon; @@ -5002,7 +4904,6 @@ GRANT TRUNCATE ON TABLE "public"."user_inventory" TO anon; GRANT UPDATE ON TABLE "public"."user_inventory" TO anon; GRANT DELETE ON TABLE "public"."user_inventory" TO authenticated; GRANT INSERT ON TABLE "public"."user_inventory" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_inventory" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_inventory" TO authenticated; GRANT SELECT ON TABLE "public"."user_inventory" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_inventory" TO authenticated; @@ -5010,7 +4911,6 @@ GRANT TRUNCATE ON TABLE "public"."user_inventory" TO authenticated; GRANT UPDATE ON TABLE "public"."user_inventory" TO authenticated; GRANT DELETE ON TABLE "public"."user_inventory" TO service_role; GRANT INSERT ON TABLE "public"."user_inventory" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_inventory" TO service_role; GRANT REFERENCES ON TABLE "public"."user_inventory" TO service_role; GRANT SELECT ON TABLE "public"."user_inventory" TO service_role; GRANT TRIGGER ON TABLE "public"."user_inventory" TO service_role; @@ -5018,7 +4918,6 @@ GRANT TRUNCATE ON TABLE "public"."user_inventory" TO service_role; GRANT UPDATE ON TABLE "public"."user_inventory" TO service_role; GRANT DELETE ON TABLE "public"."user_onboarding" TO anon; GRANT INSERT ON TABLE "public"."user_onboarding" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_onboarding" TO anon; GRANT REFERENCES ON TABLE "public"."user_onboarding" TO anon; GRANT SELECT ON TABLE "public"."user_onboarding" TO anon; GRANT TRIGGER ON TABLE "public"."user_onboarding" TO anon; @@ -5026,7 +4925,6 @@ GRANT TRUNCATE ON TABLE "public"."user_onboarding" TO anon; GRANT UPDATE ON TABLE "public"."user_onboarding" TO anon; GRANT DELETE ON TABLE "public"."user_onboarding" TO authenticated; GRANT INSERT ON TABLE "public"."user_onboarding" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_onboarding" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_onboarding" TO authenticated; GRANT SELECT ON TABLE "public"."user_onboarding" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_onboarding" TO authenticated; @@ -5034,7 +4932,6 @@ GRANT TRUNCATE ON TABLE "public"."user_onboarding" TO authenticated; GRANT UPDATE ON TABLE "public"."user_onboarding" TO authenticated; GRANT DELETE ON TABLE "public"."user_onboarding" TO service_role; GRANT INSERT ON TABLE "public"."user_onboarding" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_onboarding" TO service_role; GRANT REFERENCES ON TABLE "public"."user_onboarding" TO service_role; GRANT SELECT ON TABLE "public"."user_onboarding" TO service_role; GRANT TRIGGER ON TABLE "public"."user_onboarding" TO service_role; @@ -5042,7 +4939,6 @@ GRANT TRUNCATE ON TABLE "public"."user_onboarding" TO service_role; GRANT UPDATE ON TABLE "public"."user_onboarding" TO service_role; GRANT DELETE ON TABLE "public"."user_points" TO anon; GRANT INSERT ON TABLE "public"."user_points" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_points" TO anon; GRANT REFERENCES ON TABLE "public"."user_points" TO anon; GRANT SELECT ON TABLE "public"."user_points" TO anon; GRANT TRIGGER ON TABLE "public"."user_points" TO anon; @@ -5050,7 +4946,6 @@ GRANT TRUNCATE ON TABLE "public"."user_points" TO anon; GRANT UPDATE ON TABLE "public"."user_points" TO anon; GRANT DELETE ON TABLE "public"."user_points" TO authenticated; GRANT INSERT ON TABLE "public"."user_points" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_points" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_points" TO authenticated; GRANT SELECT ON TABLE "public"."user_points" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_points" TO authenticated; @@ -5058,7 +4953,6 @@ GRANT TRUNCATE ON TABLE "public"."user_points" TO authenticated; GRANT UPDATE ON TABLE "public"."user_points" TO authenticated; GRANT DELETE ON TABLE "public"."user_points" TO service_role; GRANT INSERT ON TABLE "public"."user_points" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_points" TO service_role; GRANT REFERENCES ON TABLE "public"."user_points" TO service_role; GRANT SELECT ON TABLE "public"."user_points" TO service_role; GRANT TRIGGER ON TABLE "public"."user_points" TO service_role; @@ -5066,7 +4960,6 @@ GRANT TRUNCATE ON TABLE "public"."user_points" TO service_role; GRANT UPDATE ON TABLE "public"."user_points" TO service_role; GRANT DELETE ON TABLE "public"."user_presence" TO anon; GRANT INSERT ON TABLE "public"."user_presence" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_presence" TO anon; GRANT REFERENCES ON TABLE "public"."user_presence" TO anon; GRANT SELECT ON TABLE "public"."user_presence" TO anon; GRANT TRIGGER ON TABLE "public"."user_presence" TO anon; @@ -5074,7 +4967,6 @@ GRANT TRUNCATE ON TABLE "public"."user_presence" TO anon; GRANT UPDATE ON TABLE "public"."user_presence" TO anon; GRANT DELETE ON TABLE "public"."user_presence" TO authenticated; GRANT INSERT ON TABLE "public"."user_presence" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_presence" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_presence" TO authenticated; GRANT SELECT ON TABLE "public"."user_presence" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_presence" TO authenticated; @@ -5082,7 +4974,6 @@ GRANT TRUNCATE ON TABLE "public"."user_presence" TO authenticated; GRANT UPDATE ON TABLE "public"."user_presence" TO authenticated; GRANT DELETE ON TABLE "public"."user_presence" TO service_role; GRANT INSERT ON TABLE "public"."user_presence" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_presence" TO service_role; GRANT REFERENCES ON TABLE "public"."user_presence" TO service_role; GRANT SELECT ON TABLE "public"."user_presence" TO service_role; GRANT TRIGGER ON TABLE "public"."user_presence" TO service_role; @@ -5090,7 +4981,6 @@ GRANT TRUNCATE ON TABLE "public"."user_presence" TO service_role; GRANT UPDATE ON TABLE "public"."user_presence" TO service_role; GRANT DELETE ON TABLE "public"."user_profiles" TO anon; GRANT INSERT ON TABLE "public"."user_profiles" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_profiles" TO anon; GRANT REFERENCES ON TABLE "public"."user_profiles" TO anon; GRANT SELECT ON TABLE "public"."user_profiles" TO anon; GRANT TRIGGER ON TABLE "public"."user_profiles" TO anon; @@ -5098,7 +4988,6 @@ GRANT TRUNCATE ON TABLE "public"."user_profiles" TO anon; GRANT UPDATE ON TABLE "public"."user_profiles" TO anon; GRANT DELETE ON TABLE "public"."user_profiles" TO authenticated; GRANT INSERT ON TABLE "public"."user_profiles" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_profiles" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_profiles" TO authenticated; GRANT SELECT ON TABLE "public"."user_profiles" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_profiles" TO authenticated; @@ -5106,7 +4995,6 @@ GRANT TRUNCATE ON TABLE "public"."user_profiles" TO authenticated; GRANT UPDATE ON TABLE "public"."user_profiles" TO authenticated; GRANT DELETE ON TABLE "public"."user_profiles" TO service_role; GRANT INSERT ON TABLE "public"."user_profiles" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_profiles" TO service_role; GRANT REFERENCES ON TABLE "public"."user_profiles" TO service_role; GRANT SELECT ON TABLE "public"."user_profiles" TO service_role; GRANT TRIGGER ON TABLE "public"."user_profiles" TO service_role; @@ -5114,7 +5002,6 @@ GRANT TRUNCATE ON TABLE "public"."user_profiles" TO service_role; GRANT UPDATE ON TABLE "public"."user_profiles" TO service_role; GRANT DELETE ON TABLE "public"."user_roles" TO anon; GRANT INSERT ON TABLE "public"."user_roles" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_roles" TO anon; GRANT REFERENCES ON TABLE "public"."user_roles" TO anon; GRANT SELECT ON TABLE "public"."user_roles" TO anon; GRANT TRIGGER ON TABLE "public"."user_roles" TO anon; @@ -5122,7 +5009,6 @@ GRANT TRUNCATE ON TABLE "public"."user_roles" TO anon; GRANT UPDATE ON TABLE "public"."user_roles" TO anon; GRANT DELETE ON TABLE "public"."user_roles" TO authenticated; GRANT INSERT ON TABLE "public"."user_roles" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_roles" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_roles" TO authenticated; GRANT SELECT ON TABLE "public"."user_roles" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_roles" TO authenticated; @@ -5130,7 +5016,6 @@ GRANT TRUNCATE ON TABLE "public"."user_roles" TO authenticated; GRANT UPDATE ON TABLE "public"."user_roles" TO authenticated; GRANT DELETE ON TABLE "public"."user_roles" TO service_role; GRANT INSERT ON TABLE "public"."user_roles" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_roles" TO service_role; GRANT REFERENCES ON TABLE "public"."user_roles" TO service_role; GRANT SELECT ON TABLE "public"."user_roles" TO service_role; GRANT TRIGGER ON TABLE "public"."user_roles" TO service_role; @@ -5138,7 +5023,6 @@ GRANT TRUNCATE ON TABLE "public"."user_roles" TO service_role; GRANT UPDATE ON TABLE "public"."user_roles" TO service_role; GRANT DELETE ON TABLE "public"."user_settings" TO anon; GRANT INSERT ON TABLE "public"."user_settings" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_settings" TO anon; GRANT REFERENCES ON TABLE "public"."user_settings" TO anon; GRANT SELECT ON TABLE "public"."user_settings" TO anon; GRANT TRIGGER ON TABLE "public"."user_settings" TO anon; @@ -5146,7 +5030,6 @@ GRANT TRUNCATE ON TABLE "public"."user_settings" TO anon; GRANT UPDATE ON TABLE "public"."user_settings" TO anon; GRANT DELETE ON TABLE "public"."user_settings" TO authenticated; GRANT INSERT ON TABLE "public"."user_settings" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_settings" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_settings" TO authenticated; GRANT SELECT ON TABLE "public"."user_settings" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_settings" TO authenticated; @@ -5154,7 +5037,6 @@ GRANT TRUNCATE ON TABLE "public"."user_settings" TO authenticated; GRANT UPDATE ON TABLE "public"."user_settings" TO authenticated; GRANT DELETE ON TABLE "public"."user_settings" TO service_role; GRANT INSERT ON TABLE "public"."user_settings" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_settings" TO service_role; GRANT REFERENCES ON TABLE "public"."user_settings" TO service_role; GRANT SELECT ON TABLE "public"."user_settings" TO service_role; GRANT TRIGGER ON TABLE "public"."user_settings" TO service_role; @@ -5162,7 +5044,6 @@ GRANT TRUNCATE ON TABLE "public"."user_settings" TO service_role; GRANT UPDATE ON TABLE "public"."user_settings" TO service_role; GRANT DELETE ON TABLE "public"."user_stats_summary" TO anon; GRANT INSERT ON TABLE "public"."user_stats_summary" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_stats_summary" TO anon; GRANT REFERENCES ON TABLE "public"."user_stats_summary" TO anon; GRANT SELECT ON TABLE "public"."user_stats_summary" TO anon; GRANT TRIGGER ON TABLE "public"."user_stats_summary" TO anon; @@ -5170,7 +5051,6 @@ GRANT TRUNCATE ON TABLE "public"."user_stats_summary" TO anon; GRANT UPDATE ON TABLE "public"."user_stats_summary" TO anon; GRANT DELETE ON TABLE "public"."user_stats_summary" TO authenticated; GRANT INSERT ON TABLE "public"."user_stats_summary" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_stats_summary" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_stats_summary" TO authenticated; GRANT SELECT ON TABLE "public"."user_stats_summary" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_stats_summary" TO authenticated; @@ -5178,7 +5058,6 @@ GRANT TRUNCATE ON TABLE "public"."user_stats_summary" TO authenticated; GRANT UPDATE ON TABLE "public"."user_stats_summary" TO authenticated; GRANT DELETE ON TABLE "public"."user_stats_summary" TO service_role; GRANT INSERT ON TABLE "public"."user_stats_summary" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_stats_summary" TO service_role; GRANT REFERENCES ON TABLE "public"."user_stats_summary" TO service_role; GRANT SELECT ON TABLE "public"."user_stats_summary" TO service_role; GRANT TRIGGER ON TABLE "public"."user_stats_summary" TO service_role; @@ -5186,7 +5065,6 @@ GRANT TRUNCATE ON TABLE "public"."user_stats_summary" TO service_role; GRANT UPDATE ON TABLE "public"."user_stats_summary" TO service_role; GRANT DELETE ON TABLE "public"."user_tours" TO anon; GRANT INSERT ON TABLE "public"."user_tours" TO anon; -GRANT MAINTAIN ON TABLE "public"."user_tours" TO anon; GRANT REFERENCES ON TABLE "public"."user_tours" TO anon; GRANT SELECT ON TABLE "public"."user_tours" TO anon; GRANT TRIGGER ON TABLE "public"."user_tours" TO anon; @@ -5194,7 +5072,6 @@ GRANT TRUNCATE ON TABLE "public"."user_tours" TO anon; GRANT UPDATE ON TABLE "public"."user_tours" TO anon; GRANT DELETE ON TABLE "public"."user_tours" TO authenticated; GRANT INSERT ON TABLE "public"."user_tours" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."user_tours" TO authenticated; GRANT REFERENCES ON TABLE "public"."user_tours" TO authenticated; GRANT SELECT ON TABLE "public"."user_tours" TO authenticated; GRANT TRIGGER ON TABLE "public"."user_tours" TO authenticated; @@ -5202,7 +5079,6 @@ GRANT TRUNCATE ON TABLE "public"."user_tours" TO authenticated; GRANT UPDATE ON TABLE "public"."user_tours" TO authenticated; GRANT DELETE ON TABLE "public"."user_tours" TO service_role; GRANT INSERT ON TABLE "public"."user_tours" TO service_role; -GRANT MAINTAIN ON TABLE "public"."user_tours" TO service_role; GRANT REFERENCES ON TABLE "public"."user_tours" TO service_role; GRANT SELECT ON TABLE "public"."user_tours" TO service_role; GRANT TRIGGER ON TABLE "public"."user_tours" TO service_role; @@ -5210,7 +5086,6 @@ GRANT TRUNCATE ON TABLE "public"."user_tours" TO service_role; GRANT UPDATE ON TABLE "public"."user_tours" TO service_role; GRANT DELETE ON TABLE "public"."users" TO anon; GRANT INSERT ON TABLE "public"."users" TO anon; -GRANT MAINTAIN ON TABLE "public"."users" TO anon; GRANT REFERENCES ON TABLE "public"."users" TO anon; GRANT SELECT ON TABLE "public"."users" TO anon; GRANT TRIGGER ON TABLE "public"."users" TO anon; @@ -5218,7 +5093,6 @@ GRANT TRUNCATE ON TABLE "public"."users" TO anon; GRANT UPDATE ON TABLE "public"."users" TO anon; GRANT DELETE ON TABLE "public"."users" TO authenticated; GRANT INSERT ON TABLE "public"."users" TO authenticated; -GRANT MAINTAIN ON TABLE "public"."users" TO authenticated; GRANT REFERENCES ON TABLE "public"."users" TO authenticated; GRANT SELECT ON TABLE "public"."users" TO authenticated; GRANT TRIGGER ON TABLE "public"."users" TO authenticated; @@ -5226,7 +5100,6 @@ GRANT TRUNCATE ON TABLE "public"."users" TO authenticated; GRANT UPDATE ON TABLE "public"."users" TO authenticated; GRANT DELETE ON TABLE "public"."users" TO service_role; GRANT INSERT ON TABLE "public"."users" TO service_role; -GRANT MAINTAIN ON TABLE "public"."users" TO service_role; GRANT REFERENCES ON TABLE "public"."users" TO service_role; GRANT SELECT ON TABLE "public"."users" TO service_role; GRANT TRIGGER ON TABLE "public"."users" TO service_role; diff --git a/scripts/schema-dump.mjs b/scripts/schema-dump.mjs index 620278c..7216857 100644 --- a/scripts/schema-dump.mjs +++ b/scripts/schema-dump.mjs @@ -90,8 +90,21 @@ add(`GRANT USAGE ON SCHEMA public TO anon, authenticated, service_role;`); add(''); // 1. extensions +// Supabase-managed extensions only exist on the hosted platform: a fresh install +// on stock Postgres (and the schema-lint CI shim, which runs the plain postgres +// image) cannot `CREATE EXTENSION` them, and nothing this schema creates +// references their objects. Emitting them makes the dump abort on the first one +// under `psql -v ON_ERROR_STOP=1`. Skip them so the dump stays portable; the +// hosted project already has them installed. +const PLATFORM_ONLY_EXTENSIONS = new Set([ + 'supabase_vault', 'pg_graphql', 'pgsodium', 'pg_net', + 'pgjwt', 'wrappers', 'pg_jsonschema', 'supabase_functions', +]); rows = await query("select extname from pg_extension order by extname;"); -for (const r of rows) { add(`CREATE EXTENSION IF NOT EXISTS ${quoteIdent(r.extname)};`); counts.extensions++; } +for (const r of rows) { + if (PLATFORM_ONLY_EXTENSIONS.has(r.extname)) continue; + add(`CREATE EXTENSION IF NOT EXISTS ${quoteIdent(r.extname)};`); counts.extensions++; +} add(''); // 2. enum/domain types (all user schemas) @@ -409,6 +422,12 @@ for (const s of SCHEMAS) { join pg_namespace n on n.oid = c.relnamespace and n.nspname = '${s.replace(/'/g, "''")}' cross join lateral aclexplode(c.relacl) g where c.relkind in ('r','S','v','m') and g.grantee::regrole::text in ('anon','authenticated','service_role') + -- MAINTAIN is a Postgres 17 privilege. The hosted project runs PG17, so it + -- appears in relacl, but a fresh install on PG16 (and the PG16 CI shim) + -- rejects GRANT MAINTAIN with "unrecognized privilege type". It is + -- meaningless for these API roles anyway (RLS governs access), so drop it and + -- keep the dump installable on PG16+. + and g.privilege_type <> 'MAINTAIN' -- Do not emit grants for extension-owned relations we no longer create. and not exists ( select 1 from pg_depend d