← Back to Skills
🗄️

Database Migration Check

Validate a database migration by comparing schemas before and after

Data 5 steps 4 tools 4 servers

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

1

Query the current database schema to capture the before-state

📊 Run SQL Query
2

Read the migration SQL files from the project directory

📄 Read File
3

Reason through the migration steps to identify potential risks or breaking changes

🧠 Structured Reasoning
4

Run a post-migration schema query to compare against the before-state

📊 Run SQL Query
5

Store the migration validation results for audit purposes

🧠 Store Memory

Tags

databasemigrationschemavalidation