ALTER TABLE
    food
ADD COLUMN
    -- per 100g
    protein REAL NOT NULL DEFAULT 5.0 CHECK (protein > 0);

ALTER TABLE
    food
ADD COLUMN
    -- per 100g
    fiber REAL NOT NULL DEFAULT 5.0 CHECK (fiber > 0);

ALTER TABLE
    food
ADD COLUMN
    protein_per_portion REAL NOT NULL GENERATED ALWAYS AS ((protein / 100) * portion_weight) VIRTUAL;

ALTER TABLE
    food
ADD COLUMN
    fiber_per_portion REAL NOT NULL GENERATED ALWAYS AS ((fiber / 100) * portion_weight) VIRTUAL;

PRAGMA user_version = 2;
