CREATE TABLE spendings ( id BIGSERIAL PRIMARY KEY, price INT NOT NULL, created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP, user_id BIGINT NOT NULL, CONSTRAINT user_id_fk FOREIGN KEY (user_id) REFERENCES users(id) );