--- licenses

create table licenses (
    id bigint primary key,
    current boolean not null,
    key varchar not null,

    created_at timestamptz not null,
    updated_at timestamptz not null
);

create sequence licenses_id_seq;

create unique index licenses_current_uniq
on licenses(id) where current = true;
