Skip to main content

Planning Center Calendar Data Model

Complete reference for Planning Center Calendar tables in Parable: events, event instances, resources, rooms, tags, and the relationships between them.

This document provides complete documentation of the Planning Center Calendar data model in Parable, including all tables, fields, and relationships.

Overview

The Calendar module contains 22 entity tables and 20 relationship tables supporting event management, resource booking, scheduling, and calendar synchronization.

Visual Data Model

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

Core Entity Relationships

Calendar module data model

Open diagram in new tab →

Key Relationships Explained

Event Hierarchy:

  • EVENT is the master event (e.g., "Sunday Service")
  • EVENT_INSTANCE is a specific occurrence (e.g., "Sunday Service on Jan 15, 2024")
  • EVENT_TIME breaks instances into periods (Setup 8am-9am, Event 9am-11am, Teardown 11am-12pm)

Resource Booking:

  • RESOURCEs are bookable items (rooms, equipment, vehicles)
  • RESOURCE_FOLDERs organize resources hierarchically
  • RESOURCE_BOOKING links resources to event instances
  • ROOM_SETUP defines different configurations for room resources

Approval Workflow:

  • EVENT_RESOURCE_REQUEST initiates booking request
  • REQUIRED_APPROVAL specifies which groups must approve
  • RESOURCE_APPROVAL_GROUP contains approvers
  • RESOURCE_QUESTION collects additional information during booking

Conflict Management:

  • CONFLICT tracks resource double-bookings
  • Links are stored via calendar_conflicts_relationships
  • Resolved when winner is selected

Cross-App Connections:

  • EVENT_CONNECTION links calendar events to other Planning Center modules
  • Connected to Services (worship plans), Groups (group events), etc.
  • Enables unified scheduling across the platform

Generic Relationship Pattern:

  • All inter-entity links are stored in dedicated *_relationships tables
  • Each relationship table holds a parent entity ID, relationship_type, and relationship_id

Query Requirements

Schema Prefix

IMPORTANT: All tables in the Planning Center Calendar module are in the planning_center schema. You MUST prefix all table names with planning_center. in your queries.

✅ CORRECT: SELECT * FROM planning_center.calendar_events ❌ INCORRECT: SELECT * FROM calendar_events

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.

Core Tables Overview

Primary Entity Tables

  • calendar_events - Master event definitions
  • calendar_event_instances - Specific occurrences of events
  • calendar_resources - Bookable resources (rooms, equipment)
  • calendar_resource_bookings - Resource reservations
  • calendar_conflicts - Scheduling conflicts
  • calendar_tags - Event categorization
  • calendar_tag_groups - Tag groupings

Supporting Entity Tables

  • calendar_attachments - File attachments for events
  • calendar_event_connections - Links to other PCO modules
  • calendar_event_resource_requests - Resource booking requests
  • calendar_event_resource_answers - Answers to booking questions
  • calendar_event_times - Time blocks within events
  • calendar_feeds - Calendar feed configurations
  • calendar_organizations - Organization settings
  • calendar_people - People associated with events
  • calendar_report_templates - Report templates
  • calendar_required_approvals - Approval requirements
  • calendar_resource_approval_groups - Approval groups
  • calendar_resource_folders - Resource organization
  • calendar_resource_questions - Booking questions
  • calendar_resource_suggestions - Suggested resources
  • calendar_room_setups - Room configurations

Relationship Tables

  • calendar_attachments_relationships - Links attachments to related entities
  • calendar_conflicts_relationships - Links conflicts to related entities
  • calendar_event_connections_relationships - Links connections to related entities
  • calendar_event_resource_answers_relationships - Links answers to related entities
  • calendar_event_times_relationships - Links event times to related entities
  • calendar_event_instances_relationships - Links instances to related entities
  • calendar_event_resource_requests_relationships - Links requests to related entities
  • calendar_events_relationships - Links events to related entities
  • calendar_feeds_relationships - Links feeds to related entities
  • calendar_people_relationships - Links people to related entities
  • calendar_required_approvals_relationships - Links required approvals to related entities
  • calendar_resource_approval_groups_relationships - Links approval groups to related entities
  • calendar_resource_folders_relationships - Links folders to related entities
  • calendar_resource_questions_relationships - Links questions to related entities
  • calendar_resource_suggestions_relationships - Links suggestions to related entities
  • calendar_resource_bookings_relationships - Links bookings to related entities
  • calendar_resources_relationships - Links resources to related entities
  • calendar_room_setups_relationships - Links room setups to related entities
  • calendar_tag_groups_relationships - Links tag groups to related entities
  • calendar_tags_relationships - Links tags to related entities

Table Definitions

calendar_events

Master event definitions containing the core event information.

ColumnTypeDescription
idUUIDInternal unique identifier
event_idVARCHAR(64)Planning Center event ID
approval_statusVARCHAR(1)'A' (Approved), 'P' (Pending), or 'R' (Rejected) — never NULL
created_atTIMESTAMPWhen event was created
descriptionTEXTFull event description
featuredBOOLEANWhether event is featured/highlighted
image_urlVARCHAR(2048)Event image URL
nameTEXTEvent name/title
percent_approvedINTEGERPercentage of approvals received
percent_rejectedINTEGERPercentage of rejections received
registration_urlVARCHAR(2048)External registration link
summaryTEXTBrief event summary
updated_atTIMESTAMPLast update time
visible_in_church_centerBOOLEANPublic visibility flag
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status: 'active', 'transferring', 'stale'
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_instances

Specific occurrences of events, handling both one-time and recurring events.

ColumnTypeDescription
idUUIDInternal unique identifier
event_instance_idVARCHAR(64)Planning Center instance ID
all_day_eventBOOLEANWhether this is an all-day event
church_center_urlVARCHAR(2048)Public URL for this instance
compact_recurrence_descriptionTEXTShort recurrence description
created_atTIMESTAMPInstance creation time
descriptionTEXTInstance description
ends_atTIMESTAMPEvent end time
image_urlVARCHAR(2048)Instance image URL
locationTEXTEvent location/venue
nameTEXTInstance name (may differ from parent event)
published_ends_atTIMESTAMPPublished end time (may differ from actual)
published_starts_atTIMESTAMPPublished start time
recurrenceTEXT'None', 'Daily', 'Weekly', 'Monthly', 'Yearly', 'CustomDates', 'YearMonth', or 'MonthDay' (never NULL)
recurrence_descriptionTEXTHuman-readable recurrence
starts_atTIMESTAMPEvent start time
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (link to parent event via calendar_event_instances_relationships with relationship_type='Event')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resources

Bookable resources including rooms, equipment, and other facilities.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_idVARCHAR(64)Planning Center resource ID
created_atTIMESTAMPResource creation time
descriptionTEXTResource description
expires_atTIMESTAMPExpiration date (for leased/rented items)
home_locationTEXTDefault storage location
image_urlVARCHAR(2048)Resource image
image_thumb_urlVARCHAR(2048)Thumbnail image
kindTEXTResource type: 'Room' or 'Resource'
nameTEXTResource name
path_nameTEXTHierarchical path (Building/Floor/Room)
quantityINTEGERAvailable quantity/capacity
serial_numberTEXTSerial number (for equipment)
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_bookings

Reservations linking resources to specific events and times.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_booking_idVARCHAR(64)Planning Center booking ID
created_atTIMESTAMPBooking creation time
ends_atTIMESTAMPBooking end time
quantityINTEGERQuantity booked
starts_atTIMESTAMPBooking start time
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (links to event, event instance, request, and resource via calendar_resource_bookings_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_conflicts

Detected scheduling conflicts between events or resources.

ColumnTypeDescription
idUUIDInternal unique identifier
conflict_idVARCHAR(64)Planning Center conflict ID
created_atTIMESTAMPWhen conflict was detected
noteTEXTConflict notes/resolution
resolved_atTIMESTAMPWhen conflict was resolved
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (conflicting bookings linked via calendar_conflicts_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_tags

Event categorization labels for organizing and filtering.

ColumnTypeDescription
idUUIDInternal unique identifier
tag_idVARCHAR(64)Planning Center tag ID
church_center_categoryBOOLEANWhether this tag represents a Church Center category
colorTEXTDisplay color for the tag
created_atTIMESTAMPTag creation time
nameTEXTTag name
positionREALDisplay order
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (link to tag group via calendar_tags_relationships with relationship_type='TagGroup')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_tag_groups

Groupings for tags to organize them by ministry, event type, etc.

ColumnTypeDescription
idUUIDInternal unique identifier
tag_group_idVARCHAR(64)Planning Center tag group ID
created_atTIMESTAMPGroup creation time
nameTEXTGroup name
requiredBOOLEANWhether a tag from this group is required on events
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_attachments

File attachments associated with events.

ColumnTypeDescription
idUUIDInternal unique identifier
attachment_idVARCHAR(64)Planning Center attachment ID
content_typeTEXTMIME type of file
created_atTIMESTAMPAttachment creation time
descriptionTEXTAttachment description
file_sizeINTEGERFile size in bytes
nameTEXTFile name
updated_atTIMESTAMPLast update time
urlTEXTDownload URL
tenant_organization_idINTEGEROrganization identifier (link to event via calendar_attachments_relationships with relationship_type='Event')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_connections

Links between calendar events and other Planning Center modules.

ColumnTypeDescription
idUUIDInternal unique identifier
event_connection_idVARCHAR(64)Planning Center connection ID
connected_to_idVARCHAR(64)ID of connected entity
connected_to_nameTEXTName of connected entity
connected_to_typeVARCHAR(50)Type of connected entity
connected_to_urlVARCHAR(2048)URL to connected entity
product_nameVARCHAR(50)PCO product (services, groups, etc.)
promotedBOOLEANWhether connection is promoted
tenant_organization_idINTEGEROrganization identifier (link to event via calendar_event_connections_relationships with relationship_type='Event')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_times

Specific time blocks within event instances (e.g., "Doors Open", "Main Service").

ColumnTypeDescription
idUUIDInternal unique identifier
event_time_idVARCHAR(64)Planning Center event time ID
ends_atTIMESTAMPTime block end
nameTEXTTime block name
starts_atTIMESTAMPTime block start
visible_on_kiosksBOOLEANShow on check-in kiosks
visible_on_widget_and_icalBOOLEANShow in public widgets/calendars
tenant_organization_idINTEGEROrganization identifier (link to event instance via calendar_event_times_relationships with relationship_type='EventInstance')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_room_setups

Predefined room configurations with layout diagrams.

ColumnTypeDescription
idUUIDInternal unique identifier
room_setup_idVARCHAR(64)Planning Center setup ID
created_atTIMESTAMPSetup creation time
descriptionTEXTSetup description
diagram_thumbnail_urlVARCHAR(2048)Diagram thumbnail
diagram_urlVARCHAR(2048)Setup diagram image
nameTEXTSetup name
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (links to containing resource and associated room setup via calendar_room_setups_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_resource_requests

Resource requests for events, tracking booking requirements.

ColumnTypeDescription
idUUIDInternal unique identifier
event_resource_request_idVARCHAR(64)Planning Center request ID
approval_sentBOOLEANWhether approval request was sent
approval_statusVARCHAR(1)Status: 'A' (Approved), 'P' (Pending), 'R' (Rejected)
created_atTIMESTAMPRequest creation time
notesTEXTRequest notes
quantityINTEGERQuantity requested
updated_atTIMESTAMPLast update time
visible_on_kiosksBOOLEANWhether request is visible on kiosks
tenant_organization_idINTEGEROrganization identifier (links to event, resource, room setup, created_by, updated_by via calendar_event_resource_requests_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_resource_answers

Answers to resource booking questions.

ColumnTypeDescription
idUUIDInternal unique identifier
event_resource_answer_idVARCHAR(64)Planning Center answer ID
answerJSONBThe answer provided (string or array of strings depending on multiple_select)
questionJSONBEmbedded question details (question, choices, kind, multiple_select, optional, position)
db_answerTEXTPlain-text representation of answer
created_atTIMESTAMPAnswer creation time
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Note: Relationships (created_by, updated_by, resource_question, event_resource_request) are stored in the calendar_event_resource_answers_relationships table.

calendar_feeds

Calendar feed configurations for importing and syncing events.

ColumnTypeDescription
idUUIDInternal unique identifier
feed_idVARCHAR(64)Planning Center feed ID
can_deleteBOOLEANWhether feed can be deleted
default_church_center_visibilityVARCHAR(50)Default visibility for imported events
deletingBOOLEANWhether feed is being deleted
feed_typeVARCHAR(50)Type of feed (ical, planning_center)
imported_atTIMESTAMPLast import time
nameTEXTFeed name
prefix_event_namesBOOLEANWhether to prefix imported event names
source_idVARCHAR(64)Source identifier
sync_campus_tagsBOOLEANWhether to sync campus tags
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_organizations

Organization-wide calendar settings.

ColumnTypeDescription
idUUIDInternal unique identifier
organization_idVARCHAR(64)Planning Center organization ID
calendar_starts_onVARCHAR(50)Which day the calendar week starts on
date_formatVARCHAR(255)Date display format
nameTEXTOrganization name
onboardingBOOLEANWhether organization is in onboarding
time_zoneVARCHAR(255)Default timezone
twenty_four_hour_timeBOOLEANUse 24-hour time format
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_people

People with calendar permissions and access.

ColumnTypeDescription
idUUIDInternal unique identifier
person_idVARCHAR(64)Planning Center person ID
avatar_urlVARCHAR(2048)Profile image URL
can_edit_peopleBOOLEANCan edit people permissions
can_edit_resourcesBOOLEANCan edit resources
can_edit_roomsBOOLEANCan edit rooms
childBOOLEANIs a child account
contact_dataJSONBContact information
created_atTIMESTAMPPerson creation time
event_permissions_typeVARCHAR(50)Event permission level
first_nameVARCHAR(255)First name
genderVARCHAR(10)Gender
has_accessBOOLEANHas calendar access
last_nameVARCHAR(255)Last name
member_of_approval_groupsBOOLEANWhether person is in any approval group
middle_nameVARCHAR(255)Middle name
nameVARCHAR(255)Full name
name_prefixVARCHAR(10)Name prefix (Mr., Dr., etc.)
name_suffixVARCHAR(10)Name suffix (Jr., III, etc.)
pending_request_countINTEGERNumber of pending approval requests
people_permissions_typeTEXTPeople permission level
permissionsINTEGERPermission bitmask
resolves_conflictsBOOLEANCan resolve booking conflicts
resources_permissions_typeTEXTResource permission level
room_permissions_typeTEXTRoom permission level
site_administratorBOOLEANIs site administrator
statusTEXTAccount status
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_report_templates

Report templates for calendar data.

ColumnTypeDescription
idUUIDInternal unique identifier
report_template_idVARCHAR(64)Planning Center template ID
bodyTEXTTemplate body/content
created_atTIMESTAMPTemplate creation time
descriptionTEXTTemplate description
titleTEXTTemplate title
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_required_approvals

Approval requirements for resource bookings.

ColumnTypeDescription
idUUIDInternal unique identifier
required_approval_idVARCHAR(64)Planning Center approval ID
tenant_organization_idINTEGEROrganization identifier (links to approval group and resource via calendar_required_approvals_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_approval_groups

Groups responsible for approving resource bookings.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_approval_group_idVARCHAR(64)Planning Center group ID
created_atTIMESTAMPGroup creation time
form_countINTEGERNumber of forms associated
nameTEXTGroup name
resource_countINTEGERNumber of resources this group approves
room_countINTEGERNumber of rooms this group approves
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_folders

Hierarchical organization of resources.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_folder_idVARCHAR(64)Planning Center folder ID
ancestryTEXTHierarchical path (parent/child/grandchild)
created_atTIMESTAMPFolder creation time
kindTEXTFolder type
nameTEXTFolder name
path_nameTEXTFull path name
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_questions

Booking questions for specific resources.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_question_idVARCHAR(64)Planning Center question ID
choicesTEXTAvailable choices (for select fields)
created_atTIMESTAMPQuestion creation time
descriptionTEXTQuestion description/help text
kindTEXTQuestion type (text, select, etc.)
multiple_selectBOOLEANAllow multiple selections
optionalBOOLEANIs answer optional
positionINTEGERDisplay order
questionTEXTQuestion text
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (link to resource via calendar_resource_questions_relationships with relationship_type='Resource')
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_suggestions

Suggested resources for room setups.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_suggestion_idVARCHAR(64)Planning Center suggestion ID
created_atTIMESTAMPSuggestion creation time
quantityINTEGERSuggested quantity
updated_atTIMESTAMPLast update time
tenant_organization_idINTEGEROrganization identifier (links to resource and room setup via calendar_resource_suggestions_relationships)
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Relationship Tables

All relationship tables share this structure: a parent entity ID, relationship_type (VARCHAR(50)), and relationship_id (VARCHAR(64)) to identify the related record, plus standard system fields.

calendar_attachments_relationships

Links attachments to related entities (events).

ColumnTypeDescription
idUUIDInternal unique identifier
attachment_idVARCHAR(64)Parent attachment ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_conflicts_relationships

Links conflicts to related entities (resource bookings).

ColumnTypeDescription
idUUIDInternal unique identifier
conflict_idVARCHAR(64)Parent conflict ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_connections_relationships

Links event connections to related entities (events).

ColumnTypeDescription
idUUIDInternal unique identifier
event_connection_idVARCHAR(64)Parent connection ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_resource_answers_relationships

Links event resource answers to related entities (created_by, updated_by, resource_question, event_resource_request).

ColumnTypeDescription
idUUIDInternal unique identifier
event_resource_answer_idVARCHAR(64)Parent answer ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • Person (created_by) - Links to calendar_people (who created the answer)
  • Person (updated_by) - Links to calendar_people (who last updated the answer)
  • ResourceQuestion - Links to calendar_resource_questions
  • EventResourceRequest - Links to calendar_event_resource_requests

calendar_event_times_relationships

Links event times to related entities (event instances).

ColumnTypeDescription
idUUIDInternal unique identifier
event_time_idVARCHAR(64)Parent event time ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_event_instances_relationships

Links event instances to event times, resource bookings, and tags.

ColumnTypeDescription
idUUIDInternal unique identifier
event_instance_idVARCHAR(64)Parent instance ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • Event - Links to calendar_events
  • EventTime - Links to calendar_event_times
  • ResourceBooking - Links to calendar_resource_bookings
  • Tag - Links to calendar_tags

calendar_event_resource_requests_relationships

Links resource requests to answers and bookings.

ColumnTypeDescription
idUUIDInternal unique identifier
event_resource_request_idVARCHAR(64)Parent request ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • ResourceBooking - Links to calendar_resource_bookings
  • EventResourceAnswer - Links to calendar_event_resource_answers

calendar_events_relationships

Links events to tags, attachments, and other related entities.

ColumnTypeDescription
idUUIDInternal unique identifier
event_idVARCHAR(64)Parent event ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • Tag - Links to calendar_tags
  • Attachment - Links to calendar_attachments
  • Owner - Links to calendar_people

calendar_feeds_relationships

Links feeds to related entities (event owners).

ColumnTypeDescription
idUUIDInternal unique identifier
feed_idVARCHAR(64)Parent feed ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_people_relationships

Links people to related entities.

ColumnTypeDescription
idUUIDInternal unique identifier
person_idVARCHAR(64)Parent person ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_required_approvals_relationships

Links required approvals to related entities (approval groups, resources).

ColumnTypeDescription
idUUIDInternal unique identifier
required_approval_idVARCHAR(64)Parent required approval ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_approval_groups_relationships

Links approval groups to related entities (people, resources).

ColumnTypeDescription
idUUIDInternal unique identifier
resource_approval_group_idVARCHAR(64)Parent approval group ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_folders_relationships

Links resource folders to related entities.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_folder_idVARCHAR(64)Parent folder ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_questions_relationships

Links resource questions to related entities (resources).

ColumnTypeDescription
idUUIDInternal unique identifier
resource_question_idVARCHAR(64)Parent question ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_suggestions_relationships

Links resource suggestions to related entities (resources, room setups).

ColumnTypeDescription
idUUIDInternal unique identifier
resource_suggestion_idVARCHAR(64)Parent suggestion ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_resource_bookings_relationships

Links resource bookings to related entities (events, instances, requests, resources).

ColumnTypeDescription
idUUIDInternal unique identifier
resource_booking_idVARCHAR(64)Parent booking ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • Event - Links to calendar_events
  • EventInstance - Links to calendar_event_instances
  • EventResourceRequest - Links to calendar_event_resource_requests
  • Resource - Links to calendar_resources

calendar_resources_relationships

Links resources to approval groups, questions, and room setups.

ColumnTypeDescription
idUUIDInternal unique identifier
resource_idVARCHAR(64)Parent resource ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

Common relationship types:

  • ResourceApprovalGroup - Links to calendar_resource_approval_groups
  • ResourceQuestion - Links to calendar_resource_questions
  • RoomSetup - Links to calendar_room_setups

calendar_room_setups_relationships

Links room setups to related entities (containing resource, associated room setup).

ColumnTypeDescription
idUUIDInternal unique identifier
room_setup_idVARCHAR(64)Parent room setup ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_tag_groups_relationships

Links tag groups to their tags (relationship_type = 'Tag'). To find the events in a tag group, join through the event's own tags in calendar_events_relationships.

ColumnTypeDescription
idUUIDInternal unique identifier
tag_group_idVARCHAR(64)Parent tag group ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

calendar_tags_relationships

Links tags to related entities (tag groups).

ColumnTypeDescription
idUUIDInternal unique identifier
tag_idVARCHAR(64)Parent tag ID
relationship_typeVARCHAR(50)Type of relationship
relationship_idVARCHAR(64)ID of related entity
tenant_organization_idINTEGEROrganization identifier
system_statusVARCHAR(50)Data status
system_created_atTIMESTAMPWhen record was created in Parable
system_updated_atTIMESTAMPWhen record was last updated in Parable

System Fields

All tables include these system fields for data management:

  • tenant_organization_id - Multi-tenant organization identifier
  • system_status - Data lifecycle status:
    • transferring - Being imported from Planning Center
    • active - Current active data
    • stale - Marked for removal
  • system_created_at - When record was created in Parable
  • system_updated_at - When record was last updated in Parable

Common Query Patterns

Getting Events with Tags

-- CORRECT: Schema prefix included, no manual RLS filters
SELECT
    e.*,
    STRING_AGG(t.name, ', ') as tags
FROM planning_center.calendar_events e
LEFT JOIN planning_center.calendar_events_relationships er
    ON e.event_id = er.event_id
    AND er.relationship_type = 'Tag'
LEFT JOIN planning_center.calendar_tags t
    ON er.relationship_id = t.tag_id
GROUP BY e.id, e.event_id;

Finding Available Resources

SELECT r.*
FROM planning_center.calendar_resources r
WHERE NOT EXISTS (
        SELECT 1
        FROM planning_center.calendar_resource_bookings rb
        JOIN planning_center.calendar_resource_bookings_relationships rbr
            ON rbr.resource_booking_id = rb.resource_booking_id AND rbr.relationship_type = 'Resource'
        WHERE rbr.relationship_id = r.resource_id
            AND rb.starts_at < (CURRENT_DATE + TIME '14:00')
            AND rb.ends_at > (CURRENT_DATE + TIME '12:00')
    );

Detecting Booking Conflicts

WITH resource_bookings AS MATERIALIZED (
    SELECT
        rb.resource_booking_id,
        rb.starts_at,
        rb.ends_at,
        rbr.relationship_id AS resource_id
    FROM planning_center.calendar_resource_bookings rb
    JOIN planning_center.calendar_resource_bookings_relationships rbr
        ON rbr.resource_booking_id = rb.resource_booking_id
        AND rbr.relationship_type = 'Resource'
)
SELECT
    rb1.resource_booking_id as booking1,
    rb2.resource_booking_id as booking2,
    r.name as resource_name
FROM resource_bookings rb1
JOIN resource_bookings rb2
    ON rb1.resource_id = rb2.resource_id
    AND rb1.resource_booking_id < rb2.resource_booking_id
    AND rb1.starts_at < rb2.ends_at
    AND rb1.ends_at > rb2.starts_at
JOIN planning_center.calendar_resources r ON r.resource_id = rb1.resource_id;

Today's Schedule

SELECT
    e.name as event_name,
    ei.starts_at,
    ei.ends_at,
    ei.location
FROM planning_center.calendar_event_instances ei
JOIN planning_center.calendar_event_instances_relationships eir
    ON eir.event_instance_id = ei.event_instance_id AND eir.relationship_type = 'Event'
JOIN planning_center.calendar_events e ON e.event_id = eir.relationship_id
WHERE (
    DATE(ei.starts_at) = CURRENT_DATE
    OR (ei.all_day_event = true
        AND DATE(ei.starts_at) <= CURRENT_DATE
        AND DATE(ei.ends_at) >= CURRENT_DATE)
)
ORDER BY ei.starts_at;

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: Resource fee and cost columns are stored in cents - divide by 100.0 for display
  4. Time Windows: Use starts_at/ends_at comparisons and the all_day_event flag rather than relying on system_status
  5. Relationship Tables: All inter-entity links are stored in *_relationships tables — never in direct columns on the entity tables

Common Mistakes to Avoid

  1. Missing Schema Prefix

    • ❌ FROM calendar_events
    • ✅ FROM planning_center.calendar_events
  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 calendar_resource_bookings rb ON ...
    • ✅ JOIN planning_center.calendar_resource_bookings rb ON ...
  4. Using the wrong parent column in relationship tables

    • ❌ WHERE event_resource_request_id = ... in calendar_event_resource_requests_relationships
    • ✅ WHERE event_resource_request_id = ... (the live column is event_resource_request_id)
  5. Using the wrong parent column in eventinstances relationship table

    • ❌ WHERE event_instance_id = ... in calendar_event_instances_relationships
    • ✅ WHERE event_instance_id = ... (the live column is event_instance_id)

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 approval or conflict flags when relevant
    • Consider CTEs for complex hierarchical queries
    • Use relationship tables for all cross-entity joins

Data Types and Conventions

Approval Statuses

  • A - Approved
  • P - Pending approval
  • R - Rejected
  • NULL - No approval required

Resource Types (kind)

  • Room - Physical spaces
  • Resource - Other bookable items (equipment, etc.)

All-Day Events

  • all_day_event = true indicates full-day events
  • Check date portions of starts_at and ends_at
  • May span multiple days

Recurrence Patterns

  • recurrence holds a single keyword, not an iCal RRULE: 'None', 'Daily', 'Weekly', 'Monthly', 'Yearly', 'CustomDates', 'YearMonth', or 'MonthDay'. It is never NULL — filter with recurrence <> 'None' to select recurring events
  • Human-readable detail (days, times, start and end dates) is in recurrence_description, also never NULL
  • Each occurrence is a separate event_instance

Next Steps

On this page

OverviewVisual Data ModelCore Entity RelationshipsKey Relationships ExplainedQuery RequirementsSchema PrefixRow Level Security (RLS)Core Tables OverviewPrimary Entity TablesSupporting Entity TablesRelationship TablesTable Definitionscalendar_eventscalendar_event_instancescalendar_resourcescalendar_resource_bookingscalendar_conflictscalendar_tagscalendar_tag_groupscalendar_attachmentscalendar_event_connectionscalendar_event_timescalendar_room_setupscalendar_event_resource_requestscalendar_event_resource_answerscalendar_feedscalendar_organizationscalendar_peoplecalendar_report_templatescalendar_required_approvalscalendar_resource_approval_groupscalendar_resource_folderscalendar_resource_questionscalendar_resource_suggestionsRelationship Tablescalendar_attachments_relationshipscalendar_conflicts_relationshipscalendar_event_connections_relationshipscalendar_event_resource_answers_relationshipscalendar_event_times_relationshipscalendar_event_instances_relationshipscalendar_event_resource_requests_relationshipscalendar_events_relationshipscalendar_feeds_relationshipscalendar_people_relationshipscalendar_required_approvals_relationshipscalendar_resource_approval_groups_relationshipscalendar_resource_folders_relationshipscalendar_resource_questions_relationshipscalendar_resource_suggestions_relationshipscalendar_resource_bookings_relationshipscalendar_resources_relationshipscalendar_room_setups_relationshipscalendar_tag_groups_relationshipscalendar_tags_relationshipsSystem FieldsCommon Query PatternsGetting Events with TagsFinding Available ResourcesDetecting Booking ConflictsToday's ScheduleData Integrity RulesCommon Mistakes to AvoidPerformance ConsiderationsData Types and ConventionsApproval StatusesResource Types (kind)All-Day EventsRecurrence PatternsNext Steps