/**
 * @author pminot
 * @date 18/02/2022
 * @version 1.0.0
 * @project SIEau
 * @table agri_tour_eau, agri_restrictions
 */
# --- !Ups
drop table if exists agri_tour_eau;
create table agri_tour_eau
(
    id                        bigint                   not null,
    codeexploitation          bigint                   not null,
    codeinstallation          bigint                   not null,
    idmateriel                bigint                   not null,
    jour1                     varchar(24),
    jour2                     varchar(24),
    jour3                     varchar(24),
    jour4                     varchar(24),
    jour5                     varchar(24),
    jour6                     varchar(24),
    jour7                     varchar(24),
    commentaire               text
);
create unique index agri_tour_eau_id_idx
    on agri_tour_eau (id);
drop table if exists agri_restrictions;
create table agri_restrictions
(
    id                        integer                   not null,
    niveau                    integer                   not null,
    libelle                   varchar(100),
    description               text,
    commentaire               text,
    couleur                   varchar(7)
);
create unique index agri_restrictions_id_idx
    on agri_restrictions (id);
# --- !Downs