FluentMigrator v3.1.0 Release Notes
Release Date: 2018-06-01 // almost 6 years ago-
➕ Added
- 🆕 New
IFilteringMigrationSource
to avoid unnecessary instantiations - 🆕 New
IVersionTableMetaDataSourceItem
to specify multiple places to search for version table metadata dotnet-fm
andMigrate.exe
are now referencingFSharp.Core
which should ease the problems with F# (issue #883).- 🆕 New configuration for types from assemblies (see below)
🔄 Changed
- #877: Connection specific information should be resolved as scoped
- #884: Embedded script cannot be found in assemblies on .NET Core
- ⬆️ #888: VersionTable not changed after upgrading to 3.0
- Query
IConfigurationRoot
for the connection string ifIConfiguration
couldn't be found
🛠 Fixed
- #886: Using profiles in 3.x versions
- 👍 #892: Nullable types are not supported in MSBuild runner
- #890: OracleManaged Migrations fail with runtime Exceptions
Details
dotnet-fm
now uses the Oracle beta ADO.NET driver🚀 Oracle plans to release a non-beta version of the driver in Q3, but 🍎 it's the only Oracle driver that works under Linux/MacOS. The console 🏁 tool (
Migrate.exe
) is more Windows-centric and will therefore keep using the standard Oracle ADO.NET library. Thedotnet-fm
is mostly 🏁 used on non-Windows platforms and is therefore predestinated to use the new beta driver.The statement from Oracle can be found on the Oracle website.
The console tool will switch to the new driver when it becomes stable.
🆕 New configuration options
var services = new ServiceCollection() .AddFluentMigratorCore() .ConfigureRunner(rb => rb .AddSQLite() .ScanIn(typeof(YourType).Assembly)); // There is a fluent interface to configure the targets for ScanIn
🔧 Configurations for
ScanIn(assemblies)
:--+-------------------------------------------+-> | ^ | | +- For -+- All() ---------------------------+ ^ | ^ | | | | +- Migrations() ------------+-->+-->+ | | ^ | | | | | | +- VersionTableMetaData() --+ | | | ^ | | | | | | +- EmbeddedResources() -----+ | | | | v +<--------------------------------------+
Example:
var services = new ServiceCollection() .AddFluentMigratorCore() .ConfigureRunner(rb => rb .AddSQLite() .ScanIn(typeof(YourType).Assembly) .For.Migrations() .For.EmbeddedResources()); // There is a fluent interface to configure the targets for ScanIn
Dependency injection changes (issue #877)
👌 Supported scenario
This allows the reconfiguration of the connection string/used database at run-time.
Applies to
- Connection string
- 🖨 Processor/generator selection
- Type filters
🔄 Changes
The following option classes are now resolved using
IOptionSnapshot<T>
:ProcessorOptions
SelectingProcessorAccessorOptions
SelectingGeneratorAccessorOptions
TypeFilterOptions
The following services are now scoped instead of singleton:
- 📇
IVersionTableMetaDataAccessor
- 📇
IVersionTableMetaData
IMigrationSource
IMigrationInformationLoader
The
MigrationSource
now consumes all registeredIMigrationSourceItem
instances. - 🆕 New