\echo query

create table query
(
    id                             integer    primary key generated always as identity,
    query_file                     varchar(256),
    run_frequency                  varchar(16),
    connection_id                  integer,
    last_elapsed_time              integer,
    last_run_date                  date,
    created_at                     timestamp  default now(),
    updated_at                     timestamp,
    constraint foreign_key_query_to_connection foreign key (connection_id) references connection(id)
);


alter table query owner to developer;
