> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ticket_attachment table

> This table connects an attachment to a message. It references the entry in the attachment table, and the message.

## ticket\_attachment Table (256)

This table connects an attachment to a message. It references the entry in the attachment table, and the message.

## Fields

| Name           | Description                                                | Type                               | Nullable |
| -------------- | ---------------------------------------------------------- | ---------------------------------- | :------: |
| id             | The primary key (auto-incremented)                         | PK                                 |    No    |
| attachment\_id | The attachment.id this reference is connected to.          | FK [attachment](./attachment.mdx)  |    Yes   |
| message\_id    | The message.id this reference is connected to.             | FK [ej\_message](./ej-message.mdx) |    No    |
| content\_id    | The content\_id of this attachment, used for inline images | String(255)                        |    Yes   |
| inline\_image  | True if this attachment is inlined in the html\_body.      | Bool                               |    No    |

<img src="https://mintcdn.com/superofficeas/8-OIGQQJR0VGDXy_/media/loc/en/database/tables/ticket_attachment.png?fit=max&auto=format&n=8-OIGQQJR0VGDXy_&q=85&s=7d1b7f0192eabf0636110ae689a84b8d" alt="ticket_attachment table relationship diagram" width="731" height="59" data-path="media/loc/en/database/tables/ticket_attachment.png" />

## Indexes

| Fields         | Types | Description |
| -------------- | ----- | ----------- |
| attachment\_id | FK    | Index       |
| message\_id    | FK    | Index       |

## Relationships

| Table                       | Description                                                                                                                                                   |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [attachment](./attachment)  | This table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table. |
| [ej\_message](./ej-message) | This table contains the messages listed under tickets.                                                                                                        |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [attachment table](/en/database/tables/attachment.md)
- [Get Ticket Attachments](/en/api/reference/restful/agent/ticket_agent/get-ticket-attachments.md)
- [ticket table](/en/database/tables/ticket.md)
- [attachment_location table](/en/database/tables/attachment-location.md)
- [kb_attachment table](/en/database/tables/kb-attachment.md)
