Database Migration Check
Validate a database migration by comparing schemas before and after
Example Prompt
Check whether the latest database migration in the migrations folder is safe to run against the production schema
About
Ensures database migrations are safe by capturing the current schema, reading the migration files, running a comparison query, and reporting any discrepancies or potential data-loss risks. Helps catch migration issues before they reach production.
Workflow Steps
Query the current database schema to capture the before-state
📊 Run SQL QueryRead the migration SQL files from the project directory
📄 Read FileReason through the migration steps to identify potential risks or breaking changes
🧠 Structured ReasoningRun a post-migration schema query to compare against the before-state
📊 Run SQL QueryStore the migration validation results for audit purposes
🧠 Store MemoryTools Used
Read File
Read the contents of a file at a specified path on the local filesystem
Store Memory
Persist a key-value pair to the agent's long-term knowledge graph memory
Run SQL Query
Execute a read-only SQL query against a PostgreSQL database and return results
Structured Reasoning
Break down a complex problem into sequential reasoning steps with explicit chain-of-thought
Required MCP Servers
Filesystem
Read, search, and manage files on the local filesystem
Memory (Knowledge Graph)
Persistent knowledge graph for storing and retrieving structured information across sessions
PostgreSQL
Query, inspect, and manage PostgreSQL databases with full SQL support
Sequential Thinking
Dynamic problem-solving through structured thought sequences with branching and revision