> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oktolabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Post Migrate Schema

> Force-apply schema migrations for a board (idempotent).

Use when consolidation fails with `Binder exception: Cannot find
property X for n` — usually means an ALTER ADD migration was missed
for a board bootstrapped before that schema column was introduced.

Re-runs all v0.3.x ALTER TABLE ADD on every node type. Idempotent:
calling on a board already migrated returns ``migrated=true`` with
``columns_added`` empty (no-op).

Spec 818748f2.



## OpenAPI

````yaml /openapi.json post /api/v1/kg/{board_id}/migrate-schema
openapi: 3.1.0
info:
  description: >-
    Okto Pulse REST API schema generated from okto-pulse-core 0.2.0 source for
    docs.oktolabs.ai.
  title: Okto Pulse
  version: 0.2.0
servers: []
security: []
paths:
  /api/v1/kg/{board_id}/migrate-schema:
    post:
      tags:
        - knowledge-graph
        - knowledge-graph
      summary: Post Migrate Schema
      description: |-
        Force-apply schema migrations for a board (idempotent).

        Use when consolidation fails with `Binder exception: Cannot find
        property X for n` — usually means an ALTER ADD migration was missed
        for a board bootstrapped before that schema column was introduced.

        Re-runs all v0.3.x ALTER TABLE ADD on every node type. Idempotent:
        calling on a board already migrated returns ``migrated=true`` with
        ``columns_added`` empty (no-op).

        Spec 818748f2.
      operationId: post_migrate_schema_api_v1_kg__board_id__migrate_schema_post
      parameters:
        - in: path
          name: board_id
          required: true
          schema:
            title: Board Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrateSchemaResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    MigrateSchemaResponse:
      properties:
        board_id:
          title: Board Id
          type: string
        columns_added:
          additionalProperties:
            items:
              type: string
            type: array
          description: Per-node-type list of columns ALTER ADDed this run.
          title: Columns Added
          type: object
        duration_ms:
          title: Duration Ms
          type: integer
        errors:
          description: Non-fatal warnings collected during migration.
          items:
            type: string
          title: Errors
          type: array
        migrated:
          description: True if the migration completed without errors.
          title: Migrated
          type: boolean
      required:
        - board_id
        - migrated
        - duration_ms
      title: MigrateSchemaResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````