Skip to content

a5c-ai/babysitter / library/specializations/code-migration-modernization/skills/schema-comparator

schema-comparator

Verified

Compare database schemas between source and target environments for migration planning

FileKindSize
README.mdmarkdown1.5 KB
SKILL.mdskill md2.8 KB
# Schema Comparator Skill

## Overview

The Schema Comparator skill compares database schemas between environments. It generates detailed diffs and migration scripts for database migrations.

## Quick Start

### Prerequisites

- Database connection credentials
- Schema access permissions
- Comparison tool installed

### Basic Usage

1. **Compare schemas**
   ```bash
   # Using Liquibase
   liquibase diff --url=source --referenceUrl=target
   ```

2. **Review differences**
   - Analyze table changes
   - Check constraint impacts
   - Review index changes

3. **Generate scripts**
   - Create migration DDL
   - Generate rollback
   - Order dependencies

## Features

### Comparison Types

| Type | Description | Impact |
|------|-------------|--------|
| Tables | Structure changes | High |
| Columns | Data type/size | Medium |
| Constraints | Keys, checks | High |
| Indexes | Performance | Medium |

### Output Formats

- SQL migration scripts
- Liquibase changesets
- Flyway migrations
- JSON diff reports

## Configuration

```json
{
  "source": {
    "type": "postgresql",
    "host": "source-db",
    "database": "myapp",
    "schema": "public"
  },
  "target": {
    "type": "postgresql",
    "host": "target-db",
    "database": "myapp",
    "schema": "public"
  },
  "options": {
    "includeData": false,
    "generateRollback": true
  }
}
```

## Related Documentation

- [SKILL.md](./SKILL.md) - Full skill specification
- [Liquibase](https://liquibase.org/)
- [Flyway](https://flywaydb.org/)
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall