create table legal_documents (
  id bigserial primary key,
  doc_type varchar(64) not null,
  version varchar(64) not null,
  title varchar(200) not null,
  content_md text not null,
  updated_by bigint references users(id),
  updated_at timestamptz not null default now(),
  unique(doc_type)
);

create index idx_legal_documents_type on legal_documents(doc_type);
