Rechercher

PythonReactSEOPDF
OpenClaw

database-schema-differ

Compare database schemas across environments, generate migration scripts, and track schema evolution.

derick0010 installations selon la source☆ 0 Étoiles du dépôtv1.0.0

Installation

Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.

SkillHub CLI

skillhub install derick001/database-schema-differ

Examinez la source et la compatibilité, puis suivez les étapes d’installation.

Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.

Voir la source ↗Guides

Instructions

Database Schema Differ

What This Does

A CLI tool to compare database schemas across different environments (development, staging, production), generate migration scripts, and track schema evolution over time. Support for PostgreSQL, MySQL, SQLite, and other databases via SQLAlchemy.

Key features:

  • Schema comparison: Compare schemas between databases, branches, or points in time
  • Migration generation: Automatically generate SQL migration scripts (up/down) for schema changes
  • Schema snapshots: Capture and store schema snapshots for historical comparison
  • Drift detection: Identify schema drift between environments (dev vs prod, etc.)
  • Multiple database support: PostgreSQL, MySQL, SQLite, SQL Server, Oracle via SQLAlchemy
  • Export formats: Generate SQL, JSON, or visual diff outputs
  • Integration ready: Works with Alembic, Django migrations, or standalone
  • Change tracking: Track schema evolution over time with versioning
  • CI/CD friendly: Output machine-readable formats for automation pipelines

When To Use

  • You need to compare database schemas between development and production
  • You want to generate migration scripts for schema changes
  • You're managing multiple database environments and need to ensure consistency
  • You need to detect schema drift in production databases
  • You're refactoring databases and need to track changes
  • You want to automate schema validation in CI/CD pipelines
  • You need to document schema changes for compliance or team coordination
  • You're onboarding new team members and need to understand schema evolution
  • You want to visualize schema differences between branches or versions

Usage

Basic commands:

# Compare two database connections
python3 scripts/main.py compare postgresql://user:pass@host1/db postgresql://user:pass@host2/db

# Generate migration script from schema differences
python3 scripts/main.py diff dev_db.sql prod_db.sql --output migration.sql

# Create schema snap...

Informations sur la source

Source
github
Repository
openclaw/skills
Path
skills/derick001/database-schema-differ
Version
1.0.0
Commit
48eeb585c9f8ba9dddde5ecef34871e6bc586058
Source de classification
rules
Statut
active
Visibilité
public

Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.

README

Database Schema Differ

Compare database schemas across environments, generate migration scripts, and track schema evolution.

Features

  • Compare schemas between databases, SQL files, or schema snapshots
  • Generate SQL migration scripts (up/down) for schema changes
  • Detect schema drift between environments
  • Support for PostgreSQL, MySQL, SQLite, and other databases via SQLAlchemy
  • Multiple output formats (SQL, JSON, HTML visual diff)
  • Schema snapshotting for historical comparison

Quick Start

# Compare two databases
python3 scripts/main.py compare postgresql://user:pass@host1/db postgresql://user:pass@host2/db

# Generate migration from schema differences
python3 scripts/main.py diff schema_v1.sql schema_v2.sql --output migration.sql

# Create schema snapshot
python3 scripts/main.py snapshot postgresql://user:pass@host/db --save snapshot.json

# Check for schema drift in CI
python3 scripts/main.py check-drift --expected expected.json --actual actual.json --fail-on-drift

Installation

This skill requires Python 3.x and SQLAlchemy:

pip3 install sqlalchemy alembic psycopg2-binary pymysql

Database-specific drivers:

  • PostgreSQL: psycopg2-binary
  • MySQL: pymysql
  • SQLite: Built into Python
  • SQL Server: pyodbc
  • Oracle: cx_oracle

Usage Examples

Compare development and production
python3 scripts/main.py compare \
  postgresql://dev:pass@localhost/dev_db \
  postgresql://prod:pass@prod-host/prod_db \
  --output diff.json
Generate visual HTML diff
python3 scripts/main.py visual-diff schema1.sql schema2.sql --html diff.html
Track schema changes over time
python3 scripts/main.py history postgresql://user:pass@host/db --days 30 --format timeline

Output Formats

  • Human-readable: Color-coded terminal output
  • JSON: Machine-readable for automation
  • SQL: Ready-to-execute migration scripts
  • HTML: Interactive visual diff in browser

Limitations

  • Requ...

Contenu extrait

SKILL.md
# Database Schema Differ

## What This Does

A CLI tool to compare database schemas across different environments (development, staging, production), generate migration scripts, and track schema evolution over time. Support for PostgreSQL, MySQL, SQLite, and other databases via SQLAlchemy.

Key features:
- **Schema comparison**: Compare schemas between databases, branches, or points in time
- **Migration generation**: Automatically generate SQL migration scripts (up/down) for schema changes
- **Schema snapshots**: Capture and store schema snapshots for historical comparison
- **Drift detection**: Identify schema drift between environments (dev vs prod, etc.)
- **Multiple database support**: PostgreSQL, MySQL, SQLite, SQL Server, Oracle via SQLAlchemy
- **Export formats**: Generate SQL, JSON, or visual diff outputs
- **Integration ready**: Works with Alembic, Django migrations, or standalone
- **Change tracking**: Track schema evolution over time with versioning
- **CI/CD friendly**: Output machine-readable formats for automation pipelines

## When To Use

- You need to compare database schemas between development and production
- You want to generate migration scripts for schema changes
- You're managing multiple database environments and need to ensure consistency
- You need to detect schema drift in production databases
- You're refactoring databases and need to track changes
- You want to automate schema validation in CI/CD pipelines
- You need to document schema changes for compliance or team coordination
- You're onboarding new team members and need to understand schema evolution
- You want to visualize schema differences between branches or versions

## Usage

Basic commands:

```bash
# Compare two database connections
python3 scripts/main.py compare postgresql://user:pass@host1/db postgresql://user:pass@host2/db

# Generate migration script from schema differences
python3 scripts/main.py diff dev_db.sql prod_db.sql --output migration.sql

# Create schema snap...
README
# Database Schema Differ

Compare database schemas across environments, generate migration scripts, and track schema evolution.

## Features

- Compare schemas between databases, SQL files, or schema snapshots
- Generate SQL migration scripts (up/down) for schema changes
- Detect schema drift between environments
- Support for PostgreSQL, MySQL, SQLite, and other databases via SQLAlchemy
- Multiple output formats (SQL, JSON, HTML visual diff)
- Schema snapshotting for historical comparison

## Quick Start

```bash
# Compare two databases
python3 scripts/main.py compare postgresql://user:pass@host1/db postgresql://user:pass@host2/db

# Generate migration from schema differences
python3 scripts/main.py diff schema_v1.sql schema_v2.sql --output migration.sql

# Create schema snapshot
python3 scripts/main.py snapshot postgresql://user:pass@host/db --save snapshot.json

# Check for schema drift in CI
python3 scripts/main.py check-drift --expected expected.json --actual actual.json --fail-on-drift
```

## Installation

This skill requires Python 3.x and SQLAlchemy:

```bash
pip3 install sqlalchemy alembic psycopg2-binary pymysql
```

Database-specific drivers:
- PostgreSQL: `psycopg2-binary`
- MySQL: `pymysql`
- SQLite: Built into Python
- SQL Server: `pyodbc`
- Oracle: `cx_oracle`

## Usage Examples

### Compare development and production
```bash
python3 scripts/main.py compare \
  postgresql://dev:pass@localhost/dev_db \
  postgresql://prod:pass@prod-host/prod_db \
  --output diff.json
```

### Generate visual HTML diff
```bash
python3 scripts/main.py visual-diff schema1.sql schema2.sql --html diff.html
```

### Track schema changes over time
```bash
python3 scripts/main.py history postgresql://user:pass@host/db --days 30 --format timeline
```

## Output Formats

- **Human-readable**: Color-coded terminal output
- **JSON**: Machine-readable for automation
- **SQL**: Ready-to-execute migration scripts
- **HTML**: Interactive visual diff in browser

## Limitations

- Requ...

Skills associés

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.