Skip to content

M4 Database Schema

The M4 database stores reporting data synced from Hostify, including listings, reservations, guests, and transactions. It is a PostgreSQL schema managed via Drizzle.

TablePurposeNotes
guestsGuest profiles synced from HostifyLinked to reservations by IDs
listingsProperty/listing recordsHostify listing metadata
reservationsBooking recordsPrimary reporting entity
reservation_custom_fieldsCustom fields per reservationLinked to reservations
reservation_feesFee breakdown per reservationLinked to reservations
transactionsFinancial transactionsLinked to reservations by hostify ID
transaction_tagsTags for transactionsLinked to transactions
usersInternal user accounts for reportingUses user_role enum
  • reservation_custom_fields.reservation_idreservations.id
  • reservation_fees.reservation_idreservations.id
  • transaction_tags.transaction_idtransactions.id
  • transactions.reservation_hostify_idreservations.hostify_id
EnumValues
user_roleowner, admin, finance, operations
  • Reservations and transactions are linked by reservations.hostify_id rather than the internal reservation id.
  • reservation_custom_fields and reservation_fees extend reservations without bloating the core table.

Schema extracted from D:\Development\m2-main\db_export\m4.sql.