Skip to content

Database Schema ​

FluentEvent creates 7 tables, all prefixed {$wpdb->prefix}fe_. Each table has its own migrator in database/Migrations/, and DBMigrator runs them on activation and on upgrade. The current schema version is 1.0.1 (FLUENT_EVENT_DB_VERSION).

An event is a custom post type hybrid. The fe_event post in wp_posts holds the title, slug, description, status and author. The fe_event_details row holds everything typed: dates, calendar, venue and the meta JSON. The two rows are 1:1 on post_id and are always written in one transaction.

Three things people get wrong

  • There is no registrations table. A guest row is the registration. An order is the set of guest rows that share a group_id; the is_buyer = 1 row carries the payment fields.
  • No inheritance between events. parent_event_id is reserved for recurrence, but every row owns its own post and its own full values.
  • Images are URLs. A cover image is event_details.meta.cover_url, never an attachment ID or an image column.

Table Inventory ​

TableModelPurposeMigration
fe_calendarsCalendarCalendars. Every event belongs to exactly one.database/Migrations/CalendarsMigrator.php
fe_event_detailsEventThe typed half of an event: dates, calendar, venue type and the meta JSON. 1:1 with its fe_event post.database/Migrations/EventDetailsMigrator.php
fe_ticket_types—Reserved for the future ticketed entry mode. No code reads or writes it yet.database/Migrations/TicketTypesMigrator.php
fe_guestsGuestOne row per person per event. A guest row is the registration; there is no separate registrations table.database/Migrations/GuestsMigrator.php
fe_metaMetaKey-value storage for settings and per-event bookkeeping, scoped by object_type.database/Migrations/MetaMigrator.php
fe_notifications—Reserved for in-app notifications. No code reads or writes it yet.database/Migrations/NotificationsMigrator.php
fe_notification_users—Reserved for per-user notification delivery and preferences. No code reads or writes it yet.database/Migrations/NotificationUsersMigrator.php
wp_postsPostHolds the fe_event post: title, slug, description (HTML), status and author.WordPress core
wp_usersUserWordPress users. Hosts and logged-in guests link here through user_id.WordPress core
wp_options—The general settings, under the option key fe_settings.WordPress core

Relationships ​

The diagram is built from the column comments in the migrations, so it shows the links the schema declares. There are no database-level foreign keys: WordPress tables are often MyISAM, and the plugin removes child rows in PHP (see Cleanup).

fe_calendars ​

Calendars. Every event belongs to exactly one.

Model: Calendar · Source: fluent-event/database/Migrations/CalendarsMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
titlevarchar(255)No—
slugvarchar(191)No—
descriptiontextYes—optional, no UI or endpoint sets it
statusvarchar(64)Nopublicpublic | private | draft
metalongtextYes—logo_url, cover_url, managers, preferences
created_bybigint(20) unsignedNo—wp_users.ID of the creator
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
uq_calendars_slugslugYes

fe_event_details ​

The typed half of an event: dates, calendar, venue type and the meta JSON. 1:1 with its fe_event post.

status is public, unlisted, private or draft, and the post's post_status follows it on every write (public and unlisted → publish, private → private, draft → draft). start_at and end_at are stored in UTC; timezone is the organizer's zone, used to show local times.

Model: Event · Source: fluent-event/database/Migrations/EventDetailsMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
post_idbigint(20) unsignedNo—wp_posts.ID of the fe_event post
calendar_idbigint(20) unsignedNo—fe_calendars.id
parent_event_idbigint(20) unsignedYes—recurrence parent
statusvarchar(64)Nopublicpublic | unlisted | private | draft
start_atdatetimeNo—
end_atdatetimeNo—
timezonevarchar(64)Yes—organizer local time, for display
venue_typevarchar(64)Yesofflineoffline | online | hybrid
metalongtextYes—cover_url, online_meeting_url, address, form_fields, entry_type
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
uq_events_postpost_idYes
idx_event_windowstart_at, end_atNo
idx_event_parentparent_event_id, start_atNo
idx_events_calendar_startatcalendar_id, start_atNo

fe_ticket_types ​

Reserved for the future ticketed entry mode. No code reads or writes it yet.

Source: fluent-event/database/Migrations/TicketTypesMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
event_idbigint(20) unsignedNo—fe_event_details.id
tiervarchar(128)No—display name, e.g. VIP, General
descriptionvarchar(255)Yes—additional information related to the tier
pricedecimal(10,2)No0.00
slotintYes—NULL = unlimited
soldintNo0
min_per_regintNo1
max_per_regintYes—NULL = unlimited
sale_start_atdatetimeYes—
sale_end_atdatetimeYes—
statusvarchar(64)Noactiveactive | inactive
sort_orderintNo0
metalongtextYes—
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
idx_ticket_types_eventevent_idNo

fe_guests ​

One row per person per event. A guest row is the registration; there is no separate registrations table.

email and user_id are each unique per event, so one person cannot hold two rows on one event. group_id ties the rows of one order together and is_buyer = 1 marks the row that carries the order; with RSVP and open registration every row is its own order. The payment columns (payment_status, payment_ref, price, paid_at) and ticket_type_id are reserved for ticketing and stay NULL today.

Model: Guest · Source: fluent-event/database/Migrations/GuestsMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
event_idbigint(20) unsignedNo—fe_event_details.id
calendar_idbigint(20) unsignedNo—fe_calendars.id, denormalised
ticket_type_idbigint(20) unsignedYes—NULL for RSVP, required when ticketed
group_idvarchar(64)No—rows sharing this value are one order
is_buyertinyint(1)No0one per group_id, carries order and payment
namevarchar(255)Yes—
emailvarchar(191)Yes—
user_idbigint(20) unsignedYes—wp_users.ID when logged in
statusvarchar(64)No—going | not_going | checked_in | cancelled
hashvarchar(64)Yes—per-ticket token, wp_generate_password
checked_in_atdatetimeYes—
payment_statusvarchar(64)Yes—paid | unpaid | refunded
payment_refvarchar(255)Yes—
pricedecimal(10,2)Yes—
paid_atdatetimeYes—
sourcevarchar(64)Yes—manual | wordpress_pages | fluent_community
source_idbigint(20) unsignedYes—id in the originating system, scoped by source
metalongtextYes—form_response and other per-guest data
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
uq_guests_hashhashYes
uq_guest_event_emailevent_id, emailYes
uq_guest_event_userevent_id, user_idYes
idx_guest_event_statusevent_id, statusNo
idx_guest_calendarcalendar_id, statusNo
idx_guest_ordergroup_idNo
idx_guest_emailemailNo
idx_guests_ticket_typeticket_type_idNo
idx_guest_createdcreated_atNo

fe_meta ​

Key-value storage for settings and per-event bookkeeping, scoped by object_type.

Rows in use today:

object_typeobject_idmeta_keyvalue
optionNULLemailEmail sender settings (JSON)
optionNULLemail_notificationsEmail notification settings (JSON)
eventevent IDreminder_email:<seconds>One reminder send: {"status": "scheduled|completed|skipped", "cursor": <last guest ID>}
eventevent IDfcom_feed_idThe FluentCommunity post that shows the event

Model: Meta · Source: fluent-event/database/Migrations/MetaMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
object_typevarchar(50)No—option | user | calendar | event
object_idbigint(20) unsignedYes—
meta_keyvarchar(191)No—
valuelongtextYes—
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
idx_meta_lookupobject_type, object_id, meta_keyNo
idx_meta_object_keyobject_id, meta_keyNo

fe_notifications ​

Reserved for in-app notifications. No code reads or writes it yet.

Source: fluent-event/database/Migrations/NotificationsMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
user_idbigint(20) unsignedYes—actor who caused it
actionvarchar(128)No—
object_typevarchar(64)Yes—
object_idbigint(20) unsignedYes—
titlevarchar(255)Yes—
contenttextYes—
routetextYes—
created_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes

fe_notification_users ​

Reserved for per-user notification delivery and preferences. No code reads or writes it yet.

Source: fluent-event/database/Migrations/NotificationUsersMigrator.php

ColumnTypeNullableDefaultNotes
idbigint(20) unsignedNo—Primary key, auto increment
object_typevarchar(64)No—notification | notification_pref
notification_typevarchar(128)No—
object_idbigint(20) unsignedNo—
user_idbigint(20) unsignedNo—
is_readtinyint(1)No0
created_attimestampYes—
updated_attimestampYes—

Indexes

NameColumnsUnique
PRIMARYidYes
uq_notif_useruser_id, object_type, object_id, notification_typeYes
idx_notif_user_inboxuser_id, is_read, object_typeNo
idx_notif_user_objectobject_id, is_read, object_type, notification_typeNo

FluentEvent developer documentation