pg_manage_schema
Manage PostgreSQL database schema operations including creating tables, altering structures, listing schema information, and handling ENUM types.
Instructions
Manage PostgreSQL schema - get schema info, create/alter tables, manage enums. Examples: operation="get_info" for table lists, operation="create_table" with tableName and columns, operation="get_enums" to list enums, operation="create_enum" with enumName and values
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionString | No | PostgreSQL connection string (optional) | |
| operation | Yes | Operation: get_info (schema/table info), create_table (new table), alter_table (modify table), get_enums (list ENUMs), create_enum (new ENUM) | |
| tableName | No | Table name (optional for get_info to get specific table info, required for create_table/alter_table) | |
| schema | No | Schema name (defaults to public) | |
| columns | No | Column definitions (required for create_table) | |
| operations | No | Alter operations (required for alter_table) | |
| enumName | No | ENUM name (optional for get_enums to filter, required for create_enum) | |
| values | No | ENUM values (required for create_enum) | |
| ifNotExists | No | Include IF NOT EXISTS clause (for create_enum) |