SchemaForge.Cli
2.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet tool install --global SchemaForge.Cli --version 2.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local SchemaForge.Cli --version 2.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SchemaForge.Cli&version=2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SchemaForge.Cli --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SchemaForge
A high-performance, cross-database migration tool for .NET that migrates schemas and data between different database systems. Designed for enterprise-scale moves, SchemaForge handles complex views, cross-schema foreign keys, and massive datasets with ease.
Supported Databases
- SQL Server (source and target)
- PostgreSQL (source and target)
- MySQL (source and target)
- Oracle (source and target)
Features
- Robust Schema Migration - Automatic creation of tables, primary keys, and complex foreign key relationships across all 4 platforms.
- Enterprise-Grade Constraints - Implements "Future Enforcement, Past Forgiveness" model using
ENABLE NOVALIDATE(Oracle),NOT VALID(Postgres), andWITH NOCHECK(SQL Server) to ensure migrations complete even with legacy data orphans. - Automated Infrastructure - Automatically creates target databases, schemas, and Oracle users/permissions on-the-fly.
- High-Performance Data Transfer - Parallel table migration with batched bulk writes, read-ahead pipelines, and
sql_log_bin=0(MySQL) for maximum speed and disk efficiency. - Intelligent View Migration - Sophisticated SQL dialect conversion for view definitions, handling complex functions like
DECODE,BITAND,SYSDATETIME, and varied quoting styles. - Verified with WideWorldImporters - Stress-tested and verified using the full, multi-schema production dataset from Microsoft.
- Plugin-Based Architecture - Fully extensible provider model built on .NET 9 and standard interfaces.
- Dry Run Mode - Generate and preview complete migration SQL scripts without executing against the target.
Quick Start
Install as a .NET global tool
# Install from NuGet
dotnet tool install --global SchemaForge.Cli
# Run a migration
schemaforge --from postgres --to oracle \
--source-conn "Host=127.0.0.1;Database=prod;Username=pg;Password=..." \
--target-conn "User Id=system;Password=...;Data Source=127.0.0.1:1521/FREEPDB1" \
--schema SALES --verbose
Use as a library in your .NET app
dotnet add package SchemaForge
dotnet add package SchemaForge.Providers.SqlServer
dotnet add package SchemaForge.Providers.Postgres
using SchemaForge.Builder;
await DbMigrate
.FromSqlServer(srcConn)
.ToPostgres(targetConn, "public")
.MigrateAll()
.WithMaxParallelTables(4)
.ExecuteAsync();
CLI Usage
| Option | Type | Default | Description |
|---|---|---|---|
--from |
string | - | Source DB type: sqlserver, postgres, mysql, oracle |
--to |
string | - | Target DB type: sqlserver, postgres, mysql, oracle |
--schema |
string | public |
Target schema name |
--parallel |
int | 4 |
Max parallel table migrations |
--batch-size |
int | 10000 |
Rows per batch |
--drop-target |
flag | false |
Wipe target schemas before starting |
Data Type Mapping
| SQL Server | PostgreSQL | MySQL | Oracle |
|---|---|---|---|
tinyint |
boolean |
TINYINT(1) |
NUMBER(3) |
bit |
boolean |
TINYINT(1) |
NUMBER(1) |
varchar(n) |
character varying(n) |
VARCHAR(n) |
VARCHAR2(n) |
datetime2 |
timestamp |
DATETIME |
TIMESTAMP |
Changelog
v2.0.0 — Enterprise Resilience Update
- Major Release — Full 12-path verification matrix complete with WWI dataset.
- Robust FKs — Implemented
ENABLE NOVALIDATE(Oracle),NOT VALID(Postgres), andWITH NOCHECK(SQL Server). - MySQL Driver Upgrade — Switched to
MySqlConnectorfor superior Docker/SSL stability. - Infrastructure Automation — Added
EnsureDatabaseExistsAsyncfor SQL Server and MySQL. - Dialect Expansion — Added support for
BITAND,DECODE, andFROM_TZtranslations. - API Enhancement — New
WithMaxParallelTables(n)andWithSourceSchemaFilterfluent methods. - Performance — Implemented
sql_log_bin=0for MySQL to prevent "Disk Full" errors during large moves. - Bug Fixes — Fixed 15+ critical bugs in view routing, regex backreferences, and identifier quoting.
v1.0.51
- Fixed SQL Server to SQL Server migration issues and cross-schema FK references.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.