how do i create an enum in dbdiagram.io? what uses does it have?
Hi susana_gomez_prada,
Enum
allows users to define different values of a particular column.
Here is an example:
// enum belonged to default "public" schema
enum job_status {
created [note: 'Waiting to be processed']
running
done
failure
}
// enum belonged to a schema
enum v2.job_status {
...
}
Table jobs {
id integer
status job_status
status_v2 v2.job_status
}
You can read the documentation here: DBML - Full Syntax Docs | DBML
Thank you for question!