create table fsm.statechart ( id bigint not null generated by default as identity ( start with 1 cache 32767 ) primary key, created_at timestamptz not null default now(), name text not null, version fsm.semver not null, constraint name_must_be_within_bounds check (char_length(name) >= 1 and char_length(name) <= 200) ); create unique index idx_unique_name_version on fsm.statechart(name, version); comment on table fsm.statechart is 'All the different statecharts and their versions.';