Development Branches

List table changes in a development branch

Lists the tables of a Development Branch whose schema differs from production: tables that are new in the branch, and tables whose columns, column types, primary key or column order changed. The branch is compared with production (the default branch) as it is now, not as it was when a table was pulled into the branch, so a column added in production after the pull is reported as removed in the branch.

Tables are matched by ID and columns by name, byte for byte, so a column whose name differs only in case is reported as removed and added. A column type change is a change of type, length or nullable. The column order counts as changed when a column present on both sides moved; columns appended at the end of the branch table do not count. Tables whose schema is equal on both sides are omitted, and so are tables that cannot be compared: tables of linked, external or read-only buckets, aliases, and tables whose production bucket the token cannot read. Entries are ordered by table ID.

changeType is new or modified. deleted is reserved for a later version and never returned by this one.

Only available in development branches of projects with branched storage.

get/v2/storage/branch/{branchId}/changes/tables

Request

Path parameters

branchIdstring required

ID of the development branch. default resolves to the default branch, which is rejected with 400 (storage.tables.changesNotAvailableOnDefaultBranch).

Response

Tables that are new or modified in the branch.

Example response

{
  "tables": [
    {
      "id": "in.c-sales.products",
      "bucket": {
        "id": "in.c-sales",
        "name": "c-sales",
        "displayName": "sales"
      },
      "columns": [
        {
          "name": "tax_rate",
          "definition": {
            "type": "NUMBER",
            "length": "10,2"
          }
        }
      ],
      "changes": {
        "addedColumns": [
          {
            "name": "tax_rate",
            "definition": {
              "type": "NUMBER",
              "length": "10,2"
            }
          }
        ],
        "removedColumns": [
          {
            "name": "tax_rate",
            "definition": {
              "type": "NUMBER",
              "length": "10,2"
            }
          }
        ],
        "typeChangedColumns": [
          {
            "production": {
              "type": "NUMBER",
              "length": "10,2"
            },
            "branch": {
              "type": "NUMBER",
              "length": "10,2"
            }
          }
        ],
        "columnOrder": {
          "production": [
            "id",
            "name",
            "sku",
            "old_price",
            "amount",
            "category"
          ],
          "branch": [
            "id",
            "sku",
            "name",
            "amount",
            "category",
            "tax_rate"
          ]
        }
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.