Fluent Migrator is a migration framework for .NET much like Ruby on Rails Migrations. Migrations are a structured way to alter your database schema and are an alternative to creating lots of sql scripts that have to be run manually by every developer involved. Migrations solve the problem of evolving a database schema for multiple databases (for example, the developer's local database, the test database and the production database). Database schema changes are described in classes written in C# that can be checked into a version control system.
3.0.0 is released and goes full "dependency injection".We also have a new documentation website!
Please read the changelogor the upgrade guide for further information: 2.x to 3.0.
Package Source | Status | Source Code Tree |
---|---|---|
NuGet (Releases) | master | |
Azure Artifacts (Prerelease) | develop |
The releases are stored on nuget.orgwhile the CI builds are stored on Azure Artifacts.
Documentation | On our GitHub pages |
Discussions | |
Bug/Feature Tracking | |
Build server (new) |
Tool | Consequences when not installed |
---|---|
Multilingual App Toolkit Editor | You're unable to create translations. |
Multilingual App Toolkit Extension (VS2017+) | You get a compilation warning and the changed translation doesn't get compiled. |
A long list of everyone that has contributed to FluentMigrator. Thanks for all the Pull Requests!
Please see our guide on how to contribute
FluentMigrator has an actively developed and maintained ecosystem thanks to third party contributions. The following table summarizes some contributions (but are not endorsed):
GitHub/BitBucket | NuGet Package | Description |
---|---|---|
EasyMigrator | EasyMigrator.FluentMigrator | EasyMigrator allows you to specify database schema using simple POCOs with minimally attributed fields to represent columns. EasyMigrator's core can be adapted to sit on top of various migration libraries. |
FluentMigrator-Generator | FluentMigrator.Generator | Adds a command to the package manager console to generate migrations for FluentMigrator. |
AspNetBoilerplate | Abp.FluentMigrator | Adds fluent extensions specific to the entity model used by the ASP.NET Boilerplate architecture |
Alt.FluentMigrator.VStudio | Alt.FluentMigrator.VStudio | Adds set of commands for Package Manager console: - Add-FluentMigration - Update-FluentDatabase - Rollback-FluentDatabase |
FAKE.FluentMigrator | FAKE.FluentMigrator | FluentMigrator is a .NET library which helps to version database schema using incremental migrations which are described in C#. The basic idea of the FAKE helper is to run FluentMigrator over the existing database using compiled assembly with migrations. |
目录 高级方法 FluentMigrator 版本信息表的架构 数据库对象的默认架构 结论 高级方法 在本文中,我将使用SQL Server作为我的数据库。一般来说,解决方案非常简单。所有微服务都将使用相同的数据库。但是,我们如何确定不会有冲突呢?我们将使用架构。每个微服务将仅在某个特定的数据库架构中创建数据库对象(表、视图、存储过程等),该架构在所有微服务中都是唯一的。为了避免访问其他微服务的数