Metadata-Version: 2.4
Name: dbmigrate-pro
Version: 1.0.1
Summary: Universal Database Migration Tool - Migrate any database to any database across 74 databases and 9 paradigms
Project-URL: Homepage, https://dbmigrate.io
Project-URL: Documentation, https://docs.dbmigrate.io
Project-URL: Repository, https://github.com/dbmigrate/dbmigrate
Project-URL: Changelog, https://github.com/dbmigrate/dbmigrate/blob/main/CHANGELOG.md
Project-URL: Bug Tracker, https://github.com/dbmigrate/dbmigrate/issues
Project-URL: Pricing, https://dbmigrate.io/pricing
Project-URL: Support, https://dbmigrate.io/support
Author-email: "DBMigrate Inc." <hello@dbmigrate.io>
Maintainer-email: DBMigrate Team <support@dbmigrate.io>
License: Commercial License - See LICENSE
License-File: LICENSE
Keywords: cassandra,cross-paradigm,database,database-migration,document-database,elasticsearch,etl,graph-database,migration,migration-tool,mongodb,mysql,neo4j,oracle,postgresql,redis,schema,sqlserver,timeseries,vector-database
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Database :: Front-Ends
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: anthropic>=0.40.0
Provides-Extra: all
Requires-Dist: boto3>=1.26.0; extra == 'all'
Requires-Dist: cassandra-driver>=3.28.0; extra == 'all'
Requires-Dist: chromadb>=0.4.0; extra == 'all'
Requires-Dist: clickhouse-driver>=0.2.0; extra == 'all'
Requires-Dist: elasticsearch>=8.0.0; extra == 'all'
Requires-Dist: influxdb-client>=1.30.0; extra == 'all'
Requires-Dist: mysql-connector-python>=8.0.0; extra == 'all'
Requires-Dist: neo4j>=5.0.0; extra == 'all'
Requires-Dist: oracledb>=1.0.0; extra == 'all'
Requires-Dist: pinecone-client>=2.0.0; extra == 'all'
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'all'
Requires-Dist: pymongo>=4.0.0; extra == 'all'
Requires-Dist: pyodbc>=4.0.0; extra == 'all'
Requires-Dist: redis>=4.0.0; extra == 'all'
Provides-Extra: api
Requires-Dist: fastapi>=0.100.0; extra == 'api'
Requires-Dist: python-multipart>=0.0.6; extra == 'api'
Requires-Dist: uvicorn>=0.23.0; extra == 'api'
Provides-Extra: arangodb
Requires-Dist: python-arango>=7.0.0; extra == 'arangodb'
Provides-Extra: bigquery
Requires-Dist: google-cloud-bigquery>=3.0.0; extra == 'bigquery'
Provides-Extra: cassandra
Requires-Dist: cassandra-driver>=3.28.0; extra == 'cassandra'
Provides-Extra: chroma
Requires-Dist: chromadb>=0.4.0; extra == 'chroma'
Provides-Extra: clickhouse
Requires-Dist: clickhouse-driver>=0.2.0; extra == 'clickhouse'
Provides-Extra: columnar-all
Requires-Dist: cassandra-driver>=3.28.0; extra == 'columnar-all'
Requires-Dist: clickhouse-driver>=0.2.0; extra == 'columnar-all'
Requires-Dist: google-cloud-bigquery>=3.0.0; extra == 'columnar-all'
Provides-Extra: couchbase
Requires-Dist: couchbase>=4.0.0; extra == 'couchbase'
Provides-Extra: db2
Requires-Dist: ibm-db>=3.0.0; extra == 'db2'
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.0.280; extra == 'dev'
Provides-Extra: document-all
Requires-Dist: couchbase>=4.0.0; extra == 'document-all'
Requires-Dist: google-cloud-firestore>=2.0.0; extra == 'document-all'
Requires-Dist: pymongo>=4.0.0; extra == 'document-all'
Provides-Extra: dynamodb
Requires-Dist: boto3>=1.26.0; extra == 'dynamodb'
Provides-Extra: elasticsearch
Requires-Dist: elasticsearch>=8.0.0; extra == 'elasticsearch'
Provides-Extra: enterprise
Requires-Dist: cassandra-driver>=3.28.0; extra == 'enterprise'
Requires-Dist: elasticsearch>=8.0.0; extra == 'enterprise'
Requires-Dist: google-cloud-bigquery>=3.0.0; extra == 'enterprise'
Requires-Dist: ibm-db>=3.0.0; extra == 'enterprise'
Requires-Dist: mysql-connector-python>=8.0.0; extra == 'enterprise'
Requires-Dist: oracledb>=1.0.0; extra == 'enterprise'
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'enterprise'
Requires-Dist: pymongo>=4.0.0; extra == 'enterprise'
Requires-Dist: pyodbc>=4.0.0; extra == 'enterprise'
Requires-Dist: redis>=4.0.0; extra == 'enterprise'
Requires-Dist: snowflake-connector-python>=3.0.0; extra == 'enterprise'
Provides-Extra: firestore
Requires-Dist: google-cloud-firestore>=2.0.0; extra == 'firestore'
Provides-Extra: graph-all
Requires-Dist: neo4j>=5.0.0; extra == 'graph-all'
Requires-Dist: python-arango>=7.0.0; extra == 'graph-all'
Provides-Extra: influxdb
Requires-Dist: influxdb-client>=1.30.0; extra == 'influxdb'
Provides-Extra: keyvalue-all
Requires-Dist: boto3>=1.26.0; extra == 'keyvalue-all'
Requires-Dist: pymemcache>=4.0.0; extra == 'keyvalue-all'
Requires-Dist: redis>=4.0.0; extra == 'keyvalue-all'
Provides-Extra: memcached
Requires-Dist: pymemcache>=4.0.0; extra == 'memcached'
Provides-Extra: milvus
Requires-Dist: pymilvus>=2.3.0; extra == 'milvus'
Provides-Extra: mongodb
Requires-Dist: pymongo>=4.0.0; extra == 'mongodb'
Provides-Extra: mysql
Requires-Dist: mysql-connector-python>=8.0.0; extra == 'mysql'
Provides-Extra: neo4j
Requires-Dist: neo4j>=5.0.0; extra == 'neo4j'
Provides-Extra: opensearch
Requires-Dist: opensearch-py>=2.0.0; extra == 'opensearch'
Provides-Extra: oracle
Requires-Dist: oracledb>=1.0.0; extra == 'oracle'
Provides-Extra: oracle-legacy
Requires-Dist: cx-oracle>=8.0.0; extra == 'oracle-legacy'
Provides-Extra: pinecone
Requires-Dist: pinecone-client>=2.0.0; extra == 'pinecone'
Provides-Extra: postgresql
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'postgresql'
Provides-Extra: qdrant
Requires-Dist: qdrant-client>=1.0.0; extra == 'qdrant'
Provides-Extra: redis
Requires-Dist: redis>=4.0.0; extra == 'redis'
Provides-Extra: relational-all
Requires-Dist: mysql-connector-python>=8.0.0; extra == 'relational-all'
Requires-Dist: oracledb>=1.0.0; extra == 'relational-all'
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'relational-all'
Requires-Dist: pyodbc>=4.0.0; extra == 'relational-all'
Provides-Extra: search-all
Requires-Dist: elasticsearch>=8.0.0; extra == 'search-all'
Requires-Dist: opensearch-py>=2.0.0; extra == 'search-all'
Requires-Dist: requests>=2.28.0; extra == 'search-all'
Provides-Extra: snowflake
Requires-Dist: snowflake-connector-python>=3.0.0; extra == 'snowflake'
Provides-Extra: solr
Requires-Dist: requests>=2.28.0; extra == 'solr'
Provides-Extra: sqlite
Provides-Extra: sqlserver
Requires-Dist: pyodbc>=4.0.0; extra == 'sqlserver'
Provides-Extra: timescaledb
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'timescaledb'
Provides-Extra: timeseries-all
Requires-Dist: influxdb-client>=1.30.0; extra == 'timeseries-all'
Requires-Dist: psycopg2-binary>=2.9.0; extra == 'timeseries-all'
Provides-Extra: vector-all
Requires-Dist: chromadb>=0.4.0; extra == 'vector-all'
Requires-Dist: pinecone-client>=2.0.0; extra == 'vector-all'
Requires-Dist: pymilvus>=2.3.0; extra == 'vector-all'
Requires-Dist: qdrant-client>=1.0.0; extra == 'vector-all'
Requires-Dist: weaviate-client>=3.0.0; extra == 'vector-all'
Provides-Extra: weaviate
Requires-Dist: weaviate-client>=3.0.0; extra == 'weaviate'
Description-Content-Type: text/markdown

# DBMigrate - Universal Database Migration Tool

**Migrate any database to any database. Any paradigm to any paradigm. Powered by AI.**

## The Problem

Database migrations cost companies $50,000 - $500,000+ because:
- Schema differences require manual mapping
- Stored procedures need complete rewrites (PL/SQL → PL/pgSQL)
- Data type incompatibilities cause data loss
- Cross-paradigm migrations (SQL → NoSQL) are near-impossible manually
- Consultants charge $200-400/hour

## The Solution

DBMigrate automates 90% of the migration work across **60+ databases and 9 paradigms**:

```
                               ┌──── PostgreSQL
Oracle ────────┐               ├──── MongoDB
SQL Server ────┤               ├──── Neo4j
MongoDB ───────┤  ┌─────────┐  ├──── Elasticsearch
Neo4j ─────────┼─►│DBMigrate│─►├──── Pinecone
Redis ─────────┤  │AI Engine│  ├──── Cassandra
Elasticsearch ─┤  └─────────┘  ├──── InfluxDB
InfluxDB ──────┤               ├──── Redis
Pinecone ──────┘               └──── Any Target
```

## Features

- **Multi-Paradigm Support**: Relational, Document, Graph, Vector, Time-Series, Key-Value, Columnar, Search
- **Cross-Paradigm Transformation**: SQL → Document, Graph → Relational, and more
- **Schema Extraction**: Connect to 60+ databases, extract complete schema
- **Intelligent Type Mapping**: 500+ data type conversions with edge case handling
- **AI-Powered SP Conversion**: Stored procedures translated using latest LLM models
- **Trigger Migration**: Automatic trigger syntax conversion
- **View Translation**: Query syntax adapted to target dialect
- **Compatibility Analysis**: Automatic assessment of migration complexity and data loss risks

## Quick Start

### CLI Usage

```bash
# Install
pip install dbmigrate

# Migrate PostgreSQL to MySQL
dbmigrate --source postgresql --target mysql \
          --source-conn "postgresql://user:pass@localhost/mydb" \
          --output ./migration

# Migrate Oracle to PostgreSQL (the hard one!)
dbmigrate --source oracle --target postgresql \
          --source-conn "oracle://user:pass@localhost/ORCL" \
          --output ./migration
```

### API Usage

```python
from dbmigrate import migrate

report = migrate(
    source_type="oracle",
    target_type="postgresql",
    source_connection="oracle://user:pass@localhost/ORCL",
    output_dir="./migration"
)

print(f"Migrated {report.tables_migrated} tables")
print(f"Converted {report.procedures_converted} stored procedures")
```

### REST API (SaaS)

```bash
# Start API server
dbmigrate-api --port 8000

# Create migration job
curl -X POST http://localhost:8000/api/v1/migrations \
  -H "Content-Type: application/json" \
  -d '{
    "source_type": "oracle",
    "target_type": "postgresql",
    "source_connection": "oracle://..."
  }'

# Convert SQL instantly
curl -X POST http://localhost:8000/api/v1/convert/sql \
  -H "Content-Type: application/json" \
  -d '{
    "source_type": "oracle",
    "target_type": "postgresql",
    "sql_code": "SELECT NVL(col, 0) FROM dual WHERE ROWNUM < 10"
  }'
```

## Supported Databases (60+)

### 🗄️ Relational (SQL)
| Database | Extract | Generate | SP Convert | Driver |
|----------|---------|----------|------------|--------|
| PostgreSQL | ✅ | ✅ | ✅ | psycopg2 |
| MySQL/MariaDB | ✅ | ✅ | ✅ | mysql-connector |
| Oracle | ✅ | ✅ | ✅ | oracledb |
| SQL Server | ✅ | ✅ | ✅ | pyodbc |
| SQLite | ✅ | ✅ | N/A | built-in |
| Azure SQL | ✅ | ✅ | ✅ | pyodbc |
| DB2 | ✅ | ✅ | ✅ | ibm-db |
| SAP HANA | ✅ | ✅ | ✅ | hdbcli |
| Snowflake | ✅ | ✅ | ✅ | snowflake-connector |
| Aurora | ✅ | ✅ | ✅ | psycopg2/mysql-connector |
| Cloud SQL | ✅ | ✅ | ✅ | driver per dialect |
| CockroachDB | ✅ | ✅ | ✅ | psycopg2 |
| YugabyteDB | ✅ | ✅ | ✅ | psycopg2 |
| TiDB | ✅ | ✅ | ✅ | mysql-connector |
| VoltDB | ✅ | ✅ | ✅ | voltdb-client |
| SingleStore | ✅ | ✅ | ✅ | mysql-connector |

### 📄 Document (NoSQL)
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| MongoDB | ✅ | ✅ | ✅ | pymongo |
| CouchDB | ✅ | ✅ | ✅ | couchdb |
| Couchbase | ✅ | ✅ | ✅ | couchbase |
| AWS DocumentDB | ✅ | ✅ | ✅ | pymongo |
| Cosmos DB | ✅ | ✅ | ✅ | azure-cosmos |
| Firestore | ✅ | ✅ | ✅ | google-cloud-firestore |
| FaunaDB | ✅ | ✅ | ✅ | faunadb |
| SurrealDB | ✅ | ✅ | ✅ | surrealdb |

### 🕸️ Graph
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| Neo4j | ✅ | ✅ | ✅ | neo4j |
| Amazon Neptune | ✅ | ✅ | ✅ | gremlinpython |
| ArangoDB | ✅ | ✅ | ✅ | python-arango |
| JanusGraph | ✅ | ✅ | ✅ | gremlinpython |
| Dgraph | ✅ | ✅ | ✅ | pydgraph |
| TigerGraph | ✅ | ✅ | ✅ | pyTigerGraph |

### 🎯 Vector
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| Pinecone | ✅ | ✅ | ✅ | pinecone-client |
| Milvus | ✅ | ✅ | ✅ | pymilvus |
| Weaviate | ✅ | ✅ | ✅ | weaviate-client |
| Vespa | ✅ | ✅ | ✅ | pyvespa |
| Qdrant | ✅ | ✅ | ✅ | qdrant-client |
| Chroma | ✅ | ✅ | ✅ | chromadb |
| pgvector | ✅ | ✅ | ✅ | psycopg2 |

### ⏱️ Time-Series
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| InfluxDB | ✅ | ✅ | ✅ | influxdb-client |
| TimescaleDB | ✅ | ✅ | ✅ | psycopg2 |
| Prometheus | ✅ | ✅ | ✅ | prometheus-client |
| OpenTSDB | ✅ | ✅ | ✅ | requests |
| VictoriaMetrics | ✅ | ✅ | ✅ | requests |
| QuestDB | ✅ | ✅ | ✅ | psycopg2 |

### 🔑 Key-Value
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| Redis | ✅ | ✅ | ✅ | redis |
| Memcached | ✅ | ✅ | ✅ | pymemcache |
| DynamoDB | ✅ | ✅ | ✅ | boto3 |
| Riak | ✅ | ✅ | ✅ | riak |
| Aerospike | ✅ | ✅ | ✅ | aerospike |
| KeyDB | ✅ | ✅ | ✅ | redis |
| Etcd | ✅ | ✅ | ✅ | etcd3 |
| FoundationDB | ✅ | ✅ | ✅ | foundationdb |

### 📊 Wide-Column / Columnar
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| Cassandra | ✅ | ✅ | ✅ | cassandra-driver |
| HBase | ✅ | ✅ | ✅ | happybase |
| ScyllaDB | ✅ | ✅ | ✅ | cassandra-driver |
| Bigtable | ✅ | ✅ | ✅ | google-cloud-bigtable |
| ClickHouse | ✅ | ✅ | ✅ | clickhouse-connect |
| Redshift | ✅ | ✅ | ✅ | redshift-connector |
| BigQuery | ✅ | ✅ | ✅ | google-cloud-bigquery |
| Druid | ✅ | ✅ | ✅ | pydruid |

### 🔍 Search / Analytics
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| Elasticsearch | ✅ | ✅ | ✅ | elasticsearch |
| OpenSearch | ✅ | ✅ | ✅ | opensearch-py |
| Solr | ✅ | ✅ | ✅ | pysolr |
| Splunk | ✅ | ✅ | ✅ | splunk-sdk |
| Typesense | ✅ | ✅ | ✅ | typesense |
| MeiliSearch | ✅ | ✅ | ✅ | meilisearch |

### 💾 Embedded
| Database | Extract | Generate | Transform | Driver |
|----------|---------|----------|-----------|--------|
| RocksDB | ✅ | ✅ | ✅ | python-rocksdb |
| LevelDB | ✅ | ✅ | ✅ | plyvel |
| DuckDB | ✅ | ✅ | ✅ | duckdb |
| Berkeley DB | ✅ | ✅ | ✅ | bsddb3 |

## Cross-Paradigm Transformations

DBMigrate can intelligently transform schemas between different database paradigms:

| From → To | Supported | Notes |
|-----------|-----------|-------|
| Relational → Document | ✅ | Embeds related tables, denormalizes JOINs |
| Relational → Graph | ✅ | FKs become edges, junction tables become relationships |
| Document → Relational | ✅ | Normalizes nested objects, arrays become child tables |
| Document → Graph | ✅ | References become edges, embedded docs become connected nodes |
| Graph → Document | ✅ | Aggregates connected nodes, edges become references |
| Graph → Relational | ✅ | Nodes become tables, edges become junction tables |

### Transformation Strategies

```python
from dbmigrate.transformers import CrossParadigmTransformer, EmbeddingStrategy

transformer = CrossParadigmTransformer()

# SQL to MongoDB - embed small related tables, normalize large ones
result = transformer.transform(
    source_schema,
    target_paradigm=ParadigmType.DOCUMENT,
    embedding_strategy=EmbeddingStrategy.HYBRID
)

# MongoDB to PostgreSQL - full normalization
result = transformer.transform(
    source_schema,
    target_paradigm=ParadigmType.RELATIONAL,
    normalization_strategy=NormalizationStrategy.FULL
)
```

### Database-Specific Extraction Features

#### Oracle
- Tables with columns, indexes, foreign keys, primary keys
- Column comments and table comments
- Views with definitions
- Stored procedures and functions (PL/SQL source)
- Packages (spec and body)
- Triggers with timing, events, and body
- Sequences with current value for seamless continuation

#### SQL Server
- Full schema.table support (dbo, custom schemas)
- VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX) handling
- IDENTITY columns with seed/increment
- Computed columns
- Extended properties (MS_Description)
- T-SQL stored procedures and functions
- Scalar, inline table-valued, and multi-statement functions
- INSTEAD OF triggers
- Sequences (SQL Server 2012+)

#### MongoDB
- Collection schema inference from sample documents
- JSON Schema validators
- Index definitions (single, compound, text, geospatial)
- Validation rules and levels
- Capped collection settings

#### Neo4j
- Node labels and properties
- Edge types with cardinality
- Indexes and constraints
- Property type inference
- APOC procedure detection

#### Elasticsearch
- Index mappings and settings
- Field types and analyzers
- Index templates and aliases
- Ingest pipelines

#### Redis
- Key pattern analysis
- TTL configurations
- Data structure detection (hash, set, list, sorted set)
- Cluster configuration

## Architecture

```
┌─────────────────────────────────────────────────────────────────────────┐
│                            DBMigrate                                    │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                         │
│  ┌──────────────┐    ┌──────────────┐    ┌────────────────┐            │
│  │  Extractors  │───►│  Universal   │───►│   Generators   │            │
│  │  (60+ DBs)   │    │   Schemas    │    │   (60+ DBs)    │            │
│  └──────────────┘    └──────────────┘    └────────────────┘            │
│         │                   │                    │                      │
│         ▼                   ▼                    ▼                      │
│  ┌──────────────┐    ┌──────────────┐    ┌────────────────┐            │
│  │   Paradigms  │    │ Transformers │    │  Type Mappers  │            │
│  │  • Relational│    │ Cross-Paradigm│   │  500+ types    │            │
│  │  • Document  │    │ SQL↔Document │    └────────────────┘            │
│  │  • Graph     │    │ SQL↔Graph   │                                   │
│  │  • Vector    │    │ Doc↔Graph   │    ┌────────────────┐            │
│  │  • TimeSeries│    └──────────────┘    │  SP Converter  │            │
│  │  • KeyValue  │                        │   (AI/LLM)     │            │
│  │  • Columnar  │                        └────────────────┘            │
│  │  • Search    │                                                       │
│  └──────────────┘                                                       │
│                                                                         │
└─────────────────────────────────────────────────────────────────────────┘
```

### Component Overview

- **Extractors**: Connect to source databases and extract schema metadata
- **Paradigms**: Unified schema representations for each database category
- **Transformers**: Convert schemas between paradigms (SQL↔NoSQL, etc.)
- **Generators**: Generate DDL/schema definitions for target databases
- **Type Mappers**: Handle 500+ data type conversions with edge cases
- **SP Converter**: AI-powered stored procedure translation

## Pricing (SaaS)

| Plan | Tables/Month | SP Conversions | Price |
|------|-------------|----------------|-------|
| Starter | 50 | 20 | $99/mo |
| Pro | 500 | 200 | $499/mo |
| Enterprise | Unlimited | Unlimited | $2,499/mo |

**Compare to consultants: $50,000+ per migration project**

## Output Files

After running a migration, you get:

```
migration_output/
├── schema.sql              # Complete DDL for target database
├── stored_procedures.sql   # Converted stored procedures
├── triggers.sql            # Converted triggers
├── data_migration_guide.md # Instructions for data transfer
└── migration_report.json   # Detailed report
```

## Requirements

- Python 3.11+
- Database drivers (installed per paradigm or individually)
- Anthropic API key (for SP conversion) - uses Claude Sonnet

## Installation

```bash
# Basic install (CLI only)
pip install dbmigrate

# Install by individual database
pip install dbmigrate[postgresql]        # PostgreSQL
pip install dbmigrate[mysql]             # MySQL/MariaDB
pip install dbmigrate[oracle]            # Oracle Database
pip install dbmigrate[sqlserver]         # SQL Server (requires ODBC driver)
pip install dbmigrate[mongodb]           # MongoDB
pip install dbmigrate[neo4j]             # Neo4j
pip install dbmigrate[redis]             # Redis
pip install dbmigrate[elasticsearch]     # Elasticsearch
pip install dbmigrate[pinecone]          # Pinecone
pip install dbmigrate[influxdb]          # InfluxDB

# Install by paradigm (all databases in category)
pip install dbmigrate[relational-all]    # All relational databases
pip install dbmigrate[document-all]      # MongoDB, Couchbase, Firestore, etc.
pip install dbmigrate[graph-all]         # Neo4j, ArangoDB, etc.
pip install dbmigrate[vector-all]        # Pinecone, Milvus, Weaviate, etc.
pip install dbmigrate[timeseries-all]    # InfluxDB, TimescaleDB, etc.
pip install dbmigrate[keyvalue-all]      # Redis, DynamoDB, Memcached, etc.
pip install dbmigrate[columnar-all]      # Cassandra, ClickHouse, BigQuery, etc.
pip install dbmigrate[search-all]        # Elasticsearch, OpenSearch, Solr, etc.

# Bundles
pip install dbmigrate[enterprise]        # Common production databases
pip install dbmigrate[all]               # Every supported database

# With REST API server
pip install dbmigrate[api]

# Full install (all features)
pip install dbmigrate[all,api]

# Development
git clone https://github.com/yourcompany/dbmigrate
cd dbmigrate
pip install -e ".[dev,all,api]"
```

### SQL Server ODBC Driver

SQL Server requires the Microsoft ODBC driver:

```bash
# Windows (usually pre-installed with SQL Server tools)
# Download: https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server

# Linux (Ubuntu/Debian)
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install -y msodbcsql17

# macOS
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_NO_ENV_FILTERING=1 ACCEPT_EULA=Y brew install msodbcsql17
```

## License

Commercial license required for production use.
Free for evaluation and development.

---

## 🏢 Enterprise Features

DBMigrate Enterprise Edition includes advanced capabilities for mission-critical migrations:

### ⚡ High-Performance Parallel Processing

Migrate billions of rows efficiently with intelligent scaling:

```python
from dbmigrate.core.parallel import ParallelMigrationEngine, ScalingConfig, ScalingMode

# Auto-detect optimal configuration
config = ScalingConfig(
    mode=ScalingMode.HYBRID,      # Threads + Processes
    max_workers=0,                 # Auto-detect from CPU
    batch_size=50000,              # Rows per batch
    adaptive_batching=True,        # Auto-tune batch size
    use_server_cursors=True,       # Memory-efficient streaming
)

engine = ParallelMigrationEngine(config)
engine.migrate_tables(['users', 'orders', 'transactions'])
```

**Scaling Modes:**
- `SINGLE` - Debug mode
- `THREADED` - Best for I/O bound (network, disk)
- `PROCESS` - Best for CPU bound (transforms, compression)
- `HYBRID` - Processes with internal threads
- `DISTRIBUTED` - Redis-based horizontal scaling

### 🌐 Distributed Processing (Horizontal Scaling)

Scale across multiple servers with Redis-based coordination:

```python
from dbmigrate.core.distributed import DistributedMigrationCoordinator

coordinator = DistributedMigrationCoordinator(
    redis_host='redis-cluster.internal',
    redis_port=6379,
    num_workers=10  # Across multiple servers
)

# Start workers on each server
coordinator.start_worker(worker_id='worker-001')

# Submit migration job
job_id = coordinator.submit_migration(
    source_conn='postgresql://source/db',
    target_conn='postgresql://target/db',
    tables=['users', 'orders', 'products'],
    priority='high'
)

# Monitor progress
status = coordinator.get_job_status(job_id)
print(f"Progress: {status['progress']}%")
```

### 🔒 Data Masking & PII Anonymization

GDPR, HIPAA, PCI-DSS compliant data masking:

```python
from dbmigrate.core.masking import DataMaskingEngine, MaskingRule, MaskingStrategy

engine = DataMaskingEngine(deterministic=True)  # Preserve FK relationships

# Configure masking rules
engine.add_rule(MaskingRule('email', MaskingStrategy.HASH))
engine.add_rule(MaskingRule('ssn', MaskingStrategy.REDACT))
engine.add_rule(MaskingRule('salary', MaskingStrategy.RANGE, range_bucket_size=10000))
engine.add_rule(MaskingRule('dob', MaskingStrategy.DATE_SHIFT, date_shift_days=30))
engine.add_rule(MaskingRule('name', MaskingStrategy.FAKE))  # Realistic fake names
engine.add_rule(MaskingRule('phone', MaskingStrategy.MASK_PARTIAL, partial_mask_end=4))

# Or use compliance presets
engine = DataMaskingEngine.create_gdpr_compliant()
engine = DataMaskingEngine.create_hipaa_compliant()
engine = DataMaskingEngine.create_pci_compliant()

# Mask during migration
masked_row = engine.mask_row(original_row)
```

**Masking Strategies:**
| Strategy | Example Input | Example Output |
|----------|--------------|----------------|
| `REDACT` | `123-45-6789` | `*********` |
| `HASH` | `john@example.com` | `a1b2c3d4...` |
| `FAKE` | `John Doe` | `Michael Smith` |
| `PARTIAL` | `4111111111111111` | `************1111` |
| `DATE_SHIFT` | `1990-03-15` | `1990-02-28` |
| `RANGE` | `75000` | `70000-80000` |
| `NULL` | `any value` | `NULL` |

### 📡 Real-Time WebSocket Progress

Monitor migrations in real-time via WebSocket:

```python
from dbmigrate.core.websocket import FlaskWebSocketServer

# Server setup
server = FlaskWebSocketServer(app)
server.start()

# Client-side JavaScript
const ws = new WebSocket('ws://localhost:5050/ws/progress');
ws.onmessage = (event) => {
    const progress = JSON.parse(event.data);
    console.log(`Table: ${progress.table}`);
    console.log(`Progress: ${progress.percentage}%`);
    console.log(`Rows/sec: ${progress.rows_per_second}`);
    console.log(`ETA: ${progress.eta_seconds}s`);
};
```

### 🔬 Advanced Schema Extraction

Extract enterprise-specific schema objects:

```python
from dbmigrate.extractors.advanced import (
    PostgreSQLAdvancedMixin,
    SQLServerAdvancedMixin,
    OracleAdvancedMixin,
)

# Extract PostgreSQL-specific objects
pg_extractor = PostgreSQLAdvancedExtractor(connection)
extensions = pg_extractor.extract_extensions()  # uuid-ossp, pgcrypto, etc.
materialized_views = pg_extractor.extract_materialized_views()
check_constraints = pg_extractor.extract_check_constraints()

# Extract SQL Server computed columns
ss_extractor = SQLServerAdvancedExtractor(connection)
computed_columns = ss_extractor.extract_computed_columns()

# Extract Oracle partitions
ora_extractor = OracleAdvancedExtractor(connection)
partitions = ora_extractor.extract_partitions()
```

### 🌙 Dark Mode UI

Modern enterprise dashboard with dark mode support:
- Automatic theme detection from system preferences
- Toggle with persistent localStorage storage
- Smooth CSS transitions

---

## 🧪 Testing

DBMigrate includes a comprehensive testing suite:

### Running Tests

```bash
# All tests
pytest tests/ -v

# Unit tests only
pytest tests/ -v -m unit

# Integration tests only
pytest tests/ -v -m integration

# Specific test files
pytest tests/test_masking.py -v
pytest tests/test_parallel.py -v
pytest tests/test_type_mapper.py -v
pytest tests/test_integration.py -v

# With coverage
pytest tests/ --cov=dbmigrate --cov-report=html
```

### RL-Based Automated Test Agent 🤖

DBMigrate includes an innovative **Reinforcement Learning test agent** that automatically explores and tests all features:

```bash
# Run RL test agent
python tests/rl_test_agent.py

# Or with custom episodes
python -c "from tests.rl_test_agent import run_rl_tests; run_rl_tests(episodes=100)"
```

**Features:**
- Q-Learning based exploration
- Automatic edge case discovery
- Coverage-guided testing
- Regression detection
- Property-based test generation

**Sample Output:**
```
============================================================
RL TEST AGENT REPORT
============================================================
Episodes Run: 100
Total Reward: 487.50
Average Reward: 4.88
Feature Coverage: 85.7%
Regressions Found: 0
Unique Errors Found: 2

ACTION COVERAGE:
  CREATE_SQLITE_SOURCE              ████████████████████ (100)
  CREATE_SIMPLE_TABLE               ██████████████████ (92)
  INSERT_SMALL_DATASET              ████████████████ (81)
  MIGRATE_SINGLE_TABLE              ██████████████ (73)
  VALIDATE_ROW_COUNT                ████████████ (65)
  ...
```

### Test Categories

| Category | Description | Run Command |
|----------|-------------|-------------|
| Unit | Individual component tests | `pytest -m unit` |
| Integration | End-to-end workflows | `pytest -m integration` |
| Slow | Performance/stress tests | `pytest -m slow` |
| Database-specific | Requires real DB | `pytest -m postgres` |

---

## Support

- Documentation: https://docs.dbmigrate.io
- Email: support@dbmigrate.io
- Enterprise: enterprise@dbmigrate.io

