create table schedules
(
    template_id    bigint primary key references templates (id) on update cascade on delete cascade,
    last_start     timestamptz,
    scheduled_time timestamptz,
    config         jsonb   not null default '{}'::jsonb,
    is_expired     boolean not null default false,
    is_enabled     boolean not null default false,
    updated_at     timestamptz not null default now()
);
