Last active
April 25, 2026 04:28
-
-
Save judell/2ce3efae1499637c5e44728cb4e3ef22 to your computer and use it in GitHub Desktop.
Community Calendar: verify a fork's Supabase database has all required objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Verify that a fork's Supabase database has all required objects. | |
| -- Paste this into the Supabase SQL Editor and run it. | |
| -- | |
| -- Each check returns '✅ OK' or '❌ MISSING' with the fix. | |
| -- | |
| -- Auto-generated from DDL files on 2026-04-24. | |
| -- Regenerate: python scripts/generate_verify_sql.py | |
| SELECT '── TABLES ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'admin_github_users' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='admin_github_users') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/09_admin_github_users.sql' END AS status | |
| UNION ALL | |
| SELECT 'admin_google_users' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='admin_google_users') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/11_admin_google_users.sql' END AS status | |
| UNION ALL | |
| SELECT 'admin_users' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='admin_users') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/01a_admin_users.sql' END AS status | |
| UNION ALL | |
| SELECT 'category_overrides' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='category_overrides') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/13_category_overrides.sql' END AS status | |
| UNION ALL | |
| SELECT 'event_enrichments' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='event_enrichments') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/06_event_enrichments.sql' END AS status | |
| UNION ALL | |
| SELECT 'events' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='events') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'feed_tokens' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='feed_tokens') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/04_feed_tokens.sql' END AS status | |
| UNION ALL | |
| SELECT 'feeds' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='feeds') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/16_feeds.sql' END AS status | |
| UNION ALL | |
| SELECT 'picks' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='picks') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/03_picks.sql' END AS status | |
| UNION ALL | |
| SELECT 'source_names' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='source_names') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/14_source_names.sql' END AS status | |
| UNION ALL | |
| SELECT 'source_suggestions' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='source_suggestions') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/12_source_suggestions.sql' END AS status | |
| UNION ALL | |
| SELECT 'user_settings' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.tables WHERE table_schema='public' AND table_name='user_settings') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/10_user_settings.sql' END AS status | |
| UNION ALL | |
| SELECT '── KEY COLUMNS ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'events.city' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='city') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events.all_day' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='all_day') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events.source_uid' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='source_uid') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events.image_url' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='image_url') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events.category' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='category') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events.transcript' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.columns WHERE table_schema='public' AND table_name='events' AND column_name='transcript') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT '── FUNCTIONS ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'apply_category_override()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='apply_category_override') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/13_category_overrides.sql' END AS status | |
| UNION ALL | |
| SELECT 'delete_stale_events()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='delete_stale_events') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'get_curator_name()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='get_curator_name') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/13_category_overrides.sql' END AS status | |
| UNION ALL | |
| SELECT 'get_my_github_username()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='get_my_github_username') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/09_admin_github_users.sql' END AS status | |
| UNION ALL | |
| SELECT 'get_my_google_email()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='get_my_google_email') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/11_admin_google_users.sql' END AS status | |
| UNION ALL | |
| SELECT 'refresh_deduplicated_events()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='refresh_deduplicated_events') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/17_deduplicated_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'refresh_source_names()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='refresh_source_names') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/14_source_names.sql' END AS status | |
| UNION ALL | |
| SELECT 'remove_feed()' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.routines WHERE routine_schema='public' AND routine_name='remove_feed') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/16_feeds.sql' END AS status | |
| UNION ALL | |
| SELECT '── INDEXES ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'deduplicated_events_city_start_time_idx' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='deduplicated_events_city_start_time_idx') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/17_deduplicated_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'deduplicated_events_id_idx' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='deduplicated_events_id_idx') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/17_deduplicated_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events_category_idx' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='events_category_idx') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events_city_idx' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='events_city_idx') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'events_source_uid_unique' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='events_source_uid_unique') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/02_events.sql' END AS status | |
| UNION ALL | |
| SELECT 'for' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='for') THEN '✅ OK' ELSE '❌ MISSING — see supabase/migrations/20260330191500_add_city_column.sql' END AS status | |
| UNION ALL | |
| SELECT 'idx_event_enrichments_curator_id' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='idx_event_enrichments_curator_id') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/06_event_enrichments.sql' END AS status | |
| UNION ALL | |
| SELECT 'idx_event_enrichments_event_id' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_indexes WHERE schemaname='public' AND indexname='idx_event_enrichments_event_id') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/06_event_enrichments.sql' END AS status | |
| UNION ALL | |
| SELECT '── VIEWS ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'category_overrides_view' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.views WHERE table_schema='public' AND table_name='category_overrides_view') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/13_category_overrides.sql' END AS status | |
| UNION ALL | |
| SELECT 'distinct_cities' AS section, CASE WHEN EXISTS (SELECT 1 FROM information_schema.views WHERE table_schema='public' AND table_name='distinct_cities') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/07_distinct_cities.sql' END AS status | |
| UNION ALL | |
| SELECT 'deduplicated_events (matview)' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_matviews WHERE schemaname='public' AND matviewname='deduplicated_events') THEN '✅ OK' ELSE '❌ MISSING — see supabase/ddl/17_deduplicated_events.sql' END AS status | |
| UNION ALL | |
| SELECT '── EXTENSIONS ──' AS section, '' AS status | |
| UNION ALL | |
| SELECT 'pg_cron' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_extension WHERE extname='pg_cron') THEN '✅ OK' ELSE '❌ MISSING — enable in Supabase Dashboard > Database > Extensions' END AS status | |
| UNION ALL | |
| SELECT 'pg_net' AS section, CASE WHEN EXISTS (SELECT 1 FROM pg_extension WHERE extname='pg_net') THEN '✅ OK' ELSE '❌ MISSING — enable in Supabase Dashboard > Database > Extensions' END AS status; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment