Skip to content

AlterTableAddColumns

Description

      description: |
        Add new columns to table `id` using SQL expressions or default values.

Request Schema

    AlterTableAddColumnsRequest:
      type: object
      required:
        - new_columns
      properties:
        id:
          type: array
          items:
            type: string
        new_columns:
          type: array
          items:
            $ref: '#/components/schemas/NewColumnTransform'
          description: List of new columns to add

Response Schema

    AlterTableAddColumnsResponse:
      type: object
      required:
        - version
      properties:
        version:
          type: integer
          format: int64
          minimum: 0
          description: Version of the table after adding columns

New Column Transform

    NewColumnTransform:
      type: object
      required:
        - name
        - expression
      properties:
        name:
          type: string
          description: Name of the new column
        expression:
          type: string
          description: SQL expression to compute the column value