> 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/ai_task_insight_sync_checkpoint.md).

# ai\_task\_insight\_sync\_checkpoint

{% 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/ai_task_insight_sync_checkpoint.md).
{% endhint %}

## Description

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.

<details>

<summary><strong>Table Definition</strong></summary>

```sql
CREATE TABLE `ai_task_insight_sync_checkpoint` (
  `uuid_tParent` varchar(64) NOT NULL DEFAULT '' COMMENT 'Empty for per-business checkpoints; else parent uuid for parent-mode watermark row',
  `uuid_tBusiness` varchar(64) NOT NULL,
  `last_job_f_modified_ts` datetime(6) DEFAULT NULL COMMENT 'Business mode: COALESCE(fModified,fCreated) watermark on tPri_Job',
  `last_job_f_created_ts` datetime(6) DEFAULT NULL COMMENT 'Parent mode: max fCreatedTs processed for jobs under that parent',
  `last_sync_completed_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`uuid_tParent`,`uuid_tBusiness`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
```

</details>

## Columns

| Name                       | Type        | Default            | Nullable | Extra Definition                                | Comment                                                                            |
| -------------------------- | ----------- | ------------------ | -------- | ----------------------------------------------- | ---------------------------------------------------------------------------------- |
| uuid\_tParent              | varchar(64) |                    | false    |                                                 | Empty for per-business checkpoints; else parent uuid for parent-mode watermark row |
| uuid\_tBusiness            | varchar(64) |                    | false    |                                                 |                                                                                    |
| last\_job\_f\_modified\_ts | datetime(6) |                    | true     |                                                 | Business mode: COALESCE(fModified,fCreated) watermark on tPri\_Job                 |
| last\_job\_f\_created\_ts  | datetime(6) |                    | true     |                                                 | Parent mode: max fCreatedTs processed for jobs under that parent                   |
| last\_sync\_completed\_at  | datetime    | CURRENT\_TIMESTAMP | false    | DEFAULT\_GENERATED on update CURRENT\_TIMESTAMP |                                                                                    |

## Viewpoints

| Name                                                                           | Definition                                                                                                                                             |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [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. |

## Constraints

| Name    | Type        | Definition                                   |
| ------- | ----------- | -------------------------------------------- |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (uuid\_tParent, uuid\_tBusiness) |

## Indexes

| Name    | Definition                                               |
| ------- | -------------------------------------------------------- |
| PRIMARY | PRIMARY KEY (uuid\_tParent, uuid\_tBusiness) USING BTREE |

## Relations

```mermaid
erDiagram


"ai_task_insight_sync_checkpoint" {
  varchar_64_ uuid_tParent PK
  varchar_64_ uuid_tBusiness PK
}
```

***

> 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/ai_task_insight_sync_checkpoint.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.
