Ejemplo n.º 1
0
        public static IServiceProvider GetMigrationExampleServiceProvider(
            SupportedDatabaseTypes databaseType = SupportedDatabaseTypes.Postgres,
            Dictionary <string, string> additionalOverrideConfig = null)
        {
            var overrideConfig = OverrideConfig.GetInMemoryOverrideConfig(databaseType);

            additionalOverrideConfig?.ToList().ForEach(x => overrideConfig[x.Key] = x.Value);
            return(MigrationBuilder.BuildMigration(databaseType, overrideConfig));
        }
Ejemplo n.º 2
0
 public DatabaseFixture()
 {
     MigratedDatabaseSchema = OverrideConfig.NewRandomSchema;
     foreach (var databaseType in SelectedDatabaseTypesToTest())
     {
         var overrideConfig = OverrideConfig.GetInMemoryOverrideConfig(databaseType, MigratedDatabaseSchema);
         MigrationExecutor.MigrateUp(databaseType, overrideConfig);
     }
 }