Marantesss / glass-base

MIT License
0 stars 0 forks source link

Create contract types migrations and clense values with <br/> #7

Open Marantesss opened 3 years ago

Marantesss commented 3 years ago

These values are an "array" (separated by <br/>) of specific strings (probably from a multiselect form input).

Example:

Aquisição de bens móveis<br/>Aquisição de serviços

Aquisição de bens móveis and Aquisição de serviços are options that show up on other contracts.

So instead of storing this information as a string, it would be a better option to create an enum/table contractType with all possible contract types. And a relation table contractContractType with contractId and type (enum value).

About Enums in PGSQL 13: https://www.postgresql.org/docs/13/datatype-enum.html About Altering Enums Values in PGSQL 13: https://www.postgresql.org/docs/13/sql-altertype.html