> For the complete documentation index, see [llms.txt](https://docs.snapfix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snapfix.com/engineering-reference/db/tables.md).

# Tables

{% hint style="info" %}
Generated from the staging database schema, with descriptions drafted by agents ([how to read these docs](https://docs.snapfix.com/how-to-read.md)). [Source on GitHub](https://github.com/snapfix/docs/blob/main/spec/db/tables/README.md).
{% endhint %}

## Viewpoints

| Name                                                                                         | Description                                                                                                                                                                             |
| -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [account](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-0.md)           | Signing in, passwords, verification codes, devices and sign-in tokens, single sign-on, app start and consent logs, and the links that open the app (dynamic links).                     |
| [onboarding](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-1.md)        | Setting up a new site, the pre-registration survey, invitations, and joining a site.                                                                                                    |
| [tasks](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-2.md)             | Tasks (`tPri_Job`): statuses and their history, assignees and followers, tags on tasks, time and cost, task links, view logs, the shared task page, and the task type and origin codes. |
| [chat](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-3.md)              | Task chat messages, their reactions and voice transcripts, and the chat item types.                                                                                                     |
| [planner](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-4.md)           | Planned and repeating tasks (schedules), their logs, and the schedule categories.                                                                                                       |
| [checklists](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-5.md)        | Checklist templates, libraries and folders with their permissions and tags, the checklist log, and the checklists filled in on tasks.                                                   |
| [groups](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-6.md)            | Groups (`tPri_Business`) and their settings: tag folders and tags, tag folder and attribute rules, and group view logs.                                                                 |
| [rooms](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-7.md)             | Buildings, sections, areas and rooms, room statuses, guests and beds, the users linked to rooms and areas, and their logs.                                                              |
| [housekeeping](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-8.md)      | Housekeeping: links from a cleaning task to its inspection, room-status task rules, room assignments and staff working hours.                                                           |
| [assets](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-9.md)            | Asset registers and their categories, attributes and attribute rules, and the links between tasks and assets.                                                                           |
| [compliance](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-10.md)       | Snapfix Comply: system types, systems, contractors, documents, their links to assets, tasks, tags and users, and their logs.                                                            |
| [reports](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-11.md)          | Saved dashboard views, report files, monthly group statistics and wallboards.                                                                                                           |
| [console](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-12.md)          | Site Console and Multi-Site Console: site details and addresses, site settings, multi-sites, devices and username logins.                                                               |
| [billing](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-13.md)          | Plans and packages, the billing organisation (`tPri_Org`) with its Stripe, GoCardless, Xero and HubSpot deal records, in-app purchases, the paywall, support minutes and currencies.    |
| [integrations](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-14.md)     | Property management system (PMS) integrations (mappings, room statuses, inbound and outbound queues, webhooks), Deputy, and the keys of the Open API and the vendor API.                |
| [notifications](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-15.md)    | Push device tokens, reminders, notification settings, email and SMS logs, in-app surveys and marketing popups.                                                                          |
| [qr](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-16.md)               | QR forms: the form codes, their submissions log, copies, and the log of QR requests sent by email.                                                                                      |
| [ai](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-17.md)               | Snapfix AI and AI suggestions: agent sessions and messages, brand documents, task insight and title-style data, token usage, the AI job log and queue.                                  |
| [help](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-18.md)             | The Help Hub contact form and the help links.                                                                                                                                           |
| [staff](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-19.md)            | Snapfix staff tools: blocklists, HubSpot and Jira data, the admin app log, site history and the organisation onboarding log.                                                            |
| [people-and-sites](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-20.md) | Who belongs where: organisations, sites, groups, accounts, their site and group memberships, multi-sites, addresses and the user and group type codes.                                  |
| [logs](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-21.md)             | Application and API logs, rate limits and blocked IP addresses, the work queues, the cache and the throttling rules.                                                                    |
| [reference](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-22.md)        | Code lists and standard data: the enum tables, countries, currencies, industry codes, defaults the apps download, and the API endpoint lists.                                           |
| [legacy](https://docs.snapfix.com/engineering-reference/db/tables/viewpoint-23.md)           | Tables nothing uses: unused tables (no code, and no rows or one test row), copies and scratch tables, and old tables that hold rows but that no code reads or writes.                   |

## Tables

| Name                                                                                                                                             | Columns | Comment                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Type       |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| [ai\_agent\_feedback](https://docs.snapfix.com/engineering-reference/db/tables/ai_agent_feedback.md)                                             | 16      | One rating a user gave a Snapfix AI agent answer, thumbs up or down or 1 to 5 stars, with an optional comment, the chat session and the command type. No in-scope repo reads or writes it, though it has rows \[[ASK-179](https://github.com/snapfix/docs/blob/main/ASK.md#ask-179-which-database-does-snapfix-ai-use-in-production-and-are-the-ai_agent_-tables-still-used), [ASK-244](https://github.com/snapfix/docs/blob/main/ASK.md#ask-244-which-service-writes-the-ai-agent-and-brand-document-tables-and-in-what-time-unit)].                                     | BASE TABLE |
| [ai\_agent\_messages](https://docs.snapfix.com/engineering-reference/db/tables/ai_agent_messages.md)                                             | 10      | One message of an AI agent chat, by the user or the assistant. No repo reads or writes it; snapfix\_ai\_agent keeps Simon's chat turns in its own table simon\_messages, which the staging schema does not have \[[ASK-179](https://github.com/snapfix/docs/blob/main/ASK.md#ask-179-which-database-does-snapfix-ai-use-in-production-and-are-the-ai_agent_-tables-still-used)].                                                                                                                                                                                          | BASE TABLE |
| [ai\_agent\_sessions](https://docs.snapfix.com/engineering-reference/db/tables/ai_agent_sessions.md)                                             | 12      | One Snapfix AI agent chat session of a user on a site, with its title, a short snippet and a message count. No in-scope repo reads or writes it, though it has rows \[[ASK-179](https://github.com/snapfix/docs/blob/main/ASK.md#ask-179-which-database-does-snapfix-ai-use-in-production-and-are-the-ai_agent_-tables-still-used), [ASK-244](https://github.com/snapfix/docs/blob/main/ASK.md#ask-244-which-service-writes-the-ai-agent-and-brand-document-tables-and-in-what-time-unit)].                                                                               | BASE TABLE |
| [ai\_brand\_document\_permissions](https://docs.snapfix.com/engineering-reference/db/tables/ai_brand_document_permissions.md)                    | 8       | One grant on a brand-standards document (document\_uuid) to one principal, with a permission level. No in-scope repo reads or writes it \[[ASK-180](https://github.com/snapfix/docs/blob/main/ASK.md#ask-180-which-service-indexes-and-serves-the-brand-standards-documents-and-does-it-check-the-callers-site-and-group), [ASK-244](https://github.com/snapfix/docs/blob/main/ASK.md#ask-244-which-service-writes-the-ai-agent-and-brand-document-tables-and-in-what-time-unit)].                                                                                        | BASE TABLE |
| [ai\_brand\_documents](https://docs.snapfix.com/engineering-reference/db/tables/ai_brand_documents.md)                                           | 21      | One brand-standards document for Snapfix AI, with its file name, S3 key and indexing status. No in-scope repo names the table; on staging all rows but one are copies of compliance documents (source comply) \[[ASK-180](https://github.com/snapfix/docs/blob/main/ASK.md#ask-180-which-service-indexes-and-serves-the-brand-standards-documents-and-does-it-check-the-callers-site-and-group), [ASK-244](https://github.com/snapfix/docs/blob/main/ASK.md#ask-244-which-service-writes-the-ai-agent-and-brand-document-tables-and-in-what-time-unit)].                  | BASE TABLE |
| [ai\_task\_insight\_sync\_checkpoint](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_insight_sync_checkpoint.md)               | 5       | One watermark of aitask\_pyserver's assignee-insight seeder: how far it has read tPri\_Job, either for one group (uuid\_tParent empty) or for one site (parent mode, uuid\_tBusiness empty). Every staging row is a per-site watermark.                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [ai\_task\_title\_style\_profile](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_title_style_profile.md)                       | 5       | One style profile of a site's task titles, which aitask\_pyserver builds from the site's human-written titles for its AI title suggestions. Empty on staging; the service reads it only when title style learning is on, and that setting is off by default.                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [ai\_task\_title\_style\_sync\_checkpoint](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_title_style_sync_checkpoint.md)      | 4       | One watermark per site for rebuilding its title style profile, written by aitask\_pyserver's title style seeder. Empty on staging, like the profile table.                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [ai\_task\_user\_activity](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_user_activity.md)                                    | 4       | One user's newest task chat message time and newest sign-in time, which aitask\_pyserver's assignee suggestions pass to the model.                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [ai\_task\_user\_job\_resolution](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_user_job_resolution.md)                       | 7       | One finished (green) task, with its title, the user who finished it and how long it took, for aitask\_pyserver's assignee suggestions.                                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [ai\_task\_user\_outstanding](https://docs.snapfix.com/engineering-reference/db/tables/ai_task_user_outstanding.md)                              | 4       | Number of a user's assigned tasks in one group (uuid\_tBusiness) that are not green yet, for aitask\_pyserver's assignee suggestions.                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [ai\_token\_budget](https://docs.snapfix.com/engineering-reference/db/tables/ai_token_budget.md)                                                 | 14      | Unused: zero rows, and no in-scope code refers to it. Meant for monthly Snapfix AI token and cost limits per site or user \[[ASK-182](https://github.com/snapfix/docs/blob/main/ASK.md#ask-182-what-monthly-snapfix-ai-budgets-apply-and-who-sets-them)].                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [ai\_token\_usage](https://docs.snapfix.com/engineering-reference/db/tables/ai_token_usage.md)                                                   | 26      | One AI call (translation, tag, room, area, title, group, assignee or Simon) with its provider, model, tokens, cost and outcome. api\_php\_live\_v2 writes the translation calls and aitask\_pyserver the others; rows keep request and answer text with no retention.                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [api\_token\_auth](https://docs.snapfix.com/engineering-reference/db/tables/api_token_auth.md)                                                   | 11      | One short-lived reference token. authpy adds one for each sign-in, resend or sign-up code it sends, and its uuid is the reference id that the resend and verify steps use; php-apis's ?action=api\_token\_auth adds 60-second API tokens.                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [assetAttribute](https://docs.snapfix.com/engineering-reference/db/tables/assetattribute.md)                                                     | 19      | Legacy: one attribute value (atKey, atValue) of an asset in the old asset model (uuid\_assetMain). No row was added or changed after November 2022, but php-apis still reads it. Today's asset attributes are in tPri\_JobAttribute.                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [assetMain](https://docs.snapfix.com/engineering-reference/db/tables/assetmain.md)                                                               | 15      | Legacy: one asset of an old asset register (uuid\_assetReg), with its name and sort order. No row was added or changed after November 2022, but apipy's task detail reads asset names through tPri\_JobAsset, php-apis reads it and the iOS sync downloads it. Today's assets are task rows in asset groups.                                                                                                                                                                                                                                                              | BASE TABLE |
| [assetParentCatKey](https://docs.snapfix.com/engineering-reference/db/tables/assetparentcatkey.md)                                               | 20      | Legacy: one site-level attribute rule for the old asset registers (key, category, unique and mandatory flags); 24 rows, none added or changed after November 2022. Only php-apis names it, and it still serves the old asset picker.                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [assetReg](https://docs.snapfix.com/engineering-reference/db/tables/assetreg.md)                                                                 | 17      | Legacy: one asset register of a site in the old asset model, with its name, address and image. No row was added or changed after November 2022, but php-apis, apipy and the iOS sync still read it. The asset registers the apps show today are groups of type asset (tPri\_Business), not rows here.                                                                                                                                                                                                                                                                     | BASE TABLE |
| [assetRegCatKey](https://docs.snapfix.com/engineering-reference/db/tables/assetregcatkey.md)                                                     | 20      | Legacy: one attribute rule of an old asset register (key, category, unique and mandatory flags); 120 rows, none added or changed after November 2022. Only php-apis names it.                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [assetUserReg](https://docs.snapfix.com/engineering-reference/db/tables/assetuserreg.md)                                                         | 20      | Unused: zero rows, and no in-scope code refers to it. Meant for one user's permissions on an old asset register (view all, create, delete, archive).                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [blacklist\_email](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_email.md)                                                  | 10      | One blocked email address. The blacklist tables are global, not per site; admins manage them through the admin blacklist API, and php-apis's request checks read them.                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [blacklist\_ipaddress](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_ipaddress.md)                                          | 10      | One blocked IP address in the global blacklist. php-apis's request checks read it, and apipy's and authpy's IP checks also name it.                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [blacklist\_iso\_countrycode](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_iso_countrycode.md)                             | 10      | One blocked ISO country code in the global blacklist; the request checks block calls from IP addresses in that country.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [blacklist\_phone\_countrycode](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_phone_countrycode.md)                         | 10      | One blocked phone country code in the global blacklist.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [blacklist\_phone\_number](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_phone_number.md)                                   | 10      | One blocked mobile number in the global blacklist.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [blacklist\_user](https://docs.snapfix.com/engineering-reference/db/tables/blacklist_user.md)                                                    | 14      | One blocked user in the global blacklist, matched by user ID, email, country code or mobile. Every staging row has zero timestamps.                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [cache](https://docs.snapfix.com/engineering-reference/db/tables/cache.md)                                                                       | 3       | Laravel's database cache store (key, value, expiry). Empty on staging, but api\_php\_live\_v2's shared cache store defaults to this table, so production may use it.                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [cloudbeds\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_buildingsitemapping.md)                      | 22      | One Cloudbeds property linked to one Snapfix building, with its OAuth client, access and refresh tokens and webhook secret. The client secret, tokens and webhook secret are stored in plain text.                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [cloudbeds\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_inboundqueue.md)                                    | 22      | One room change received from Cloudbeds, by webhook or poll (source), waiting to be applied to the building's Snapfix rooms.                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [cloudbeds\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_outboundqueue.md)                                  | 19      | One Snapfix room change (condition, do not disturb, comments) waiting to be sent to Cloudbeds. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [cloudbeds\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_roommapping.md)                                      | 18      | One Cloudbeds room linked to one Snapfix room (uuid\_tRoom), with its room type. The building sync creates it by matching room names.                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [cloudbeds\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_roomstatus.md)                                        | 15      | One Cloudbeds room status that a Snapfix room status can be mapped to.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [cloudbeds\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_roomstatusmapping.md)                          | 15      | For one building, maps a Cloudbeds room status to a Snapfix housekeeping status (main) and occupancy status (secondary).                                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [cloudbeds\_webhook](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_webhook.md)                                              | 7       | One webhook event received from Cloudbeds, with its event object and action, property ID and JSON payload; processed is 1 once it is handled.                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [cloudbeds\_webhook\_subscription](https://docs.snapfix.com/engineering-reference/db/tables/cloudbeds_webhook_subscription.md)                   | 16      | One webhook subscription that the Cloudbeds service registered for a property, with the event object and action it listens to and its endpoint URL.                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [comply\_Contractor](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractor.md)                                              | 31      | One contractor of a site (uuid\_tParent), with contact details and an expiry date. Deleting sets fDeleted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [comply\_ContractorAsset](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractorasset.md)                                    | 12      | Links a compliance contractor (uuid\_Contractor) to an asset, which is a task row of an asset group (uuid\_tJob).                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [comply\_ContractorDocument](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractordocument.md)                              | 12      | Links a compliance contractor to a compliance document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [comply\_ContractorLog](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractorlog.md)                                        | 12      | Links a compliance contractor to one entry of comply\_Log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [comply\_ContractorTag](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractortag.md)                                        | 12      | A tag on a contractor. Unused; only its model and migration refer to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [comply\_ContractorUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/comply_contractoruserassigned.md)                      | 13      | One site user assigned to a compliance contractor; fUnassigned is 1 once the user is unassigned.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [comply\_Document](https://docs.snapfix.com/engineering-reference/db/tables/comply_document.md)                                                  | 19      | One compliance document of a site: a file under a document type (uuid\_DocumentType), with its file path, URL, optional expiry date and AI indexing state. Systems and contractors link to it through comply\_SystemDocument and comply\_ContractorDocument.                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [comply\_DocumentType](https://docs.snapfix.com/engineering-reference/db/tables/comply_documenttype.md)                                          | 12      | One document type of a site (uuid\_tParent), such as a certificate type, that compliance documents are filed under.                                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [comply\_Log](https://docs.snapfix.com/engineering-reference/db/tables/comply_log.md)                                                            | 15      | One entry of the compliance activity log, with its action, entity, text and request JSON. Systems and contractors link to entries through comply\_SystemLog and comply\_ContractorLog.                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [comply\_System](https://docs.snapfix.com/engineering-reference/db/tables/comply_system.md)                                                      | 25      | One compliance system of a site, under a system type (uuid\_SystemType), with an expiry date and alert days. Deleting sets fDeleted and leaves its task links in tPri\_JobComplySystem.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [comply\_SystemAsset](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemasset.md)                                            | 12      | Links a compliance system (uuid\_System) to an asset, which is a task row of an asset group (uuid\_tJob).                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [comply\_SystemContractor](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemcontractor.md)                                  | 12      | Links a compliance system to a compliance contractor.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [comply\_SystemDocument](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemdocument.md)                                      | 12      | Links a compliance system to a compliance document.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [comply\_SystemLog](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemlog.md)                                                | 12      | Links a compliance system to one entry of comply\_Log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [comply\_SystemTag](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemtag.md)                                                | 12      | A tag on a compliance system. Unused; only its model and migration refer to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [comply\_SystemType](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemtype.md)                                              | 13      | One compliance system type of a site (uuid\_tParent), such as a fire alarm type, with a name and sort order; compliance systems sit under it.                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [comply\_SystemUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/comply_systemuserassigned.md)                              | 13      | One site user assigned to a compliance system; fUnassigned is 1 once the user is unassigned.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [comply\_enumFrequency](https://docs.snapfix.com/engineering-reference/db/tables/comply_enumfrequency.md)                                        | 11      | A frequency name, from seven seed rows (Daily to Annually). Unused; GET /v1/app/frequencies returns the fixed FrequencyType list instead, and the two functions that read this table are never called.                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [comtrol\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_buildingsitemapping.md)                          | 17      | One Comtrol connection of a building, with the Basic login that Comtrol's system uses to call the Comtrol service. The password is stored in plain text and compared as stored. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [comtrol\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_inboundqueue.md)                                        | 23      | One Comtrol message received, split into its fields (message type, device model, transaction ID, sequence number, status and room parts), waiting to be applied to Snapfix. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [comtrol\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_outboundqueue.md)                                      | 23      | One Snapfix room status update waiting to be sent to Comtrol, in the same field layout as the inbound queue. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [comtrol\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_roommapping.md)                                          | 15      | One Comtrol room (name\_number) linked to one Snapfix room (uuid\_tRoom). Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [comtrol\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_roomstatus.md)                                            | 14      | One Comtrol maid code (fCode and fName, for example 1 Room Cleaned), the reference list that Snapfix room statuses map to; 16 rows, none added after April 2025.                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [comtrol\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/comtrol_roomstatusmapping.md)                              | 13      | Maps a Comtrol room status (uuid\_comtrol\_RoomStatus) to a Snapfix main room status (uuid\_tBuildingRoomStatusMain). Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [credential\_code](https://docs.snapfix.com/engineering-reference/db/tables/credential_code.md)                                                  | 12      | One 6-character code sent to a signed-in user by email or SMS to verify their email or mobile number; api\_php\_live\_v2 and php-apis write it. Codes are kept in plain text and never deleted. A WhatsApp request adds a row without a code, because Twilio checks those codes.                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [deputy\_auth](https://docs.snapfix.com/engineering-reference/db/tables/deputy_auth.md)                                                          | 13      | One Deputy sign-in of a site for the roster import, with the device ID, login URL, auth code and Deputy token response, stored in plain text. The sign-in callback has no login.                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [dynamiclink](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink.md)                                                           | 18      | One short link for a user or QR invitation, a password reset or a profile check, with counters for how often it was opened and used. A QR sign-up link stores the sign-up form, password included.                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [dynamiclink\_invitation](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink_invitation.md)                                    | 14      | One invitation inside a dynamic link: the site (uuid\_tParent) and group (uuid\_tBusiness) to join, the invitee's site role (parent\_userType), group role (business\_userType) and group permissions.                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [dynamiclink\_user](https://docs.snapfix.com/engineering-reference/db/tables/dynamiclink_user.md)                                                | 13      | One person invited through a dynamic link (uuid\_tUser), with the state of the invitation, a welcome flag and how many times they were invited.                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [enum\_BusinessType](https://docs.snapfix.com/engineering-reference/db/tables/enum_businesstype.md)                                              | 8       | The two group kinds, task and asset, with the code in uuid. No code reads the table: tPri\_Business.enum\_BusinessType holds the code, and the code compares it with the RegType values \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)].                                                                                                                                                                                                                                               | BASE TABLE |
| [enum\_IntegrationSource](https://docs.snapfix.com/engineering-reference/db/tables/enum_integrationsource.md)                                    | 10      | Legacy lookup of three PMS sources of room status changes (comtrol-lodginglink, oracle-opera and guestline, code in uuid); nothing reads it. tPri\_Log\_RoomStatusChange.uuid\_enum\_IntegrationSource holds the Pms enum values (comtrol, guestline, opera, hotsoft, cloudbeds and others) instead.                                                                                                                                                                                                                                                                      | BASE TABLE |
| [enum\_JobType](https://docs.snapfix.com/engineering-reference/db/tables/enum_jobtype.md)                                                        | 10      | Task types: the code in uuid, which tPri\_Job.enum\_JobType holds, with a name and a report name, for example 0 normal (mobile app task) and 1 planned (scheduled task); 27 rows. No code reads the table \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)]. Codes 45 (cleaning task) and 46 (inspection task) of the app's JobType enum have no row \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)]. | BASE TABLE |
| [enum\_Origin](https://docs.snapfix.com/engineering-reference/db/tables/enum_origin.md)                                                          | 10      | Where a task was made: the code in uuid, which tPri\_Job.enum\_Origin holds, from 0 to 10 (unknown, android, ios, web, web-admin, email, qr, publicapi, guestline, schedule and auto-hk). No code reads the table \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)]. Code 11 (xvendor) has no row.                                                                                                                                                                                       | BASE TABLE |
| [enum\_ScheduleCategory](https://docs.snapfix.com/engineering-reference/db/tables/enum_schedulecategory.md)                                      | 8       | The schedule categories schedule and tasknotif, code in uuid. The scheduler also uses duedatenotif, which has no row \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)]. No code reads the table \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)].                                                                                                                                                      | BASE TABLE |
| [enum\_UserType](https://docs.snapfix.com/engineering-reference/db/tables/enum_usertype.md)                                                      | 9       | The three account kinds that tPri\_User.enum\_UserType holds, code in uuid: 1 normal, 2 snapfix (Snapfix internal user) and 3 snapfix\_test. No code reads the table \[[ASK-246](https://github.com/snapfix/docs/blob/main/ASK.md#ask-246-should-the-enum-lookup-tables-follow-the-code-or-be-retired)].                                                                                                                                                                                                                                                                  | BASE TABLE |
| [enum\_sso](https://docs.snapfix.com/engineering-reference/db/tables/enum_sso.md)                                                                | 8       | Sign-in types, code in uuid: google, apple, azure, github, amazon and slack (single sign-on), and Snapfix's own snapfix-password, snapfix-email-otp and snapfix-mobile-otp. sso\_rules.enum\_sso holds these codes, and authpy treats every type other than the three Snapfix ones as single sign-on.                                                                                                                                                                                                                                                                     | BASE TABLE |
| [failed\_jobs](https://docs.snapfix.com/engineering-reference/db/tables/failed_jobs.md)                                                          | 7       | One failed Laravel queue job of api\_php\_live\_v2, with its connection, queue, payload and exception. Nearly all rows are on the logging queue, and no code prunes the table.                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [firebase\_user\_device\_token](https://docs.snapfix.com/engineering-reference/db/tables/firebase_user_device_token.md)                          | 14      | One registration of a user's device for push notifications, with its Firebase token, device type, last-seen time, app version and notification settings. Each registration adds a row, readers take the newest row per device, and no code deletes the older ones.                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [flask\_test](https://docs.snapfix.com/engineering-reference/db/tables/flask_test.md)                                                            | 9       | Unused. A leftover test table with one row on staging, and no in-scope code refers to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [group\_invite](https://docs.snapfix.com/engineering-reference/db/tables/group_invite.md)                                                        | 20      | One invitation of a person to join a group (uuid\_tBusiness), by SMS or email, with the invitee's name. fProcessed 0 means the invitation is still open.                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [guestline\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/guestline_buildingsitemapping.md)                      | 19      | One Guestline site linked to one Snapfix building, with its site, interface and operator codes, PMS customer name, webhook key and housekeeping switch.                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [guestline\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/guestline_inboundqueue.md)                                    | 17      | One room status update received from Guestline by webhook (room, housekeeping and maintenance codes), waiting to be applied to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [guestline\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/guestline_outboundqueue.md)                                  | 17      | One Snapfix room status change waiting to be sent to Guestline.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [guestline\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/guestline_roommapping.md)                                      | 18      | One Guestline room (gl\_roomId and gl\_roomExtenstion) linked to one Snapfix room (uuid\_tRoom), with its room type code.                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [guestline\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/guestline_roomstatus.md)                                        | 16      | One Guestline status code (type and code) that a Snapfix room status can be mapped to; none added after July 2025.                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [guestline\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/guestline_roomstatusmapping.md)                          | 14      | For a building, maps a Guestline room status (uuid\_gl\_RoomStatus) to a Snapfix main room status and a secondary status.                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [guestline\_business](https://docs.snapfix.com/engineering-reference/db/tables/guestline_business.md)                                            | 15      | One Guestline setup of a Snapfix group (uuid\_tBusiness) under a Guestline account (uuid\_guestline\_parent), with its admin user, enabled flag and integration type. Only apipy reads and writes it.                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [guestline\_business\_job](https://docs.snapfix.com/engineering-reference/db/tables/guestline_business_job.md)                                   | 14      | One task created for a Guestline group setup, linked to the Snapfix task (uuid\_tJob), with the Guestline room ID, a hash and log JSON. No in-scope code reads or writes it; about 1,800 rows, none added after December 2023 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                   | BASE TABLE |
| [guestline\_parent](https://docs.snapfix.com/engineering-reference/db/tables/guestline_parent.md)                                                | 20      | One Guestline account of a site (uuid\_tParent), with its admin user, Guestline site, interface and operator codes, password fields and two JSON code maps. apipy encrypts the password into gl\_pw\_encrypted with a key kept in the code.                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [hotsoft\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_buildingsitemapping.md)                          | 20      | One Hotsoft hotel linked to one Snapfix building, with its hotel URL, hotel code, provider key, PMS customer name and housekeeping switch. The Basic login password and the webhook key are stored in plain text.                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [hotsoft\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_inboundqueue.md)                                        | 14      | One room status change received from Hotsoft (room ID and status code), waiting to be applied to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [hotsoft\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_outboundqueue.md)                                      | 14      | One Snapfix room status change waiting to be sent to Hotsoft.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [hotsoft\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_roommapping.md)                                          | 15      | One Hotsoft room (hotsoft\_roomId, with its description) linked to one Snapfix room.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [hotsoft\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_roomstatus.md)                                            | 17      | One Hotsoft room status; fCode is the code matched against the status Hotsoft sends, and hotsoft\_RoomStatusMapping maps it to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [hotsoft\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/hotsoft_roomstatusmapping.md)                              | 13      | Maps one Hotsoft room status to a Snapfix main room status of a building (uuid\_tBuildingRoomStatusMain).                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [hubspot\_company](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_company.md)                                                  | 38      | One company copied from HubSpot, with HubSpot properties as columns; hubspot\_ref is its HubSpot ID. apipy's HubSpot endpoints read it, and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [hubspot\_company\_parent](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_company_parent.md)                                   | 10      | Links a HubSpot company to a Snapfix site; apipy's company-parent endpoint writes it, and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [hubspot\_contact](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_contact.md)                                                  | 35      | One contact copied from HubSpot, with HubSpot properties as columns; hubspot\_ref is its HubSpot ID. apipy's HubSpot endpoints read it, and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [hubspot\_contact\_parent](https://docs.snapfix.com/engineering-reference/db/tables/hubspot_contact_parent.md)                                   | 10      | Links a HubSpot contact to a Snapfix site; apipy's contact-parent endpoint writes it, and no row is newer than 2021-11.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [jira\_job](https://docs.snapfix.com/engineering-reference/db/tables/jira_job.md)                                                                | 11      | Links a task (uuid\_tJob) to a Jira issue (jira\_ref), with the issue as JSON. No in-scope code reads or writes it, and no row is newer than 2022-01 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [jonaschorum\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_buildingsitemapping.md)                  | 18      | The Jonas Chorum connection of one building: partner and hotel codes, SOAP endpoint, partner token and housekeeping switch.                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [jonaschorum\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_inboundqueue.md)                                | 17      | One room status read from Jonas Chorum, by poll or push, waiting to be applied to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [jonaschorum\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_outboundqueue.md)                              | 16      | One Snapfix room status change waiting to be sent to Jonas Chorum.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [jonaschorum\_PushEventLog](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_pusheventlog.md)                                | 6       | One raw push message from Jonas Chorum, with its event type, hotel code and XML payload, stored before it is handled.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [jonaschorum\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_roommapping.md)                                  | 17      | One Snapfix room matched to a Jonas Chorum room number and room type in one building; the room sync creates and updates it.                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [jonaschorum\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_roomstatus.md)                                    | 15      | One Jonas Chorum housekeeping status (fName) in the status catalog; jonaschorum\_RoomStatusMapping maps it to Snapfix statuses.                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [jonaschorum\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/jonaschorum_roomstatusmapping.md)                      | 14      | Maps a Jonas Chorum room status to a Snapfix main and secondary room status; read when a room status is applied or sent.                                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [list\_TaskImageUrl](https://docs.snapfix.com/engineering-reference/db/tables/list_taskimageurl.md)                                              | 9       | One sample image URL that the random test task generators (apipy POST /v4/random-jobs and api\_php\_live\_v2's admin random task endpoint) pick from; no row is newer than 2022-12.                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [list\_TaskTitle](https://docs.snapfix.com/engineering-reference/db/tables/list_tasktitle.md)                                                    | 9       | One sample task title that the random test task generators (apipy POST /v4/random-jobs and api\_php\_live\_v2's admin random task endpoint) pick from; no row is newer than 2022-12.                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [log\_ai\_job](https://docs.snapfix.com/engineering-reference/db/tables/log_ai_job.md)                                                           | 11      | One AI suggestion event on a task, by category, with the suggested value or the value the user chose instead; aitask\_pyserver reads the title rows to learn title style.                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [log\_webadminapp](https://docs.snapfix.com/engineering-reference/db/tables/log_webadminapp.md)                                                  | 13      | One action logged by the old web admin app: the acting user, the action name and description, and details as JSON. apipy's /logswebappadmin endpoints read and write it, no client calls them, and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [mkt\_popup](https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup.md)                                                              | 35      | One marketing popup shown in the apps and on the web, with images, campaign link, locale, campaign dates, platform switches and weekday show windows.                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [mkt\_popup\_log](https://docs.snapfix.com/engineering-reference/db/tables/mkt_popup_log.md)                                                     | 15      | One popup event on a device (shown, button clicked or closed), written through the queue log.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [opera\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/opera_buildingsitemapping.md)                              | 26      | The OPERA connection of one building: chain code, client and hotel IDs, client secret, streaming settings and webhook key.                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [opera\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/opera_inboundqueue.md)                                            | 16      | One housekeeping status change from OPERA, by poll or event stream, waiting to be applied to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [opera\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/opera_outboundqueue.md)                                          | 15      | One Snapfix room status change waiting to be sent to OPERA; the room status endpoint writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [opera\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/opera_roommapping.md)                                              | 15      | One OPERA room (opera\_roomId, with its description) linked to a Snapfix room; the building sync writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [opera\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/opera_roomstatus.md)                                                | 15      | One OPERA room status in the status catalog; opera\_RoomStatusMapping maps it to Snapfix statuses.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [opera\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/opera_roomstatusmapping.md)                                  | 14      | Maps an OPERA room status to a Snapfix main and secondary room status of a building.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [opera\_streaming\_state](https://docs.snapfix.com/engineering-reference/db/tables/opera_streaming_state.md)                                     | 3       | The last offset saved for one OPERA event stream. The stream subscription does not send it back (that line is commented out), so it is only logged \[[ASK-278](https://github.com/snapfix/docs/blob/main/ASK.md#ask-278-should-the-opera-stream-resume-from-its-saved-offset)].                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [opera\_webhook](https://docs.snapfix.com/engineering-reference/db/tables/opera_webhook.md)                                                      | 5       | One raw event from the OPERA event stream (event name, JSON payload, hotel ID); the stream code writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [package\_bundle\_server](https://docs.snapfix.com/engineering-reference/db/tables/package_bundle_server.md)                                     | 14      | Links a server package to a marketing bundle, with an active flag and dates. Only a migration names it, and no row is newer than 2021-01 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [package\_client](https://docs.snapfix.com/engineering-reference/db/tables/package_client.md)                                                    | 15      | php-apis's copy of a server package (same uuid, without the Stripe and start-date columns), made the first time a site that has the package reads its packages.                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [package\_client\_parent](https://docs.snapfix.com/engineering-reference/db/tables/package_client_parent.md)                                     | 14      | Links a site to its package\_client copy; php-apis copies it from the site's package\_server\_parent row, with the type, active flag and dates.                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [package\_marketing\_bundle](https://docs.snapfix.com/engineering-reference/db/tables/package_marketing_bundle.md)                               | 15      | One marketing bundle that groups server packages, with a Stripe bundle ID and dates.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [package\_server](https://docs.snapfix.com/engineering-reference/db/tables/package_server.md)                                                    | 24      | One package (plan) sold to sites, with its Stripe product, type, JSON package definition, allowed payment methods, test flag and start-date rules.                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [package\_server\_parent](https://docs.snapfix.com/engineering-reference/db/tables/package_server_parent.md)                                     | 15      | Links a site to a server package, with its Stripe subscription, type, active flag and dates.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [package\_server\_pricing](https://docs.snapfix.com/engineering-reference/db/tables/package_server_pricing.md)                                   | 22      | One Stripe price of a server package, with amount, currency, billing interval and quantity limits.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [qr\_formdata](https://docs.snapfix.com/engineering-reference/db/tables/qr_formdata.md)                                                          | 22      | One QR form of a group: the form fields (dynamic\_form\_json), the fixed task fields (hardcoded\_job\_json), app and poster texts and an expiry; a submission creates a task from it.                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [qr\_formdata\_copy\_20250513](https://docs.snapfix.com/engineering-reference/db/tables/qr_formdata_copy_20250513.md)                            | 22      | Copy of qr\_formdata made on 2025-05-13; no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [qr\_formdata\_copy\_cg](https://docs.snapfix.com/engineering-reference/db/tables/qr_formdata_copy_cg.md)                                        | 22      | Copy of qr\_formdata, no row newer than 2024-01; no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [qr\_formdata\_log](https://docs.snapfix.com/engineering-reference/db/tables/qr_formdata_log.md)                                                 | 15      | One QR form submission, with the form, the task template, the submitted answers and the task it created. The submit throttle counts recent rows per form, and uuid\_qr\_formdata has no index.                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [qr\_formdata\_ol1](https://docs.snapfix.com/engineering-reference/db/tables/qr_formdata_ol1.md)                                                 | 22      | Copy of qr\_formdata, no row newer than 2024-01; no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [queue\_ai](https://docs.snapfix.com/engineering-reference/db/tables/queue_ai.md)                                                                | 10      | One php-apis AI run that creates, and then assigns, housekeeping tasks for a site, with its stage and progress. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [reg\_industry](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry.md)                                                        | 10      | One industry offered in the Android app's new-site setup (php-apis list\_industries\_roles\_templates), with a sort order; no row is newer than 2022-07.                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [reg\_industry\_business\_templates](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry_business_templates.md)                | 11      | Links an industry to a template group (uuid\_tBusiness), with a sort order; create\_parent\_with\_templates clones the chosen template groups into the new site.                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [reg\_industry\_roles](https://docs.snapfix.com/engineering-reference/db/tables/reg_industry_roles.md)                                           | 11      | One role offered for an industry in the same new-site setup, with a sort order.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [report\_userreports](https://docs.snapfix.com/engineering-reference/db/tables/report_userreports.md)                                            | 25      | One report a user asked for: type, format, request, progress, file link, file size and counts of the tasks, chats and media in it. php-apis's report functions write it.                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [saved\_dashboard\_views](https://docs.snapfix.com/engineering-reference/db/tables/saved_dashboard_views.md)                                     | 19      | One saved ops dashboard view of a user, with its filters, tab states, layout, colour label and default flag; ops\_dashboard\_be reads and writes it.                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [schedule](https://docs.snapfix.com/engineering-reference/db/tables/schedule.md)                                                                 | 19      | One v2 recurring schedule (schedule JSON, task template JSON, trigger times), run by py\_scheduler's v2 scheduler; schedule\_v3 rows with sch\_version v2 read their details from here.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [schedule\_bug\_v2](https://docs.snapfix.com/engineering-reference/db/tables/schedule_bug_v2.md)                                                 | 19      | Copy of the schedule table (same columns), no row newer than 2021-10; no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [schedule\_debug\_log](https://docs.snapfix.com/engineering-reference/db/tables/schedule_debug_log.md)                                           | 11      | Unused. A debug log of schedule events; no rows on staging and no in-scope code refers to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [schedule\_log](https://docs.snapfix.com/engineering-reference/db/tables/schedule_log.md)                                                        | 10      | One task the v2 scheduler created, with the schedule (uuid\_schedule), the template task (uuid\_JobOrigin), the new task (uuid\_JobNew) and the schedule and task JSON.                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [schedule\_log\_v3](https://docs.snapfix.com/engineering-reference/db/tables/schedule_log_v3.md)                                                 | 10      | One task the v3 scheduler created, with the schedule (uuid\_schedule), the template task (uuid\_JobOrigin), the new task (uuid\_JobNew) and the JSON used. No code deletes rows; about 12.9 GB on staging.                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [schedule\_nfc02](https://docs.snapfix.com/engineering-reference/db/tables/schedule_nfc02.md)                                                    | 19      | Copy of the schedule table (same columns), no row newer than 2021-10; only a migration names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [schedule\_v3](https://docs.snapfix.com/engineering-reference/db/tables/schedule_v3.md)                                                          | 24      | One recurring schedule or task notification, linked to a task, with its schedule and task JSON, trigger times, time zone and paused state; py\_scheduler runs it.                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [sso\_apple\_user](https://docs.snapfix.com/engineering-reference/db/tables/sso_apple_user.md)                                                   | 18      | One Apple sign-in linked to a user, with the Apple email, name and image and the provider's responses as JSON.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [sso\_azure\_user](https://docs.snapfix.com/engineering-reference/db/tables/sso_azure_user.md)                                                   | 18      | One Microsoft (Azure) sign-in linked to a user, with the email, name and image and the provider's responses as JSON.                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [sso\_google\_user](https://docs.snapfix.com/engineering-reference/db/tables/sso_google_user.md)                                                 | 18      | One Google sign-in linked to a user, with the email, name and image and the provider's responses as JSON.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [sso\_rules](https://docs.snapfix.com/engineering-reference/db/tables/sso_rules.md)                                                              | 16      | One rule that recommends a sign-in method for login emails containing email\_tail, and can add users who sign in that way to groups.                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [staff\_username](https://docs.snapfix.com/engineering-reference/db/tables/staff_username.md)                                                    | 14      | One username login made in a site's Site Console: the user it signs in, the admin who made it and the proxy email its Cognito login uses.                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [stayntouch\_BuildingSiteMapping](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_buildingsitemapping.md)                    | 20      | The Stayntouch connection of one building: auth and connect URLs, client ID and secret, hotel ID and webhook key.                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [stayntouch\_InboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_inboundqueue.md)                                  | 15      | One room or service status change from Stayntouch (webhook, poll or the service's outbound endpoint), waiting to be applied to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [stayntouch\_OutboundQueue](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_outboundqueue.md)                                | 15      | One Snapfix room or service status change waiting to be sent to Stayntouch.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [stayntouch\_RoomMapping](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_roommapping.md)                                    | 15      | One Stayntouch room (stayntouch\_roomId, with its description) linked to a Snapfix room.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [stayntouch\_RoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_roomstatus.md)                                      | 16      | One Stayntouch status in the status catalog, matched by fCode to the codes in incoming changes; stayntouch\_RoomStatusMapping maps it to Snapfix.                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [stayntouch\_RoomStatusMapping](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_roomstatusmapping.md)                        | 14      | Maps a Stayntouch status to a Snapfix main and secondary room status of a building.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [stayntouch\_webhook](https://docs.snapfix.com/engineering-reference/db/tables/stayntouch_webhook.md)                                            | 5       | Raw log of Stayntouch webhook calls (event, JSON payload, hotel ID); rows are written even when the signature is wrong, because the rejection is commented out.                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [std\_continents](https://docs.snapfix.com/engineering-reference/db/tables/std_continents.md)                                                    | 2       | Reference list of continents, a two-letter code and an English name; only a seeder writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [std\_countries](https://docs.snapfix.com/engineering-reference/db/tables/std_countries.md)                                                      | 9       | Reference list of countries: ISO codes, English names, continent, Stripe tax ID type and a blacklist flag.                                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [std\_currencies](https://docs.snapfix.com/engineering-reference/db/tables/std_currencies.md)                                                    | 10      | Reference list of ISO currencies; snapfix\_supported marks the ones a package price may use.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [std\_naics\_codes\_2](https://docs.snapfix.com/engineering-reference/db/tables/std_naics_codes_2.md)                                            | 2       | One NAICS industry code at level 2, with its English title; only a seeder writes it and no code reads it (tPri\_Parent has a std\_naics\_codes column).                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [std\_naics\_codes\_3](https://docs.snapfix.com/engineering-reference/db/tables/std_naics_codes_3.md)                                            | 3       | One NAICS industry code at level 3, with its English title; only a seeder writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [std\_naics\_codes\_4](https://docs.snapfix.com/engineering-reference/db/tables/std_naics_codes_4.md)                                            | 3       | One NAICS industry code at level 4, with its English title; only a seeder writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [std\_naics\_codes\_5](https://docs.snapfix.com/engineering-reference/db/tables/std_naics_codes_5.md)                                            | 3       | One NAICS industry code at level 5, with its English title; only a seeder writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [std\_naics\_codes\_6](https://docs.snapfix.com/engineering-reference/db/tables/std_naics_codes_6.md)                                            | 3       | One NAICS industry code at level 6, with its English title; only a seeder writes it and no code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [std\_usecases](https://docs.snapfix.com/engineering-reference/db/tables/std_usecases.md)                                                        | 2       | Reference list of use cases, a code and a name, two rows; no code reads or writes it (tPri\_Parent has a std\_usecases column of the same name).                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [stripe\_log](https://docs.snapfix.com/engineering-reference/db/tables/stripe_log.md)                                                            | 9       | One Stripe webhook event stored in full, with the event name and the event JSON (up to 60,000 characters); apipy writes it and php-apis reads payment events back from it.                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [stripe\_product\_detail\_retired](https://docs.snapfix.com/engineering-reference/db/tables/stripe_product_detail_retired.md)                    | 14      | Retired copy of Stripe product details, 4 rows, none newer than 2021-01; only a migration names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [stripe\_subscription](https://docs.snapfix.com/engineering-reference/db/tables/stripe_subscription.md)                                          | 11      | One Stripe subscription of a site (uuid\_tParent, subscription\_id); apipy's Stripe handler updates it from webhook events.                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Address](https://docs.snapfix.com/engineering-reference/db/tables/tpri_address.md)                                                        | 13      | A postal address of a site, linked through tPri\_ParentAddress. Each address save adds a new row.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_Api\_Simple\_SecretKey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_api_simple_secretkey.md)                            | 22      | A public API key: only its SHA-256 hash is stored, with its validity dates, rate limits, permissions and AI switch. The API hashes the caller's key and looks it up here.                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [tPri\_AppVersion](https://docs.snapfix.com/engineering-reference/db/tables/tpri_appversion.md)                                                  | 17      | Unused: an earlier list of app versions and server keys. Empty on staging and no in-scope code refers to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Area](https://docs.snapfix.com/engineering-reference/db/tables/tpri_area.md)                                                              | 31      | An area of a site's building, with its name, description, instructions, priority and map position.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_AreaUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_areauser.md)                                                      | 15      | Links a user to an area with active, archived and visible flags. Empty on staging; php-apis still has its save action and sends it in the app sync.                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_AreaUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/tpri_areauserassigned.md)                                      | 13      | A user assigned to an area. Empty on staging; php-apis still has its save action and sends it in the app sync.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_Building](https://docs.snapfix.com/engineering-reference/db/tables/tpri_building.md)                                                      | 22      | A building of a site, with its type, address and the switch for manual room status; rooms, areas and the room status lists belong to a building.                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_BuildingRoomSection](https://docs.snapfix.com/engineering-reference/db/tables/tpri_buildingroomsection.md)                                | 15      | A section of a building's room status catalogue; the main and secondary room statuses each point to one section.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_BuildingRoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/tpri_buildingroomstatus.md)                                  | 16      | Unused: an earlier room status list, from before the main and secondary lists. Empty on staging; php-apis's code for it is commented out and the Laravel API's model for it is never used.                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_BuildingRoomStatusMain](https://docs.snapfix.com/engineering-reference/db/tables/tpri_buildingroomstatusmain.md)                          | 18      | A main room status of a building (UI: room status), with its colour, description and section. A room has one main status and may have secondary ones; PMS integrations map their own statuses to these rows.                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_BuildingRoomStatusSecondary](https://docs.snapfix.com/engineering-reference/db/tables/tpri_buildingroomstatussecondary.md)                | 18      | A secondary room status of a building, in a section of the room status catalogue, shown next to the room's main status.                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_Business](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business.md)                                                      | 29      | A group of a site (UI: group), holding tasks and members, or an asset register; it carries the customer type and the soft-freeze settings.                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_BusinessJobAttributeRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_businessjobattributerule.md)                      | 20      | A custom field of an asset register (UI: asset attributes), such as Asset ID or Location; each asset's value is in tPri\_JobAttribute. Almost all rows belong to asset registers.                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_BusinessTagHeaderRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_businesstagheaderrule.md)                            | 14      | One group's rule for one tag folder (tPri\_TagHeader): whether the folder is excluded from the group or mandatory for its tasks.                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_Business\_Stats\_Monthly](https://docs.snapfix.com/engineering-reference/db/tables/tpri_business_stats_monthly.md)                        | 57      | Monthly statistics per group, one double column per month from 2018\_01 to 2021\_12. No in-scope code writes it and the newest row is from 2020-09; php-apis's dashboard stats code still reads and adds up the months.                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_CL](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl.md)                                                                  | 18      | A checklist (UI: checklist), with its order, priority, visibility and lock flags; its items are in tPri\_CL\_Item. Every library entry and site or multi-site template points at one checklist.                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_CL\_Item](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_item.md)                                                       | 39      | One line of a checklist: an item to tick or answer, or a section heading, with its answer options such as yes or no, star rating, radio or NFC. A task gets its own copy in tPri\_JobTodo.                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_CL\_ItemMedia](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_itemmedia.md)                                             | 13      | A photo or video on a checklist item (tPri\_CL\_Item); tasks use tPri\_JobTodoMedia. Empty on staging, though php-apis still saves it and sends it in the app sync.                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_CL\_Item\_Notes](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_item_notes.md)                                          | 12      | A note line on a checklist item (tPri\_CL\_Item); a task's copy is in tPri\_JobTodo\_Notes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_CL\_Library](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_library.md)                                                 | 24      | One checklist in the Snapfix checklist library, with its description, note and version; it points at its checklist in tPri\_CL.                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_CL\_LibraryAttachTag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_libraryattachtag.md)                               | 14      | Attaches a checklist tag (tPri\_CL\_Tag) to a library checklist (tPri\_CL\_Library); the library's tag filter matches through it.                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_CL\_LibraryPermissions](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_librarypermissions.md)                           | 14      | Links a library checklist to a row of tPri\_CL\_Permissions. Empty on staging, though the Laravel API's checklist code still uses it.                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_CL\_LibraryVirtualFolders](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_libraryvirtualfolders.md)                     | 15      | A folder of the checklist library; library checklists list their folders in uuid\_tCL\_LibraryVirtualFolder\_CSV. Empty on staging, though the Laravel API's checklist folder code still uses it.                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_CL\_MultiSiteTemplate](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_multisitetemplate.md)                             | 27      | A checklist template of a multi-site, pointing at its checklist in tPri\_CL and at the library entry it came from, if any; it is shared through tPri\_CL\_MultiSiteTemplatePermissions.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_CL\_MultiSiteTemplatePermissions](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_multisitetemplatepermissions.md)       | 14      | Shares one multi-site checklist template with one target in tPri\_CL\_Permissions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_CL\_MultiSiteTemplateVirtualFolders](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_multisitetemplatevirtualfolders.md) | 16      | A folder of one multi-site's checklist templates.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_CL\_Permissions](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_permissions.md)                                         | 17      | One target a checklist template is shared with: a multi-site, a site or a group, as the uuid columns say. New rows default to hidden (fVisible 0).                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_CL\_SiteTemplate](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_sitetemplate.md)                                       | 28      | A checklist template of one site, pointing at its checklist in tPri\_CL and at the library entry or multi-site template it came from, if any; no staging row has either link.                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_CL\_SiteTemplatePermissions](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_sitetemplatepermissions.md)                 | 14      | Shares one site checklist template with one target in tPri\_CL\_Permissions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_CL\_SiteTemplateVirtualFolders](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_sitetemplatevirtualfolders.md)           | 16      | A folder of one site's (uuid\_tParent) checklist templates.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_CL\_Tag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_tag.md)                                                         | 13      | A checklist tag in a checklist tag folder (tPri\_CL\_TagHeader); library checklists get it through tPri\_CL\_LibraryAttachTag.                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_CL\_TagHeader](https://docs.snapfix.com/engineering-reference/db/tables/tpri_cl_tagheader.md)                                             | 12      | A folder of checklist tags (tPri\_CL\_Tag); the newest row is from 2025-09.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_ChecklistLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_checklistlog.md)                                              | 16      | One activity line for a checklist template of a site or a multi-site, with its text and the request JSON.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [tPri\_Device](https://docs.snapfix.com/engineering-reference/db/tables/tpri_device.md)                                                          | 16      | A device a user has signed in from, with its device ID, make, model and type, and the keys for its encrypted payloads, which are stored as plain text.                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_IAP\_History](https://docs.snapfix.com/engineering-reference/db/tables/tpri_iap_history.md)                                               | 11      | A record of an App Store in-app purchase for a site, as the store sent it. No in-scope code writes or reads it, yet staging has 113 rows, the newest from 2026-08 \[[ASK-143](https://github.com/snapfix/docs/blob/main/ASK.md#ask-143-how-does-an-app-store-purchase-reach-a-sites-plan), [ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                                                                                                                              | BASE TABLE |
| [tPri\_Job](https://docs.snapfix.com/engineering-reference/db/tables/tpri_job.md)                                                                | 90      | One task (UI: task) in a group, with its title, status colour, people, rooms, dates, priority and approval state; most task tables point to it. An asset is a task in an asset register.                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tPri\_JobArea](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobarea.md)                                                        | 13      | Links a task to an area (tPri\_Area); aiSuggested marks a link the AI suggested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_JobAsset](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobasset.md)                                                      | 14      | Legacy link between a task and an asset of the old asset table (assetMain); 35 rows, the newest from 2023-03. Asset links are now kept in tPri\_JobJobLink.                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_JobAttribute](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobattribute.md)                                              | 23      | The value of one attribute (name, category, key and value) on one asset or task, following the register's attribute rule (tPri\_BusinessJobAttributeRule).                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_JobChat](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobchat.md)                                                        | 28      | One line of a task's chat: a message, picture, video, drawing, voice transcript or reply, or an audit line such as a status change.                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_JobChat\_Reaction](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobchat_reaction.md)                                     | 11      | One user's reaction to a task chat line; each user has one row per line, updated when the reaction changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_JobChat\_VoiceTranscript](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobchat_voicetranscript.md)                       | 15      | The transcript, AI title and image of a voice message in a task's chat, with the raw replies of the Google, AWS and ChatGPT services \[[ASK-177](https://github.com/snapfix/docs/blob/main/ASK.md#ask-177-do-the-customer-terms-cover-sending-task-text-photos-recordings-and-chats-to-ai-providers)]. The newest row is from 2023-05; php-apis still has the code that writes it.                                                                                                                                                                                        | BASE TABLE |
| [tPri\_JobComplySystem](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobcomplysystem.md)                                        | 12      | Links a task to a compliance system (comply\_System).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_JobJobLink](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobjoblink.md)                                                  | 15      | Links a task (uuid\_tJob\_a) to an asset (uuid\_tJob\_b), with the group of each; all but 9 staging rows are task-to-asset links.                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_JobLink](https://docs.snapfix.com/engineering-reference/db/tables/tpri_joblink.md)                                                        | 15      | Links a master task to a tagged task, which may be in another group; housekeeping uses it to pair a cleaning task with its inspection task.                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_JobNotif](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobnotif.md)                                                      | 21      | A dated notice on a task, with a title, description, date, time and the range it is shown in. The newest row is from 2023-03; php-apis still has its save, copy and sync code.                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_JobReminder](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobreminder.md)                                                | 18      | A task's reminder schedule: the previous and next reminder times and the interval. The newest row was created in 2024-06 and last saved on 2024-11-07, though apipy's reminder code still updates it.                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_JobRoom](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobroom.md)                                                        | 13      | Links a task to a room (tPri\_Room); aiSuggested marks a link the AI suggested.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_JobTag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtag.md)                                                          | 16      | A tag on a task, one row per task and tag, set by hand or suggested by Snapfix Recommends (aiSuggested); aiNewTag marks a suggested new tag.                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_JobTag\_Log](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtag_log.md)                                                 | 10      | One task tag change made by a tag folder merge (web account settings, Manage tags), with the old and new tag and folder, so that an admin can undo the merge.                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_JobTimeCost](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtimecost.md)                                                | 21      | A time or cost entry on a task: a title, description and user, with a duration or an amount in a currency.                                                                                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_JobTodo](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtodo.md)                                                        | 45      | One checklist item on a task, the task's own copy of a checklist item (tPri\_CL\_Item), with its answer settings, done state and answer.                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tPri\_JobTodoMedia](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtodomedia.md)                                              | 17      | A photo or video on a task's checklist item (tPri\_JobTodo).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_JobTodo\_Notes](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobtodo_notes.md)                                           | 14      | A note line on a task's checklist item (tPri\_JobTodo).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_JobUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobuser.md)                                                        | 15      | A group member who follows a task (UI: "Followed by"), with the soft-freeze flag; the creator is added as a follower.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_JobUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/tpri_jobuserassigned.md)                                        | 16      | A user assigned to a task (UI: "Assigned to"), with the AI-suggestion flag; removing an assignment soft-deletes the row.                                                                                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tPri\_Job\_CL\_Template](https://docs.snapfix.com/engineering-reference/db/tables/tpri_job_cl_template.md)                                      | 13      | Links a task to the site or multi-site checklist template its checklist came from.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_Job\_StatusLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_job_statuslog.md)                                           | 10      | One status change of a task: the colour, approval status, notes and the time the status took effect.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tPri\_Log](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log.md)                                                                | 12      | A general activity log line about a group, a user or a task. Some password changes write the new password here.                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_Log\_API\_IP\_RateLimit](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_api_ip_ratelimit.md)                           | 16      | One API call counted by the rate limit: the action, the caller's device, user, IP and location, and whether it was blocked.                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Log\_API\_Serialized\_Response](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_api_serialized_response.md)             | 10      | A saved API response for a logged call: the event, a public and a private message and metadata; php-apis, the Laravel API, apipy and authpy write it.                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_Log\_AreaViewedUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_areavieweduser.md)                                 | 8       | A row each time a user opens an area; the count of that area's updates for the user starts from these rows.                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Log\_Binary](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_binary.md)                                                 | 10      | Unused: an earlier log of files attached to tasks (URL and size). Empty on staging and no in-scope code refers to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_Log\_BusinessViewedUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_businessvieweduser.md)                         | 8       | A row each time a user opens a group; the updates feed reads the newest one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Log\_DDOS\_Usage\_Pattern](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_ddos_usage_pattern.md)                       | 23      | A copy of the IP check row (tPri\_Log\_IP\_Blocked) for the first request of each check, with the request headers and the decoded token claims; php-apis writes it. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_Log\_EmailQrRequests](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_emailqrrequests.md)                               | 11      | One task request that came by email or from a QR code, with the request JSON, the file it produced and its start and end times; php-apis's email and QR task creation writes it.                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_Log\_Helphub\_ContactForm](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_helphub_contactform.md)                      | 10      | One Help Hub contact form message, from a signed-in or signed-out user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_Log\_IP\_Blocked](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_ip_blocked.md)                                        | 19      | One request checked by the IP block rules, with the caller's IP and country, whether it was blocked and why; php-apis, authpy and apipy have code that writes it. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_Log\_Job](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_job.md)                                                       | 10      | A change record for a task: the verb, the new values and the task before the change. Only php-apis's voice task auto-fill writes it; the newest row is from 2023-05.                                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tPri\_Log\_JobChat\_Reaction](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_jobchat_reaction.md)                            | 9       | One add or remove of a task chat reaction, kept as history; rows are only inserted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_Log\_JobViewedUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_jobvieweduser.md)                                   | 9       | A row each time a user opens a task; the unread filters compare it with the task's changes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Log\_Job\_SoftFreeze](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_job_softfreeze.md)                                | 7       | Unused: a log of tasks soft-frozen by a job. Empty on staging and no in-scope code refers to it \[[ASK-7](https://github.com/snapfix/docs/blob/main/ASK.md#ask-7-should-soft-freeze-still-run)].                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_Log\_NPS](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_nps.md)                                                       | 11      | A user's answer to the in-app NPS prompt: a score, a dismissal or a remind-me-later choice, with any feedback. php-apis has code that writes it; the newest row is from 2022-10.                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_Log\_Network](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_network.md)                                               | 81      | A network flow record (endpoints, ports, timing, packet and flag counts, traffic label); php-apis has an action that writes it. Empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_Log\_NotifAPIRequests](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_notifapirequests.md)                             | 14      | One push request sent to Firebase: the request (the message and receivers, and on the Laravel API's rows the device tokens), the token counts and Firebase's replies; apipy and the Laravel API write it.                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [tPri\_Log\_PreRegSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_preregsurvey.md)                                     | 15      | One call to the pre-registration survey routes, with the device type and the caller's IP lookup: a request for the survey, logged even when none applies, or a submitted answer or dismissal.                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_Log\_PreRegSurveyMetadata](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_preregsurveymetadata.md)                     | 55      | Flat report rows joining sign-up data, a pre-registration survey row (sy\_ columns) and an API log row (apilog\_ columns), including personal data such as a username and a mobile number. No in-scope code refers to it; 824 rows, the newest from 2024-12 \[[ASK-245](https://github.com/snapfix/docs/blob/main/ASK.md#ask-245-how-long-should-guest-records-and-personal-data-in-log-tables-be-kept), [ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                | BASE TABLE |
| [tPri\_Log\_RoomStatusChange](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_roomstatuschange.md)                             | 9       | One room status change: the room, its new main and secondary status, and the integration that sent it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_Log\_RoomViewedUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_roomvieweduser.md)                                 | 8       | A row each time a user opens a room; the updates feed reads the newest one.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Log\_StartAppUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_startappuser.md)                                     | 8       | A row each time a user starts the app, with the app version and the IP lookup data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_Log\_Survey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_survey.md)                                                 | 9       | One answer to an in-app user survey, which is a dismissal, a remind-me-later choice or the answers as JSON. php-apis records it and updates the user's survey schedule (tPri\_UserSurvey), and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Log\_UserEncouragement](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_userencouragement.md)                           | 10      | Log of automated messages and integration calls, despite the name, each with its full JSON; daily group report emails and SMS, weekly group admin summaries and HubSpot contact syncs. Who sends the daily and weekly reports is open \[[ASK-121](https://github.com/snapfix/docs/blob/main/ASK.md#ask-121-what-sends-the-daily-group-email-and-to-whom)], and the HubSpot rows hold the contact's name, email and phone \[[ASK-245](https://github.com/snapfix/docs/blob/main/ASK.md#ask-245-how-long-should-guest-records-and-personal-data-in-log-tables-be-kept)].    | BASE TABLE |
| [tPri\_Log\_UserGdpr](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_usergdpr.md)                                             | 10      | One record of a user's communication consent (account updates, group task updates and product updates). php-apis adds a row for each change and takes the newest row of a user as the current choice \[[ASK-27](https://github.com/snapfix/docs/blob/main/ASK.md#ask-27-where-do-users-change-their-communication-consent-and-how-should-it-be-stored)].                                                                                                                                                                                                                  | BASE TABLE |
| [tPri\_Log\_UserTermsConditions](https://docs.snapfix.com/engineering-reference/db/tables/tpri_log_usertermsconditions.md)                       | 8       | One record of a user agreeing or not to the terms and conditions, with the terms text shown. php-apis writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_MultiSite](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisite.md)                                                    | 18      | A multi-site (UI name "Multi-Site Console"), a named set of sites managed together that can share checklist templates and members. Its sites are in tPri\_MultiSiteParent.                                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_MultiSiteChecklistTemplate](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisitechecklisttemplate.md)                  | 10      | Unused; empty, and no in-scope code names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_MultiSiteParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisiteparent.md)                                        | 12      | Links a site (uuid\_tParent) to a multi-site (uuid\_tMultiSite).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_MultiSiteUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_multisiteuser.md)                                            | 15      | A user's membership of a multi-site, with admin, active and visible flags. No code reads fAdmin \[[ASK-123](https://github.com/snapfix/docs/blob/main/ASK.md#ask-123-who-may-manage-a-multi-site-and-change-its-members-site-roles)].                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_NotificationBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_notificationbusiness.md)                              | 13      | A notice for one group (uuid\_tBusiness) with a title, a body and effective dates. The apps download it but never show it, and no row is newer than 2020-02 \[[ASK-11](https://github.com/snapfix/docs/blob/main/ASK.md#ask-11-which-unused-api-endpoints-are-still-needed)].                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_NotificationGlobal](https://docs.snapfix.com/engineering-reference/db/tables/tpri_notificationglobal.md)                                  | 12      | A notice for all users with a title, a body and effective dates. The apps download it but never show it, and no row is newer than 2020-02 \[[ASK-11](https://github.com/snapfix/docs/blob/main/ASK.md#ask-11-which-unused-api-endpoints-are-still-needed)].                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Org](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org.md)                                                                | 23      | A customer organisation that groups sites (tPri\_Parent.uuid\_tOrg), with its address, invoice and renewal dates and links to its Stripe, Xero and HubSpot records. No row is newer than 2024-08.                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_Org\_GoCardlessMandateUrlLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_gocardlessmandateurllog.md)               | 13      | One GoCardless mandate sign-up link made for a site's HubSpot deal, with the GoCardless customer ID. The staff admin deal endpoints read it, no in-scope code writes it, and staging has no rows.                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_Org\_GoCardlessPaymentLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_gocardlesspaymentlog.md)                     | 21      | One GoCardless payment for a site, linked to its HubSpot deal and line item. The staff admin deal endpoints read it, no in-scope code writes it, and staging has no rows.                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [tPri\_Org\_GoCardlessWebhookLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_gocardlesswebhooklog.md)                     | 33      | One GoCardless webhook event (payment, payout, mandate or billing request). Rows keep arriving, but no in-scope code names the table, so its writer is unknown \[[ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_Org\_Hubspot](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspot.md)                                               | 21      | One HubSpot deal of an organisation (tPri\_Org.uuid\_tOrgHubspot) as last copied, with name, stage, pipeline, amount and dates, all as text. No in-scope code writes it, and no row is newer than 2024-09.                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_Org\_HubspotDealLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspotdeallog.md)                                 | 23      | One HubSpot change event for a deal property, with the property, its new value and where the change came from. Rows keep arriving, but no in-scope code names the table \[[ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_Org\_HubspotDealState](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_hubspotdealstate.md)                             | 50      | One HubSpot deal with its billing state (trial, won or lost, with their times), owner, pipeline and lead source; one row per object\_id. The staff admin deal list reads the won deals and counts their Stripe checkout links, and no in-scope code writes it.                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_Org\_OnboardingLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_onboardinglog.md)                                   | 13      | One setup link for a new site (uuid\_tParent), with its HubSpot deal, company and contact IDs. The staff admin API adds a row on every create call, even when the deal already has one.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_Org\_Stripe](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_stripe.md)                                                 | 45      | One Stripe customer of an organisation (tPri\_Org.uuid\_tOrgStripe), with its latest subscription and invoice, mostly as text. No in-scope code writes it, and no row is newer than 2024-09.                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_Org\_StripeCheckoutUrlLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_stripecheckouturllog.md)                     | 13      | One Stripe Checkout link made for a site and its HubSpot deal, with the Stripe customer ID. php-apis writes it, the staff admin deal list counts the links per deal, and no row is newer than 2025-04.                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_Org\_StripeWebhookLog](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_stripewebhooklog.md)                             | 9       | One Stripe webhook event, kept as its full JSON. Rows keep arriving, but no in-scope code names the table \[[ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_Org\_Xero](https://docs.snapfix.com/engineering-reference/db/tables/tpri_org_xero.md)                                                     | 19      | One Xero contact of an organisation (tPri\_Org.uuid\_tOrgXero), with name, email, status and bank details, all as text. No in-scope code writes it, and no row is newer than 2024-09.                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_Parent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent.md)                                                          | 46      | One site, the customer account that holds groups, buildings, users and tasks, with its address, customer type, payment package, billing dates, time zone and settings.                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_ParentAddress](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentaddress.md)                                            | 11      | Links a site to an address (tPri\_Address) with its type. Every save adds a row, and readers take the newest row of each type.                                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_ParentDevice](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentdevice.md)                                              | 14      | One device's block state at one site, with notes. Login checks read only the newest row for each device, and sites blocked for the device are left out of the account's site list.                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_ParentJobAttributeRule](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentjobattributerule.md)                          | 20      | One asset attribute rule of a site, a key under a category with unique and mandatory settings. php-apis's sync sends it to the apps, no in-scope code writes it, and no row is newer than 2022-11. Whether site rules still apply to asset registers is open \[[ASK-101](https://github.com/snapfix/docs/blob/main/ASK.md#ask-101-are-site-level-attribute-rules-still-meant-to-apply-to-asset-registers)].                                                                                                                                                               | BASE TABLE |
| [tPri\_ParentOnboarding](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentonboarding.md)                                      | 11      | One onboarding code of a site and group (uuid\_tBusiness). apipy creates and lists the codes, authpy checks them, and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_ParentRoomStatus](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentroomstatus.md)                                      | 16      | Unused; empty, and only an unused Laravel model names it (php-apis's sync case for it is commented out). tPri\_Room.uuid\_tParentRoomStatus points here, with no foreign key.                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_ParentSupportAccount](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parentsupportaccount.md)                              | 15      | One line of a site's support-time account, a note, deposit, withdrawal or credit of support minutes, with its approval. apipy adds the lines up to the site's remaining minutes, and no row is newer than 2024-07.                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_Parent\_Api](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent_api.md)                                                 | 15      | One older Open API key of a site, for a customer's own integration, with a validity window and a disabled flag. No row is newer than 2023-04.                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_Parent\_copy\_2025-05-07](https://docs.snapfix.com/engineering-reference/db/tables/tpri_parent_copy_2025-05-07.md)                        | 43      | A copy of tPri\_Parent taken on 2025-05-07; no in-scope code names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_PreRegSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_preregsurvey.md)                                              | 14      | One pre-registration survey, with the form shown during sign-up, when it runs (startTs to endTs), and IP and device type filters. The Laravel API reads it, and no row is newer than 2024-11.                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_Queue](https://docs.snapfix.com/engineering-reference/db/tables/tpri_queue.md)                                                            | 13      | One change logged for a site's devices, with the table that changed, the changed row as JSON and who made it. Rows are written only when the queue flags are on \[[ASK-12](https://github.com/snapfix/docs/blob/main/ASK.md#ask-12-which-settings-do-the-production-api-servers-use)].                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_Room](https://docs.snapfix.com/engineering-reference/db/tables/tpri_room.md)                                                              | 57      | One room of a site, in a building, with its status, floor, type, priority, capacity and cleaning times. Housekeeping tasks are created per room.                                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_RoomBed](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roombed.md)                                                        | 11      | The beds of one type in a room (fType, fCount). Rows keep arriving, but no in-scope code names the table \[[ASK-243](https://github.com/snapfix/docs/blob/main/ASK.md#ask-243-which-service-writes-the-tables-that-no-in-scope-code-names)].                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_RoomFeatures](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomfeatures.md)                                              | 10      | The features of one room as a JSON array, one row per room on staging. The Opera room sync writes it, but its insert and update name roomFeatures and fDeletedTs columns that the table lacks \[[ASK-253](https://github.com/snapfix/docs/blob/main/ASK.md#ask-253-which-room-features-column-does-the-opera-sync-write)].                                                                                                                                                                                                                                                | BASE TABLE |
| [tPri\_RoomGuestStatus](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomgueststatus.md)                                        | 27      | One booking of a room, with booking and confirmation references, stay dates, guest counts and status, written by the PMS syncs. The Laravel API and the apps read it.                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_RoomGuests](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomguests.md)                                                  | 27      | One guest on a booking (tPri\_RoomGuestStatus), with name, contact and address details and a VIP flag, written by the PMS syncs; the rows hold personal data. Some bookings have more than one live row for the same guest, and how long the rows are kept is open \[[ASK-245](https://github.com/snapfix/docs/blob/main/ASK.md#ask-245-how-long-should-guest-records-and-personal-data-in-log-tables-be-kept)].                                                                                                                                                          | BASE TABLE |
| [tPri\_RoomStatusIcon](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomstatusicon.md)                                          | 15      | An icon (image URL) for a room status, with sort order and visibility. The main and secondary room statuses point to it, the apps download it, and no row is newer than 2025-04.                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_RoomStatus\_TaskRules](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomstatus_taskrules.md)                             | 23      | One rule for a building's main and secondary room status, which decides whether a housekeeping cleaning or inspection task is created when a room takes the status (optionally only when it is occupied or reserved), which checklist each task uses, and what happens when the tasks start or finish.                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPri\_RoomUser](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomuser.md)                                                      | 15      | A user linked to a room, with active, archived and visible flags. php-apis's sync reads it and its save action writes it; empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPri\_RoomUserAssigned](https://docs.snapfix.com/engineering-reference/db/tables/tpri_roomuserassigned.md)                                      | 13      | A user assigned to a room, with an unassigned flag. php-apis's sync reads it and its save action writes it; empty on staging.                                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPri\_SettingsBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsbusiness.md)                                      | 38      | One group's settings, such as auto-logout, update prompts, list and tag limits, required tags, rooms and assignees, auto-archive and task approval.                                                                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPri\_SettingsParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_settingsparent.md)                                          | 19      | One site's feature switches, such as chat, the AI features (images, voice, video, documents, suggestions, agent, translation and tag rules) and the dynamic housekeeping timeline.                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_Status](https://docs.snapfix.com/engineering-reference/db/tables/tpri_status.md)                                                          | 13      | A group's own name for a task status, with its sort order. Tasks link to it with uuid\_tStatus.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_StatusSub](https://docs.snapfix.com/engineering-reference/db/tables/tpri_statussub.md)                                                    | 13      | A group's sub-status name, with its sort order. Tasks link to it with uuid\_tStatusSub.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPri\_Tag](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tag.md)                                                                | 16      | A tag in a group's tag folder (tPri\_TagHeader); tasks carry tags from this list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_TagHeader](https://docs.snapfix.com/engineering-reference/db/tables/tpri_tagheader.md)                                                    | 17      | A tag folder of a group, such as Location, Equipment or Category, with name, description, icon and sort order. Its tags are rows in tPri\_Tag.                                                                                                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_User](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user.md)                                                              | 50      | One person's login account, shared by all their sites and groups, with name, username, mobile number, language, verification flags and login counters; the rows hold personal data. Password hashes are in tPri\_UserHashSalt.                                                                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [tPri\_UserBusiness](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userbusiness.md)                                              | 41      | One person's membership of one group, with the group role, the membership state and the permission switches (such as create, delete, archive and move between red, amber and green).                                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tPri\_UserHashSalt](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userhashsalt.md)                                              | 11      | One password record of a user, with the salted hash that sign-in checks (authpy and the Laravel API). The newest row (highest id) is the current one.                                                                                                                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [tPri\_UserHashSalt\_Temporary](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userhashsalt_temporary.md)                         | 13      | A temporary password of a user, accepted until expiryTs and optionally for one sign-in only.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPri\_UserHubspotContact](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userhubspotcontact.md)                                  | 18      | Unused; empty, and only its migration names it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_UserNotifSettings](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usernotifsettings.md)                                    | 23      | One user's notification switches, such as all notifications, task created or assigned, reminders, to-dos, chat, and status and priority alerts.                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPri\_UserParent](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userparent.md)                                                  | 24      | One person's membership of one site, with the site role, on-call and block flags, and site permissions such as creating groups and managing tags.                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_UserParent\_copy1](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userparent_copy1.md)                                     | 20      | A copy of tPri\_UserParent; no in-scope code names it, and no row is newer than 2025-10 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tPri\_UserPaywall](https://docs.snapfix.com/engineering-reference/db/tables/tpri_userpaywall.md)                                                | 14      | A user's in-app purchase offer for a site. Staging has one row, and no repo writes the table \[[ASK-144](https://github.com/snapfix/docs/blob/main/ASK.md#ask-144-who-may-buy-an-in-app-plan-for-a-site-and-who-sets-the-in-app-purchase-switch)].                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPri\_UserSurvey](https://docs.snapfix.com/engineering-reference/db/tables/tpri_usersurvey.md)                                                  | 13      | A user's survey schedule, with the survey type, when it is due and the daily window it may show in. php-apis updates it when the user answers, and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPri\_User\_WorkingHours](https://docs.snapfix.com/engineering-reference/db/tables/tpri_user_workinghours.md)                                   | 19      | One working session of a staff member at a site, with its type, day, start and end times and housekeeping role, used by the housekeeping schedule.                                                                                                                                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tPub\_ApiEndPoint](https://docs.snapfix.com/engineering-reference/db/tables/tpub_apiendpoint.md)                                                | 12      | A reference list of API endpoints with live and test URLs and a description. The apps download it in their sync, php-apis's generic read action returns it (nothing calls it), and no row is newer than 2021-03.                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPub\_ApiEndPoint\_v7](https://docs.snapfix.com/engineering-reference/db/tables/tpub_apiendpoint_v7.md)                                         | 14      | A second endpoint list for API v7, with live and test URLs, token types and io\_type. Only php-apis's generic read action names it (nothing calls it), and no row is newer than 2024-06.                                                                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tPub\_ApiEndPoint\_v7\_LEGACY](https://docs.snapfix.com/engineering-reference/db/tables/tpub_apiendpoint_v7_legacy.md)                          | 14      | An old copy of the v7 endpoint list; only its migration names it, and no row is newer than 2021-03 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPub\_ChatItemType](https://docs.snapfix.com/engineering-reference/db/tables/tpub_chatitemtype.md)                                              | 6       | A reference list of chat item types, each with a number (message\_id), a name (fName), an example and a comment. Only php-apis's generic table actions name it, and nothing calls them.                                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tPub\_GlobalValues](https://docs.snapfix.com/engineering-reference/db/tables/tpub_globalvalues.md)                                              | 3       | App-wide settings by key, read by authpy and php-apis, such as minimum and current app versions for Android and iOS, Android API levels and the web and mobile registration switches. A few keys are test keys.                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tPub\_Help](https://docs.snapfix.com/engineering-reference/db/tables/tpub_help.md)                                                              | 7       | One help text by identifier and ISO 639-1 language code, with a title, a plain body and an HTML body. Nothing in the apps or web reads it, and staging holds only test rows.                                                                                                                                                                                                                                                                                                                                                                                              | BASE TABLE |
| [tPub\_NotifRepeatType](https://docs.snapfix.com/engineering-reference/db/tables/tpub_notifrepeattype.md)                                        | 3       | Repeat options for a notification. Empty on staging; only php-apis's generic table actions name it, and nothing calls them.                                                                                                                                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [tPub\_Onboard](https://docs.snapfix.com/engineering-reference/db/tables/tpub_onboard.md)                                                        | 3       | The membership states a person can have in a group (tPri\_UserBusiness.uuid\_tOnboard), New, Invited, Active, Inactive, Deleted and Ignored. The Laravel API, php-apis, apipy and the apps read it.                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPub\_SettingsDefault](https://docs.snapfix.com/engineering-reference/db/tables/tpub_settingsdefault.md)                                        | 9       | The one row of default group settings (auto-logout, update prompts, red dot alert, list and tag limits). Only php-apis's uncalled save\_new\_business copies it into a new group; the group creation in use sets its own values.                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [tPub\_Status](https://docs.snapfix.com/engineering-reference/db/tables/tpub_status.md)                                                          | 4       | Default task statuses, Red, Amber and Green, plus test rows. Only php-apis's uncalled save\_new\_business copies them into a new group; the group creation in use sets Red, Amber and Green itself.                                                                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [tPub\_StatusSub](https://docs.snapfix.com/engineering-reference/db/tables/tpub_statussub.md)                                                    | 4       | Default sub-statuses, New, In Progress and Closed, plus test rows. Only php-apis's uncalled save\_new\_business copies them into a new group.                                                                                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [tPub\_TagDefault](https://docs.snapfix.com/engineering-reference/db/tables/tpub_tagdefault.md)                                                  | 4       | Default tags, each under a default tag folder (uuid\_tTagHeaderDefault). php-apis's copy into new groups is commented out \[[ASK-252](https://github.com/snapfix/docs/blob/main/ASK.md#ask-252-should-new-groups-start-with-the-default-tag-folders)].                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tPub\_TagHeaderDefault](https://docs.snapfix.com/engineering-reference/db/tables/tpub_tagheaderdefault.md)                                      | 4       | Default tag folders, Location, Equipment and Category. php-apis's copy into new groups is commented out \[[ASK-252](https://github.com/snapfix/docs/blob/main/ASK.md#ask-252-should-new-groups-start-with-the-default-tag-folders)].                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tPub\_UserType](https://docs.snapfix.com/engineering-reference/db/tables/tpub_usertype.md)                                                      | 3       | The group roles, Admin and User (tPri\_UserBusiness.uuid\_tUserType). php-apis looks the Admin row up by name, and the apps, apipy and the Laravel API read it.                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tServerOnly\_Comm](https://docs.snapfix.com/engineering-reference/db/tables/tserveronly_comm.md)                                                | 16      | One email the server sent to a person (a forgot-password, invite or task calendar message), with recipient, subject, body, calendar event fields and send result.                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tServerOnly\_DeviceUserToken](https://docs.snapfix.com/engineering-reference/db/tables/tserveronly_deviceusertoken.md)                          | 13      | A person's sign-in on a device, with device details, login and logout times and fLoggedOn while signed in. Only php-apis's generic table actions write it, nothing calls them, and staging has one row.                                                                                                                                                                                                                                                                                                                                                                   | BASE TABLE |
| [tServerOnly\_EmailEvent](https://docs.snapfix.com/engineering-reference/db/tables/tserveronly_emailevent.md)                                    | 4       | An email-sent flag for a person (uuid\_tUser, fEmailSent). Only php-apis's generic table actions name it, nothing calls them, and staging has one row.                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [tUserAddedToBusiness\_DeviceUuid](https://docs.snapfix.com/engineering-reference/db/tables/tuseraddedtobusiness_deviceuuid.md)                  | 5       | The device UUID recorded when a person is added to a group (uuid\_tUserBusiness), with the server time. php-apis checks for an existing row before it inserts one, and no row is newer than 2022-05.                                                                                                                                                                                                                                                                                                                                                                      | BASE TABLE |
| [tag](https://docs.snapfix.com/engineering-reference/db/tables/tag.md)                                                                           | 20      | An image-analysis record (image URL and JSON per analysis type, as in tag\_vision). No in-scope code refers to it; staging holds one row \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                        | BASE TABLE |
| [tag\_vision](https://docs.snapfix.com/engineering-reference/db/tables/tag_vision.md)                                                            | 16      | Unused. Image-analysis results per image (image URL and JSON per analysis type); no rows on staging and no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [tag\_vision\_job](https://docs.snapfix.com/engineering-reference/db/tables/tag_vision_job.md)                                                   | 10      | Unused. Links one image analysis (tag\_vision) to one task; no rows on staging and only its migration names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                  | BASE TABLE |
| [tbl\_email\_logs](https://docs.snapfix.com/engineering-reference/db/tables/tbl_email_logs.md)                                                   | 20      | One Amazon SES event for one outgoing email; apipy's communication log writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | BASE TABLE |
| [tbl\_sms\_logs](https://docs.snapfix.com/engineering-reference/db/tables/tbl_sms_logs.md)                                                       | 13      | One SMS sent through AWS SNS or Twilio, with recipient, delivery status, carrier and cost in USD; apipy's communication log writes it.                                                                                                                                                                                                                                                                                                                                                                                                                                    | BASE TABLE |
| [temp\_adrian\_todo\_data](https://docs.snapfix.com/engineering-reference/db/tables/temp_adrian_todo_data.md)                                    | 4       | One-off export of task rows (account and group names, task title, checklist count); no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                               | BASE TABLE |
| [temp\_adrian\_todo\_data2](https://docs.snapfix.com/engineering-reference/db/tables/temp_adrian_todo_data2.md)                                  | 5       | One-off export of task rows (account name and type, group name, task title, checklist count); no in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [temp\_adrian\_todo\_data3](https://docs.snapfix.com/engineering-reference/db/tables/temp_adrian_todo_data3.md)                                  | 8       | A one-off scratch copy of task rows: account and group IDs and names, the task title and its checklist count. No in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                     | BASE TABLE |
| [temp\_adrian\_todo\_data4](https://docs.snapfix.com/engineering-reference/db/tables/temp_adrian_todo_data4.md)                                  | 9       | A one-off scratch copy of task rows like temp\_adrian\_todo\_data3, with the task ID added. No in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                       | BASE TABLE |
| [temp\_adrian\_todo\_data5](https://docs.snapfix.com/engineering-reference/db/tables/temp_adrian_todo_data5.md)                                  | 12      | A one-off scratch copy of task rows like temp\_adrian\_todo\_data4, with the planned flag, task type and origin added. No in-scope code refers to it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                            | BASE TABLE |
| [throttling\_rules](https://docs.snapfix.com/engineering-reference/db/tables/throttling_rules.md)                                                | 14      | One rate limit for a route and app version: the calls allowed within a time span. The Laravel API's rate limiter applies the active rules only while throttling is switched on; the newest row is from 2025-01.                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |
| [time\_tPri\_Parent](https://docs.snapfix.com/engineering-reference/db/tables/time_tpri_parent.md)                                               | 15      | A snapshot of a site's customer type and billing dates, written by php-apis and the Laravel API when they change; php-apis's Looker report code reads it.                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [token\_jwt](https://docs.snapfix.com/engineering-reference/db/tables/token_jwt.md)                                                              | 18      | One sign-in token issued by authpy to a user on a device: its ID, type, times, claims and blocked flag; the token string itself is not stored. php-apis reads it to reject blocked tokens.                                                                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [unittest](https://docs.snapfix.com/engineering-reference/db/tables/unittest.md)                                                                 | 10      | A leftover test table with one text, one JSON and one integer column; no in-scope code names it \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [url\_job\_token](https://docs.snapfix.com/engineering-reference/db/tables/url_job_token.md)                                                     | 15      | A share link to one task (uuid\_tJob) that opens it read-only until it expires. The Laravel task sharing, the QR form backend (authpy) and php-apis create them.                                                                                                                                                                                                                                                                                                                                                                                                          | BASE TABLE |
| [user\_blacklist](https://docs.snapfix.com/engineering-reference/db/tables/user_blacklist.md)                                                    | 8       | A blocked username and mobile number; only its migration names it, and no row is newer than 2022-03 \[[ASK-242](https://github.com/snapfix/docs/blob/main/ASK.md#ask-242-can-the-unused-copy-and-scratch-tables-be-dropped)].                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [wallboard\_instance](https://docs.snapfix.com/engineering-reference/db/tables/wallboard_instance.md)                                            | 28      | One wallboard display setup for a group, with headings, time-out and time-in messages, logos, a representative's name and title, and an expiry. php-apis's wallboard actions create it, nothing calls them, and no row is newer than 2023-08.                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [xero\_contacts](https://docs.snapfix.com/engineering-reference/db/tables/xero_contacts.md)                                                      | 82      | One contact copied from Xero, with names, addresses, phone numbers and bank details, as text. apipy's Xero routes list it (nothing calls them), no in-scope code writes it, and no row is newer than 2022-05.                                                                                                                                                                                                                                                                                                                                                             | BASE TABLE |
| [xero\_contacts\_parent](https://docs.snapfix.com/engineering-reference/db/tables/xero_contacts_parent.md)                                       | 10      | Links a site (uuid\_tParent) to a Xero contact (uuid\_xero\_contacts). apipy's link route writes it (nothing calls it), and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                                                                                                 | BASE TABLE |
| [xero\_sales\_invoices](https://docs.snapfix.com/engineering-reference/db/tables/xero_sales_invoices.md)                                         | 36      | One sales invoice copied from Xero, with number, contact, status and totals; the dates are datetimes and the rest is text. apipy's Xero routes list it (nothing calls them), no in-scope code writes it, and no row is newer than 2022-06.                                                                                                                                                                                                                                                                                                                                | BASE TABLE |
| [xero\_sales\_invoices\_parent](https://docs.snapfix.com/engineering-reference/db/tables/xero_sales_invoices_parent.md)                          | 10      | Links a site to a Xero sales invoice. apipy's link route writes it (nothing calls it), and staging has no rows.                                                                                                                                                                                                                                                                                                                                                                                                                                                           | BASE TABLE |

## Stored procedures and functions

| Name                               | ReturnType | Arguments                        | Type      |
| ---------------------------------- | ---------- | -------------------------------- | --------- |
| cg\_customer                       |            |                                  | PROCEDURE |
| Create\_apilog\_TablesBetweenDates |            | start\_date date; end\_date date | PROCEDURE |
| Drop\_apilog\_TablesBetweenDates   |            | start\_date date; end\_date date | PROCEDURE |

***

> Generated by [tbls](https://github.com/k1LoW/tbls)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.snapfix.com/engineering-reference/db/tables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
