CREATE TABLE "demo_batches" (
    "id" UUID NOT NULL,
    "label" VARCHAR(100) NOT NULL DEFAULT 'ДЕМО',
    "entity_ids" JSONB NOT NULL,
    "summary" JSONB,
    "created_by_id" UUID,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

    CONSTRAINT "demo_batches_pkey" PRIMARY KEY ("id")
);

ALTER TABLE "demo_batches" ADD CONSTRAINT "demo_batches_created_by_id_fkey"
  FOREIGN KEY ("created_by_id") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
