-- Table definitions

create domain dialogue_package_id as
    varchar(32) not null;

create domain dialogue_id as
    varchar(64) not null;


create table dialogue_packages (
    id dialogue_package_id primary key,
    comment text not null
);

create table dialogues (
    id dialogue_id primary key,
    package dialogue_package_id,
    comment text not null,
    ctx json not null,

    foreign key (package) references dialogue_packages (id)
);

