fac19 / week5-EIJO

Recipes database app
https://cookvid-19.herokuapp.com/
0 stars 2 forks source link

Enum types #53

Open oliverjam opened 4 years ago

oliverjam commented 4 years ago

Something I just thought of during your presentation: Postgres supports a data type called "enum". This is like a list of allowed possible values. You could use that for your type value to ensure it can only be "breakfast", "lunch", "dinner" etc

https://www.postgresql.org/docs/9.1/datatype-enum.html