EFCore.AutomaticMigrations 6.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package EFCore.AutomaticMigrations --version 6.0.6                
NuGet\Install-Package EFCore.AutomaticMigrations -Version 6.0.6                
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="EFCore.AutomaticMigrations" Version="6.0.6" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EFCore.AutomaticMigrations --version 6.0.6                
#r "nuget: EFCore.AutomaticMigrations, 6.0.6"                
#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 EFCore.AutomaticMigrations as a Cake Addin
#addin nuget:?package=EFCore.AutomaticMigrations&version=6.0.6

// Install EFCore.AutomaticMigrations as a Cake Tool
#tool nuget:?package=EFCore.AutomaticMigrations&version=6.0.6                

About the package

Enable Automatic Migrations for Entity Framework Core for SQL Databases.

Usage

DbMigrationsOptions object allows to configure migration options:

 AutomaticMigrationDataLossAllowed - default true
 AutomaticMigrationsEnabled- default true

The package support following ways to apply the migrations:

  1. Using MigrateDatabaseToLatestVersion
  • Execute<TContext>(TContext context);
  • ExecuteAsync<TContext>(TContext context);
  • Execute<TContext, TMigrationsOptions>(TContext context, TMigrationsOptions options);
  • ExecuteAsync<TContext, TMigrationsOptions>(TContext context, TMigrationsOptions options);
  //Get context
  var context = services.GetRequiredService<YourContext>();   
  //Apply migrations
  MigrateDatabaseToLatestVersion.Execute(context);
  1. Using Context extensions methods
  • MigrateToLatestVersion<TContext>(this TContext context);
  • MigrateToLatestVersionAsync<TContext>(this TContext context);
  • MigrateToLatestVersion<TContext, TMigrationsOptions>(this TContext context, TMigrationsOptions options);
  • MigrateToLatestVersionAsync<TContext, TMigrationsOptions>(this TContext context, TMigrationsOptions options);
  //Get context
  var context = services.GetRequiredService<YourContext>();
  //Apply migrations
  context.MigrateToLatestVersion()

Roadmap

  • Option to view all migrations
  • Apply different migrations version
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on EFCore.AutomaticMigrations:

Package Downloads
Dao.LightFramework

Package Description

TCDev.APIGenerator.Data.SQL

Adds necessary functionality to use MS SQL Server and Azure SQL Instances with the API Generator.

TCDev.APIGenerator.Data.SQLite

Adds necessary functionality to use SQLLite with the API Generator. Rasepi greates fully working CRUD Apis from just models

TCDev.APIGenerator.Data.Postgres

Adds necessary functionality to use Postgres databases with the API Generator. Rasepi greates fully working CRUD Apis from just models

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on EFCore.AutomaticMigrations:

Repository Stars
DeeJayTC/net-dynamic-api
A library that turns your model into a fully working API, define your model as markdown (soon), json or c#.
Version Downloads Last updated
8.0.5 7,759 5/19/2024
8.0.0 6,386 11/15/2023
7.0.11 909 10/2/2023
7.0.10 2,280 8/20/2023
7.0.7 1,095 6/14/2023
7.0.5.2 1,838 4/28/2023
7.0.5.1 549 4/27/2023
7.0.5 702 4/12/2023
7.0.4 931 3/27/2023
7.0.3 602 3/27/2023
7.0.2 608 3/27/2023
7.0.1 1,005 3/27/2023
7.0.0 4,130 12/4/2022
6.0.10.1 9,251 10/20/2022
6.0.10 1,284 10/12/2022
6.0.10-rc 528 10/12/2022
6.0.9.1 770 10/12/2022
6.0.8 773 10/12/2022
6.0.7 743 10/12/2022
6.0.6 823 10/12/2022
6.0.5 747 10/12/2022
6.0.4 4,942 4/15/2022
6.0.3.1 2,330 3/22/2022
6.0.3 1,627 3/22/2022
6.0.0.1 1,119 12/6/2021
6.0.0 813 12/6/2021
5.0.0 1,872 11/26/2020
1.0.2 1,080 11/26/2020
1.0.1 3,001 5/11/2020
1.0.0 973 4/22/2020

Update to support EF Core 6.0.6