\echo measure

create table measure
(
    id                              integer    primary key generated always as identity,
    factor_id                       integer,
    run_date                        date,
    value                           integer,
    status                          varchar(8),
    ignore                          boolean default false,
    created_at                      timestamp  default now(),
    updated_at                      timestamp,
    constraint foreign_key_measure_to_factor foreign key (factor_id) references factor(id)
);


alter table measure owner to developer;
