create table if not exists board_posts (
  id serial primary key,
  title varchar(200) not null,
  content text not null,
  attachments_json text not null default '[]',
  automation_plan_item_id integer null,
  automation_received_at timestamptz null,
  created_at timestamptz not null default now(),
  updated_at timestamptz not null default now()
);

create index if not exists idx_board_posts_updated_at
  on board_posts (updated_at desc);
