# organizations_labels

## Description

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

```sql
CREATE TABLE `organizations_labels` (
  `organization_label_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `organization_id` bigint(20) NOT NULL,
  `name` varchar(255) NOT NULL,
  `color` char(6) NOT NULL,
  PRIMARY KEY (`organization_label_id`),
  KEY `fk_organizations_labels_organization_id` (`organization_id`),
  CONSTRAINT `fk_organizations_labels_organization_id` FOREIGN KEY (`organization_id`) REFERENCES `organizations` (`organization_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
```

</details>

## Columns

| Name | Type | Default | Nullable | Extra Definition | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | ---------------- | -------- | ------- | ------- |
| organization_label_id | bigint(20) |  | false | auto_increment | [calendars_organizations_labels](calendars_organizations_labels.md) |  |  |
| organization_id | bigint(20) |  | false |  |  | [organizations](organizations.md) |  |
| name | varchar(255) |  | false |  |  |  |  |
| color | char(6) |  | false |  |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| fk_organizations_labels_organization_id | FOREIGN KEY | FOREIGN KEY (organization_id) REFERENCES organizations (organization_id) |
| PRIMARY | PRIMARY KEY | PRIMARY KEY (organization_label_id) |

## Indexes

| Name | Definition |
| ---- | ---------- |
| fk_organizations_labels_organization_id | KEY fk_organizations_labels_organization_id (organization_id) USING BTREE |
| PRIMARY | PRIMARY KEY (organization_label_id) USING BTREE |

## Relations

![er](organizations_labels.svg)

---

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