Knowledge > Runbooks > Customer Ops > Update Church Info
Update Church Information
Correct or update a church's data in the churches table (name, address, phone, website, service times, etc.).
Prerequisites
- Supabase access
- Explicit request from the church admin, or a verified data correction reason
- For bulk updates: explicit founder approval
CRITICAL Safety Rules
- Never bulk-update the
churchestable without founder approval. The table has 261K rows and a bad WHERE clause can destroy the directory. - Never DELETE a church row. Use
directory_visible=falseto hide (see remove-church.md). - Always use a WHERE clause with the church UUID — never update by name alone (names can have duplicates).
- This is production data. Test your query with a
SELECTfirst.
Steps
1. Identify the church UUID
SELECT id, name, slug, email, city, state
FROM churches
WHERE slug = '[church-slug]'
OR email ILIKE '%[email-fragment]%'
OR name ILIKE '%[church-name]%'
LIMIT 5;
Copy the id (UUID). This is what you will use in all update queries.
2. Preview the current data
SELECT id, name, address, city, state, zip, phone, website,
service_times, denomination, directory_visible
FROM churches
WHERE id = '[church-uuid]';
Confirm you have the right church before changing anything.
3. Run a SELECT to test your WHERE clause
Before running any UPDATE:
-- Test: does this WHERE clause return exactly the right church?
SELECT id, name FROM churches WHERE id = '[church-uuid]';
It must return exactly one row.
4. Update the specific fields
Run the targeted UPDATE:
UPDATE churches
SET
name = 'Grace Community Church', -- example
phone = '555-123-4567',
website = 'https://gracecommunity.org',
updated_at = now()
WHERE id = '[church-uuid]';
Only include the fields that are actually changing. Do not set fields you are not updating.
5. Verify the update
SELECT id, name, phone, website, updated_at
FROM churches
WHERE id = '[church-uuid]';
Confirm the new values appear correctly.
6. Handle ISR cache (PewSearch detail pages)
PewSearch church detail pages (/churches/[slug]) use Incremental Static Regeneration with a ~1-hour cache. After updating a church, the live page may show the old data for up to an hour. This is expected behavior — no action needed unless the church asks urgently, in which case:
Option 1: Wait for cache to expire naturally (up to 60 minutes).
Option 2: Trigger a manual revalidation if the PewSearch codebase has an on-demand revalidation endpoint:
curl -X POST "https://pewsearch.com/api/revalidate?path=/churches/[slug]&secret=[REVALIDATION_SECRET]"
Common Fields to Update
| Field | Notes |
|---|---|
name | Church display name |
address | Street address |
city, state, zip | Location fields |
phone | Church main phone |
website | Church website URL (include https://) |
email | Church contact email |
service_times | Service schedule (text or JSON depending on schema) |
denomination | Must match a value in the denominations table |
description | Short church description |
directory_visible | Set to false to hide (see remove-church.md) |
Verification
After the update, visit the live church listing on PewSearch (after cache expires) to confirm the data appears correctly. If it is a premium church with a Pro Website, also check their hosted page.
See Also
- remove-church.md — to hide a listing
- merge-duplicates.md — to merge duplicate records
- church-support-escalation.md — if this was a support request