DbUpgrade 1.1.3
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 DbUpgrade --version 1.1.3
NuGet\Install-Package DbUpgrade -Version 1.1.3
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="DbUpgrade" Version="1.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DbUpgrade" Version="1.1.3" />
<PackageReference Include="DbUpgrade" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DbUpgrade --version 1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DbUpgrade, 1.1.3"
#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.
#:package DbUpgrade@1.1.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DbUpgrade&version=1.1.3
#tool nuget:?package=DbUpgrade&version=1.1.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DbUpgrade
Database upgrade helper for .NET Core, support MSSQL
Example
static async Task Main(string[] args)
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetParent(AppContext.BaseDirectory).FullName)
.AddJsonFile("appsettings.json", false)
.Build();
UpgradeEngine.To
// [REQUIRED] set connection to database
.SqlDatabase(configuration.GetConnectionString("Database"))
// [OPTIONAL] create a database if it doesn't exist
.CreateDatabase()
// [REQUIRED] for one of them
.WithScripts(Assembly.GetExecutingAssembly()) // get scripts by assembly
.WithScripts($"{AppDomain.CurrentDomain.BaseDirectory}/Migrations/Once", true) // get scripts by path
// [OPTIONAL]
.LogToConsole()
.LogToFile()
.LogToTable("log")
// [OPTIONAL] defaut values: commandType = CommandType.All and execute = true
.ForCommand(DbUpgrade.CommandType.Create)
.ForCommand(DbUpgrade.CommandType.Alter)
.ForCommand(DbUpgrade.CommandType.Drop, false)
.ForCommand(DbUpgrade.CommandType.Data)
.ForCommand(DbUpgrade.CommandType.Unknown, false)
// [REQUIRED]
.Build();
var scripts = UpgradeEngine.Scripts;
var commands = UpgradeEngine.Scripts.First().Commands;
UpgradeEngine.PerformUpgrade();
#if DEBUG
Console.ReadKey();
#endif
}
Optional
// For 'WithScriptsFromAssembly' option
<ItemGroup>
<EmbeddedResource Include="Migrations\*.sql" />
</ItemGroup>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. net9.0 was computed. 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. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.1
- Dapper (>= 2.0.35)
- Newtonsoft.Json (>= 12.0.3)
- Serilog (>= 2.8.0)
- Serilog.AspNetCore (>= 2.1.1)
- Serilog.Settings.Configuration (>= 3.1.0)
- Serilog.Sinks.Async (>= 1.4.0)
- Serilog.Sinks.Console (>= 3.1.1)
- Serilog.Sinks.File (>= 4.0.0)
- System.Data.SqlClient (>= 4.6.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DbUpgrade:
Package | Downloads |
---|---|
TechAppBuilder.Complete
Complete TechAppBuilder suite with core TAB components for .NET 5.0 applications including Core, Common, CheckIn, CustomHookManager, Media, and TQL modules |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated | |
---|---|---|---|
2.0.1 | 132 | 1/29/2025 | |
2.0.0 | 161 | 12/16/2024 | |
1.2.1 | 140 | 6/13/2024 | |
1.2.0 | 2,012 | 1/4/2024 | |
1.1.19 | 2,817 | 5/11/2023 | |
1.1.18 | 2,441 | 3/9/2023 | |
1.1.17 | 826 | 3/9/2023 | |
1.1.16 | 1,731 | 9/20/2022 | |
1.1.15 | 2,036 | 5/19/2022 | |
1.1.14 | 1,071 | 5/17/2022 | |
1.1.13 | 1,098 | 5/16/2022 | |
1.1.12 | 1,042 | 5/13/2022 | |
1.1.11 | 1,555 | 2/7/2022 | |
1.1.10 | 1,104 | 2/7/2022 | |
1.1.9 | 1,129 | 2/7/2022 | |
1.1.8 | 1,144 | 2/3/2022 | |
1.1.7 | 927 | 11/22/2021 | |
1.1.6 | 1,175 | 11/5/2021 | |
1.1.5 | 1,021 | 10/7/2021 | |
1.1.4 | 944 | 10/6/2021 | |
1.1.3 | 1,061 | 10/6/2021 | |
1.1.2 | 3,461 | 9/22/2021 | |
1.1.1 | 4,336 | 9/1/2021 | |
1.1.0 | 964 | 8/13/2021 | |
1.0.9 | 999 | 6/23/2021 | |
1.0.8 | 12,561 | 12/11/2020 | |
1.0.7 | 1,764 | 9/8/2020 | |
1.0.6 | 1,282 | 9/4/2020 | |
1.0.5 | 1,170 | 8/28/2020 | |
1.0.4 | 1,432 | 6/15/2020 | |
1.0.3 | 1,185 | 6/15/2020 | |
1.0.2 | 1,269 | 6/8/2020 | |
1.0.1 | 1,201 | 5/20/2020 | |
1.0.0 | 1,190 | 5/20/2020 |