\echo column_profile

create table column_profile
(
    id                                      integer    primary key generated always as identity,
    table_profile_id                        integer,
    date_time_statistics_collected          timestamp ,
    column_name                             varchar(255),
    data_type                               varchar(255),
    data_length                             integer,
    null_count                              integer,
    unique_value_count                      integer,
    min_number                              double precision,
    min_date                                timestamp ,
    min_string                              varchar(255),
    max_number                              double precision,
    max_date                                timestamp,
    max_string                              varchar(255),
    nullable                                boolean,
    max_length                              integer,
    created_at                              timestamp  default now(),
    updated_at                              timestamp ,
    constraint foreign_key_column_profile_to_table_profile foreign key (table_profile_id) references table_profile(id)
);

alter table column_profile owner to developer;
