CREATE SCHEMA Stats;

CREATE TABLE Stats.WeightLog (
    id SERIAL PRIMARY KEY,
    userId INT NOT NULL REFERENCES Accounts.Users(id),
    value DECIMAL NOT NULL,
    recordedTs TIMESTAMP NOT NULL DEFAULT NOW()
);

CREATE INDEX weightlog_userId ON stats.weightlog USING btree (userId);

