# History

Histories of `plan`, `case` and other models. Audit logs are stored in the database.

## How to generate the history table

1. Run [gen_history_table.sh](./gen_history_table.sh), e.g. Generate the `case_histories` table:

    ```sh
    ./gen_history_table.sh "case"
    ```

2. Add the generated table to the `db/migrations/` and `db/schema.sql`:
