ai-cfia / ai-cfia/ailab-datastore

As a dev, I want to simplify the usage of `sub_type` in `fertiscan`

Aberta
#163 5 comentários 0 reações 1 responsável Reivindicada por @Francois-Werbrouck Ver no GitHub
Linguagem predominante
Python
Estrelas
3
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Description

**Context**
Currently, the `sub_type` table is defined with fields `type_fr` and `type_en` as unique text columns. However, we never actually use `type_fr` in practice. The `sub_type` is being used more like an enum. After schema creation, we have to perform separate `sub_type` inserts to populate this table, which is necessary for the database design to be usable.

![Image](https://github.com/user-attachments/assets/2d05d1e3-9b69-46ce-8ead-f3b35b9f3b02)

**Problem Statement**
The need to perform separate `sub_type` inserts after schema creation adds unnecessary complexity to our setup and deployment processes. This approach has several drawbacks:

- **Increased Setup Complexity**: Additional scripts or manual steps are required to insert initial data, which can be error-prone.
- **Deployment Challenges**: Ensuring that the inserts run in the correct order and environment adds overhead.
- **Maintenance Overhead**: Keeping track of initial data inserts complicates version control and collaboration.

By using an enum instead of a table for `sub_type`, we can simplify the schema and eliminate the need for post-creation data inserts.

## Acceptance Criteria
- Evaluate the feasibility and benefits of replacing the `sub_type` table with an enum.
- Implement the enum to replace the `sub_type` table if it leads to simplification.
- Remove the need for separate `sub_type` inserts after schema creation.
- Ensure that existing functionality dependent on `sub_type` remains unaffected.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.