PowerSchemaSync 1.0.0
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Framework 4.6.1
This package targets .NET Framework 4.6.1. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PowerSchemaSync --version 1.0.0
NuGet\Install-Package PowerSchemaSync -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PowerSchemaSync" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PowerSchemaSync --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PowerSchemaSync, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PowerSchemaSync as a Cake Addin #addin nuget:?package=PowerSchemaSync&version=1.0.0 // Install PowerSchemaSync as a Cake Tool #tool nuget:?package=PowerSchemaSync&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
power-schema-sync
Compare database structures and generate SQL for structure synchronization
Quick Start
IDataBase dbSoruce = DataBaseFactory.GetDataBase(DataBaseType.MYSQL, "connString1");
IDataBase dbTarget = DataBaseFactory.GetDataBase(DataBaseType.MYSQL, "connString2");
// 1.获取整个库的表结构创建sql
var sqlStructure = dbSoruce.ExportStructure("test");
Console.WriteLine(sqlStructure);
// 2.结构比较获取同步结构的sql
var diff = new DiffUtility(dbSoruce, "test", dbTarget, "test").Diff();
Console.WriteLine("------------需要新建的表-----------");
foreach (var sqls in diff.CreateTables.Select(x => x.SyncSqls))
{
foreach (var sql in sqls)
{
Console.WriteLine(sql);
}
}
Console.WriteLine("------------需要删除的表-----------");
foreach (var sqls in diff.DeleteTables.Select(x => x.SyncSqls))
{
foreach (var sql in sqls)
{
Console.WriteLine(sql);
}
}
Console.WriteLine("------------需要修改的字段或索引-----------");
foreach (var sqls in diff.EditTables.Select(x => x.SyncSqls))
{
foreach (var sql in sqls)
{
Console.WriteLine(sql);
}
}
Console.ReadLine();
Features
- table sync
- column ysnc
- index ysnc
- primary ysnc
- view ysnc
- func sync
- stored procedure sync
Supported Databases
- Mysql
- MS SqlServer
- Orecle
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net461 is compatible. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.6.1
- Dapper (>= 2.0.123)
- MySqlConnector (>= 2.2.6)
-
net6.0
- Dapper (>= 2.0.123)
- MySqlConnector (>= 2.2.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.