Skip to content

Commit 06f6740

Browse files
authored
Replace .For.Migrations() with .For.All() to help users avoid footguns
1 parent e19e993 commit 06f6740

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

articles/in-memory-testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private static void MigrateDb(IServiceCollection services, string connectionStri
4141
.ConfigureRunner(fluentMigratorBuilder => fluentMigratorBuilder
4242
.AddSQLite()
4343
.WithGlobalConnectionString(connectionString)
44-
.ScanIn(assemblyWithMigrations).For.Migrations()
44+
.ScanIn(assemblyWithMigrations).For.All() // Get all migrations, maintenance migrations and customizations
4545
)
4646
.BuildServiceProvider();
4747

articles/migration/migration-filter-tags.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var serviceProvider = new ServiceCollection()
9191
.ConfigureRunner(rb => rb
9292
.AddSqlServer2008()
9393
.WithGlobalConnectionString("server=.\\SQLEXPRESS;uid=testfm;pwd=test;Trusted_Connection=yes;database=FluentMigrator")
94-
.ScanIn(typeof(DoSomeStuffToEuropeanStagingAndProdDbs).Assembly).For.Migrations())
94+
.ScanIn(typeof(DoSomeStuffToEuropeanStagingAndProdDbs).Assembly).For.All())
9595
.AddLogging(lb => lb.AddFluentMigratorConsole())
9696
// Start of type filter configuration
9797
.Configure<RunnerOptions>(opt => {

articles/quickstart/Program.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ private static ServiceProvider CreateServices()
3434
.AddSQLite()
3535
// Set the connection string
3636
.WithGlobalConnectionString("Data Source=test.db")
37-
// Define the assembly containing the migrations
38-
.ScanIn(typeof(AddLogTable).Assembly).For.Migrations())
37+
// Define the assembly containing the migrations, maintenance migrations and other customizations
38+
.ScanIn(typeof(AddLogTable).Assembly).For.All())
3939
// Enable logging to console in the FluentMigrator way
4040
.AddLogging(lb => lb.AddFluentMigratorConsole())
4141
// Build the service provider

0 commit comments

Comments
 (0)