# contract_term_history

## Description

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

```sql
CREATE TABLE `contract_term_history` (
  `contract_term_history_id` mediumint unsigned NOT NULL AUTO_INCREMENT,
  `contract_term_id` mediumint unsigned NOT NULL,
  `contract_id` mediumint unsigned NOT NULL,
  `contract_term_name` varchar(180) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `term_type` enum('artist','catalog','contribution','label','product','track','contributor_schedule','contribution_schedule') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'label',
  `attachments` json DEFAULT NULL,
  `attachments_relations` json DEFAULT NULL,
  `is_base_term` tinyint(1) NOT NULL DEFAULT '1',
  `created_by` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL,
  `last_modified_by` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `last_modified` datetime NOT NULL,
  `deleted_by` varchar(180) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  PRIMARY KEY (`contract_term_history_id`)
) ENGINE=InnoDB AUTO_INCREMENT=[Redacted by tbls] DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
```

</details>

## Columns

| Name                     | Type                                                                                                             | Default | Nullable | Extra Definition | Children | Parents                           | Comment |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- | ------- | -------- | ---------------- | -------- | --------------------------------- | ------- |
| attachments              | json                                                                                                             |         | true     |                  |          |                                   |         |
| attachments_relations    | json                                                                                                             |         | true     |                  |          |                                   |         |
| contract_id              | mediumint unsigned                                                                                               |         | false    |                  |          | [contract](contract.md)           |         |
| contract_term_history_id | mediumint unsigned                                                                                               |         | false    | auto_increment   |          |                                   |         |
| contract_term_id         | mediumint unsigned                                                                                               |         | false    |                  |          | [contract_term](contract_term.md) |         |
| contract_term_name       | varchar(180)                                                                                                     |         | true     |                  |          |                                   |         |
| created_at               | datetime                                                                                                         |         | false    |                  |          |                                   |         |
| created_by               | varchar(255)                                                                                                     |         | false    |                  |          |                                   |         |
| deleted_at               | datetime                                                                                                         |         | true     |                  |          |                                   |         |
| deleted_by               | varchar(180)                                                                                                     |         | true     |                  |          |                                   |         |
| is_base_term             | tinyint(1)                                                                                                       | 1       | false    |                  |          |                                   |         |
| last_modified            | datetime                                                                                                         |         | false    |                  |          |                                   |         |
| last_modified_by         | varchar(255)                                                                                                     |         | false    |                  |          |                                   |         |
| term_type                | enum('artist','catalog','contribution','label','product','track','contributor_schedule','contribution_schedule') | label   | false    |                  |          |                                   |         |

## Constraints

| Name    | Type        | Definition                             |
| ------- | ----------- | -------------------------------------- |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (contract_term_history_id) |

## Indexes

| Name    | Definition                                         |
| ------- | -------------------------------------------------- |
| PRIMARY | PRIMARY KEY (contract_term_history_id) USING BTREE |

## Relations

![er](contract_term_history.svg)

---

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