diff --git a/src/main/java/com/backend/model/entities/Dish.java b/src/main/java/com/backend/model/entities/Dish.java index 518cfd8..5cce490 100644 --- a/src/main/java/com/backend/model/entities/Dish.java +++ b/src/main/java/com/backend/model/entities/Dish.java @@ -56,6 +56,6 @@ public enum Category { } public enum Allergens { - NUTS, GLUTEN, MEAT, LACTOSE + NUTS, GLUTEN, MEAT, LACTOSE, SESAME } } diff --git a/src/main/resources/db/migration/V3__sesame_allergen.sql b/src/main/resources/db/migration/V3__sesame_allergen.sql new file mode 100644 index 0000000..098907c --- /dev/null +++ b/src/main/resources/db/migration/V3__sesame_allergen.sql @@ -0,0 +1,6 @@ +ALTER TABLE dish_allergens + DROP CONSTRAINT IF EXISTS dish_allergens_allergen_check; + +ALTER TABLE dish_allergens + ADD CONSTRAINT dish_allergens_allergen_check + CHECK (allergen IN ('NUTS', 'GLUTEN', 'MEAT', 'LACTOSE', 'SESAME')); \ No newline at end of file