Self-Hosted Supabase MCP Server

apply_migration

Execute and track SQL migration scripts within a self-hosted Supabase instance. Ensures database schema updates are applied and recorded in the schema_migrations table. Requires version and SQL inputs for reliable migration management.

Instructions

Applies a SQL migration script and records it in the supabase_migrations.schema_migrations table within a transaction.

Input Schema

NameRequiredDescriptionDefault
nameNoAn optional descriptive name for the migration.
sqlYesThe SQL DDL content of the migration.
versionYesThe migration version string (e.g., '20240101120000').

Input Schema (JSON Schema)

{ "properties": { "name": { "description": "An optional descriptive name for the migration.", "type": "string" }, "sql": { "description": "The SQL DDL content of the migration.", "type": "string" }, "version": { "description": "The migration version string (e.g., '20240101120000').", "type": "string" } }, "required": [ "version", "sql" ], "type": "object" }
ID: kgziynf39e