edit-table-schema
Modify table schemas in Xano databases by adding, removing, or updating columns. Manage column types, settings, and access levels to adapt to changing data requirements.
Instructions
Edit the schema of an existing table (add, remove, or modify columns)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
column | No | Column specification (for 'add_column' operation) | |
column_name | No | Name of the column to remove (for 'remove_column' operation) | |
operation | Yes | Type of schema operation to perform | |
rename | No | Rename specification (for 'rename_column' operation) | |
schema | No | Full schema specification (for 'update' operation) | |
table_id | Yes | ID of the table to edit |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"column": {
"additionalProperties": false,
"description": "Column specification (for 'add_column' operation)",
"properties": {
"access": {
"default": "public",
"description": "Access level for the field",
"enum": [
"public",
"private",
"internal"
],
"type": "string"
},
"config": {
"additionalProperties": {},
"description": "Additional configuration for the column",
"type": "object"
},
"default": {
"description": "Default value for the field",
"type": "string"
},
"description": {
"description": "Description of the column",
"type": "string"
},
"name": {
"description": "Name of the column",
"type": "string"
},
"nullable": {
"default": false,
"description": "Whether the field can be null",
"type": "boolean"
},
"required": {
"default": false,
"description": "Whether the field is required",
"type": "boolean"
},
"style": {
"default": "single",
"description": "Whether the field is a single value or a list",
"enum": [
"single",
"list"
],
"type": "string"
},
"type": {
"description": "Type of the column",
"enum": [
"attachment",
"audio",
"bool",
"date",
"decimal",
"email",
"enum",
"geo_linestring",
"geo_multilinestring",
"geo_multipoint",
"geo_multipolygon",
"geo_point",
"geo_polygon",
"image",
"int",
"json",
"object",
"password",
"tableref",
"tablerefuuid",
"text",
"timestamp",
"uuid",
"vector",
"video"
],
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"column_name": {
"description": "Name of the column to remove (for 'remove_column' operation)",
"type": "string"
},
"operation": {
"description": "Type of schema operation to perform",
"enum": [
"update",
"add_column",
"rename_column",
"remove_column"
],
"type": "string"
},
"rename": {
"additionalProperties": false,
"description": "Rename specification (for 'rename_column' operation)",
"properties": {
"new_name": {
"description": "New name for the column",
"type": "string"
},
"old_name": {
"description": "Current name of the column",
"type": "string"
}
},
"required": [
"old_name",
"new_name"
],
"type": "object"
},
"schema": {
"description": "Full schema specification (for 'update' operation)",
"items": {
"additionalProperties": false,
"properties": {
"access": {
"default": "public",
"description": "Access level for the field",
"enum": [
"public",
"private",
"internal"
],
"type": "string"
},
"children": {
"description": "Nested fields for object types",
"type": "array"
},
"config": {
"additionalProperties": {},
"description": "Additional configuration for specific field types",
"type": "object"
},
"default": {
"description": "Default value for the field",
"type": "string"
},
"description": {
"description": "Description of the schema element",
"type": "string"
},
"name": {
"description": "Name of the schema element",
"type": "string"
},
"nullable": {
"default": false,
"description": "Whether the field can be null",
"type": "boolean"
},
"required": {
"default": false,
"description": "Whether the field is required",
"type": "boolean"
},
"style": {
"default": "single",
"description": "Whether the field is a single value or a list",
"enum": [
"single",
"list"
],
"type": "string"
},
"type": {
"description": "Type of the schema element",
"enum": [
"attachment",
"audio",
"bool",
"date",
"decimal",
"email",
"enum",
"geo_linestring",
"geo_multilinestring",
"geo_multipoint",
"geo_multipolygon",
"geo_point",
"geo_polygon",
"image",
"int",
"json",
"object",
"password",
"tableref",
"tablerefuuid",
"text",
"timestamp",
"uuid",
"vector",
"video"
],
"type": "string"
}
},
"required": [
"name",
"type"
],
"type": "object"
},
"type": "array"
},
"table_id": {
"description": "ID of the table to edit",
"type": "string"
}
},
"required": [
"table_id",
"operation"
],
"type": "object"
}