feat(ingredients): make units nullable
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
-- Restoring NOT NULL fails if any ingredient still has a NULL unit_id. Assign a
|
||||
-- unit to those rows first:
|
||||
-- SELECT id, name FROM ingredients WHERE unit_id IS NULL;
|
||||
COMMENT ON COLUMN ingredients.unit_id IS NULL;
|
||||
|
||||
ALTER TABLE ingredients ALTER COLUMN unit_id SET NOT NULL;
|
||||
Reference in New Issue
Block a user