Remove useless check
This commit is contained in:
parent
f228486c5a
commit
d9bdb32419
1 changed files with 4 additions and 11 deletions
|
|
@ -257,7 +257,9 @@ CREATE TABLE [ShoppingEntry] (
|
|||
-- In both cases [name], [quantity_value], [quantity_unit] and [Servings] are used to display
|
||||
-- the entry instead of [Ingredient] data.
|
||||
[ingredient_id] INTEGER,
|
||||
[recipe_scheduled_id] INTEGER, -- Can be null when manually added.
|
||||
|
||||
-- Can be null when manually added (entry is not linked to a recipe).
|
||||
[recipe_scheduled_id] INTEGER,
|
||||
|
||||
[is_checked] INTEGER NOT NULL DEFAULT FALSE,
|
||||
|
||||
|
|
@ -269,16 +271,7 @@ CREATE TABLE [ShoppingEntry] (
|
|||
|
||||
CHECK (
|
||||
length([name]) <= 255 AND
|
||||
([is_checked] = TRUE OR [is_checked] = FALSE) AND
|
||||
(
|
||||
[recipe_scheduled_id] IS NULL OR
|
||||
(
|
||||
[name] = '' AND
|
||||
[quantity_value] IS NULL AND
|
||||
[quantity_unit] = '' AND
|
||||
[servings] IS NULL
|
||||
)
|
||||
)
|
||||
([is_checked] = TRUE OR [is_checked] = FALSE)
|
||||
),
|
||||
|
||||
FOREIGN KEY([user_id]) REFERENCES [User]([id]) ON DELETE CASCADE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue