Skip to main content

Planning Center Publishing Data Model - Complete Documentation

This document provides complete documentation of ALL tables in the Planning Center Publishing data model in Parable, including all entity tables and relationship tables with full field definitions.

Overview

The Publishing module manages your church’s media content distribution, containing:
  • 14 entity tables - Episodes, series, channels, speakers, and supporting data
  • 1 relationship table - Speakerships linking episodes to speakers
  • Comprehensive metrics - View counts, downloads, and engagement tracking

Visual Data Model

The diagram below shows the core entities and their relationships in the Publishing module. Use it as a visual reference while exploring the detailed table definitions below.

Core Entity Relationships

Publishing module data model
Open diagram in new tab →

Key Relationships Explained

Content Hierarchy:
  1. CHANNEL is the top-level podcast/media feed
  2. SERIES organizes episodes by topic or theme
  3. EPISODE is the individual sermon, message, or content piece
  4. Hierarchy: Channel → Series → Episode
Publishing Schedule:
  • CHANNEL_DEFAULT_TIME defines recurring publish schedule
  • CHANNEL_NEXT_TIME overrides next publish date/time
  • EPISODE_TIME tracks when specific episodes were/will be published
  • Supports both recurring schedules and one-off publications
Media Resources:
  • EPISODE_RESOURCE stores multiple formats per episode
  • Kinds include: audio, video, PDF notes, etc.
  • Each resource has URL and file size tracking
  • Single episode can have audio, video, and supplementary files
Speaker Management:
  • SPEAKER defines individuals who present content
  • SPEAKERSHIP links episodes to speakers (many-to-many)
  • Single episode can have multiple speakers
  • Speakers can appear in multiple episodes/series
Analytics:
  • EPISODE_STATISTIC tracks engagement metrics
  • Metrics: total plays, total downloads, time periods
  • Historical tracking with date ranges
  • Enables trend analysis and content performance review
Templates & Onboarding:
  • NOTE_TEMPLATE provides reusable sermon note formats
  • ONBOARDING tracks publishing setup completion
  • ORGANIZATION links to Planning Center organization settings
Parent-Child Relationships:
  • Times and resources use parent_id pattern
  • Episode times belong to episodes
  • Episode resources belong to episodes
  • Channel times belong to channels

Query Requirements

Schema Prefix

IMPORTANT: All tables in the Planning Center Publishing module are in the planning_center schema. You MUST prefix all table names with planning_center. in your queries. ✅ CORRECT: SELECT * FROM planning_center.publishing_episodes ❌ INCORRECT: SELECT * FROM publishing_episodes

Row Level Security (RLS)

This database uses Row Level Security (RLS) to automatically filter data based on:
  • tenant_organization_id: You only see data for your current organization
  • system_status: You only see ‘active’ records by default
DO NOT add these filters to your WHERE clause - they are applied automatically:
  • WHERE tenant_organization_id = 1 (unnecessary)
  • WHERE system_status = 'active' (unnecessary)
The RLS policies ensure you only access data you’re authorized to see, making these filters redundant and potentially causing performance issues.

Complete Table Inventory

Core Content Tables

1. publishing_episodes

Individual sermons, messages, and content pieces.

2. publishing_series

Sermon series and content collections.

3. publishing_channels

Distribution channels and platforms.

4. publishing_speakers

Speaker profiles and information.

Relationship Tables

5. publishing_speakerships

Links episodes to speakers (junction table).

Resource and Media Tables

6. publishing_episode_resources

Files and resources attached to episodes.

7. publishing_note_templates

Templates for sermon notes and outlines.

Scheduling Tables

8. publishing_episode_times

Publishing schedule for episodes on different channels.

9. publishing_channel_default_times

Default publishing schedules per channel.

10. publishing_channel_next_times

Upcoming scheduled publishes per channel.

Analytics Tables

11. publishing_episode_statistics

View counts, downloads, and engagement metrics.

12. publishing_episode_statistic_times

Statistics tracked over time periods.

Configuration Tables

13. publishing_organizations

Organization-level publishing settings.

14. publishing_channel_channel_default_episode_resources

Default resources automatically attached to episodes per channel.

Administrative Tables

15. publishing_onboardings

Tracks onboarding process for new channels.

System Fields

All tables include these system fields for data management:
  • tenant_organization_id - Multi-tenant organization identifier
  • system_status - Data lifecycle status (active, transferring, stale)
  • system_created_at - When the record was created in Parable
  • system_updated_at - When the record was last updated in Parable

Row Level Security

All tables implement Row Level Security (RLS) to ensure tenant isolation:

Data Integrity Rules

  1. Schema Qualification: Always use planning_center. prefix for all table references
  2. Row Level Security: RLS automatically handles multi-tenancy and status filtering - do not add manual filters
  3. Monetary Values: Any monetization or purchase amount columns are stored in cents - divide by 100.0 for display
  4. Media Flags: Use booleans like needs_video_url and needs_library_audio_or_video_url to identify missing assets instead of relying on system_status
  5. Direct ID Columns: Tables such as publishing_episodes, publishing_series, and publishing_speakerships expose direct IDs for performance-sensitive joins

Common Mistakes to Avoid

  1. Missing Schema Prefix
    • FROM publishing_episodes
    • FROM planning_center.publishing_episodes
  2. Adding Redundant RLS Filters
    • WHERE tenant_organization_id = 1 AND system_status = 'active'
    • ✅ Trust RLS to handle this automatically
  3. Joining Without Schema
    • JOIN publishing_series s ON ...
    • JOIN planning_center.publishing_series s ON ...
  4. Skipping Currency Conversion
    • SELECT purchase_price_cents as purchase_price
    • SELECT purchase_price_cents / 100.0 as purchase_price

Performance Considerations

  1. Indexes: All tables have optimized indexes on:
    • Primary keys and entity IDs
    • Join columns and foreign keys
    • Date columns for time-based queries
  2. Query Optimization:
    • Always use the planning_center. schema prefix
    • RLS handles tenant and status filtering automatically
    • Filter by publication state or media availability when relevant
    • Consider CTEs for aggregating view/download metrics
    • Use direct ID columns when available instead of relationship tables

Data Synchronization

Publishing data is synchronized through Temporal workflows:
  1. Master Workflow - Orchestrates all child workflows
  2. Independent Entities - Channels, Series, Speakers, Organizations
  3. Dependent Entities - Episodes (depends on channels)
  4. Related Data - Resources, times, statistics (depends on episodes)
  5. Junction Tables - Speakerships linking episodes to speakers

Usage Tips

  1. Trust RLS for active data - Skip manual system_status or tenant filters
  2. Join through IDs - Use episode_id, series_id, speaker_id
  3. Consider NULL values - Many fields are optional
  4. Use JSONB operators for nested data in art, settings fields
  5. Aggregate statistics over time periods for trends

Common Join Patterns

Episodes with Series and Speakers

Episodes with Statistics and Resources

Data Quality Notes

  • Episode published_live_at indicates published content
  • Series may have NULL ended_at for ongoing series
  • Statistics are point-in-time snapshots, use latest for current counts
  • Speakerships table enables many-to-many episode-speaker relationships
  • Channel IDs in episodes indicate primary publishing channel

This data model enables comprehensive media analytics and content management for your church’s publishing ministry.