CREATE TABLE IF NOT EXISTS order_comments (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  order_id UUID NOT NULL REFERENCES orders(id) ON DELETE CASCADE,
  author TEXT NOT NULL,
  body TEXT NOT NULL,
  created_at TIMESTAMPTZ DEFAULT now()
);

ALTER TABLE order_comments ENABLE ROW LEVEL SECURITY;
CREATE POLICY "auth_all" ON order_comments FOR ALL TO authenticated USING (true) WITH CHECK (true);
