Skip to content

This is an extension library for the migrations used in EF Core. It's a work in progress library, as new and additional extensions will be added at any given time.

License

Notifications You must be signed in to change notification settings

Cr3ature/SqlMigrationOperations

Repository files navigation

SQL Migration Operations

Build status

This is an extension library for the migrations used in EF Core. It's a work in progress library, as new and additional extensions will be added at any given time. So feel free to give feedback, request additional support, ...

Supports .NET Core, .NET Standard, .NET Framework

Get it on Nuget

The package:

PM> Install-Package SqlMigrationOperations

Usage

Install the SqlMigrationOperations package

The package:

PM> Install-Package SqlMigrationOperations

Registering dependencies

Call below code inside the Configure method in Startup.cs or from inside an IServiceCollection extension

 services
    .AddEntityFrameworkSqlServer()
    .AddDbContext<{MyDbContext}>(options =>
    {
        options.UseSqlServer(connectionString);
        options.ReplaceService<IMigrationsSqlGenerator, SqlMigrationOperationsGenerator>();
    })
    .BuildServiceProvider();

Need support for a different provider (PostgreSQL, ...) ? Feel free to open a new issue

Todo

  • Adding other provider (PostgreSQL)
  • Extending Operations

About

This is an extension library for the migrations used in EF Core. It's a work in progress library, as new and additional extensions will be added at any given time.

Topics

Resources

License

Stars

Watchers

Forks

Languages