# model_constraint
Model Constraint
This model tracks PostgreSQL foreign keys and constraints used by Odoo
models.
- Catalog: `Odoo`
- Schema: `ir`
The data in this table is partitioned per value of the column.
This is a read-only table. The Odoo API may not support changing the data or the Invantive SQL driver for Odoo does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Odoo API.
## Table Columns
The columns of the table `model_constraint` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `create_date` | `datetime` | Create Date | ☐ | |
| `create_uid_label` | `string` | | ☐ | |
| `create_uid` | `string` | | ☐ | |
| `definition` | `string` | Definition | ☐ | PostgreSQL constraint definition |
| `display_name` | `string` | Display Name | ☐ | |
| `id` | `int32` | ID | ☐ | |
| `message` | `string` | Message | ☐ | Error message returned when the constraint is violated. |
| `model_label` | `string` | | ☐ | |
| `model` | `string` | | ☐ | |
| `module_label` | `string` | | ☐ | |
| `module` | `string` | | ☐ | |
| `name` | `string` | Constraint | ☑ | PostgreSQL constraint or foreign key name. |
| `type` | `string` | Constraint Type | ☑ | Type of the constraint: `f` for a foreign key, `u` for other constraints. |
| `write_date` | `datetime` | Write Date | ☐ | |
| `write_uid_label` | `string` | | ☐ | |
| `write_uid` | `string` | | ☐ | |