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
Name | Required | Description | Default |
---|---|---|---|
name | No | An optional descriptive name for the migration. | |
sql | Yes | The SQL DDL content of the migration. | |
version | Yes | The migration version string (e.g., '20240101120000'). |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from Self-Hosted Supabase MCP Server
- apply_migration
- create_auth_user
- delete_auth_user
- execute_sql
- generate_typescript_types
- get_anon_key
- get_auth_user
- get_database_connections
- get_database_stats
- get_project_url
- get_service_key
- list_auth_users
- list_extensions
- list_migrations
- list_realtime_publications
- list_storage_buckets
- list_storage_objects
- list_tables
- rebuild_hooks
- update_auth_user
- verify_jwt_secret