# abacus_state_history

## Description

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

```sql
CREATE TABLE `abacus_state_history` (
  `abacus_state_history_id` mediumint unsigned NOT NULL AUTO_INCREMENT,
  `abacus_state_id` mediumint unsigned NOT NULL,
  `parent_table_id` mediumint unsigned NOT NULL,
  `parent_table_name` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `action_name` varchar(32) COLLATE utf8mb4_general_ci NOT NULL,
  `action_status` enum('init','running','error','complete','approved','rejected') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'init',
  `message` varchar(180) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `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,
  PRIMARY KEY (`abacus_state_history_id`),
  KEY `fk_abacus_state_history` (`abacus_state_id`),
  CONSTRAINT `fk_abacus_state_history` FOREIGN KEY (`abacus_state_id`) REFERENCES `abacus_state` (`abacus_state_id`) ON DELETE CASCADE ON UPDATE CASCADE
) 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 |
| ----------------------- | --------------------------------------------------------------- | ------- | -------- | ---------------- | -------- | ------------------------------- | ------- |
| abacus_state_history_id | mediumint unsigned                                              |         | false    | auto_increment   |          |                                 |         |
| abacus_state_id         | mediumint unsigned                                              |         | false    |                  |          | [abacus_state](abacus_state.md) |         |
| action_name             | varchar(32)                                                     |         | false    |                  |          |                                 |         |
| action_status           | enum('init','running','error','complete','approved','rejected') | init    | false    |                  |          |                                 |         |
| created_at              | datetime                                                        |         | false    |                  |          |                                 |         |
| created_by              | varchar(255)                                                    |         | false    |                  |          |                                 |         |
| last_modified           | datetime                                                        |         | false    |                  |          |                                 |         |
| last_modified_by        | varchar(255)                                                    |         | false    |                  |          |                                 |         |
| message                 | varchar(180)                                                    |         | true     |                  |          |                                 |         |
| parent_table_id         | mediumint unsigned                                              |         | false    |                  |          |                                 |         |
| parent_table_name       | varchar(64)                                                     |         | true     |                  |          |                                 |         |

## Constraints

| Name                    | Type        | Definition                                                              |
| ----------------------- | ----------- | ----------------------------------------------------------------------- |
| PRIMARY                 | PRIMARY KEY | PRIMARY KEY (abacus_state_history_id)                                   |
| fk_abacus_state_history | FOREIGN KEY | FOREIGN KEY (abacus_state_id) REFERENCES abacus_state (abacus_state_id) |

## Indexes

| Name                    | Definition                                                |
| ----------------------- | --------------------------------------------------------- |
| PRIMARY                 | PRIMARY KEY (abacus_state_history_id) USING BTREE         |
| fk_abacus_state_history | KEY fk_abacus_state_history (abacus_state_id) USING BTREE |

## Relations

![er](abacus_state_history.svg)

---

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