public ExtendedPostgresProcessor(IDbMigrationConfig dbMigrationConfig, PostgresQuoter quoter, PostgresDbFactory factory, PostgresGenerator generator, ILogger <ExtendedPostgresProcessor> logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedPostgresGenerator> extendedGenerator) : base(factory, generator, logger, options, connectionStringAccessor) { ExtendedGeneratorField = extendedGenerator; DbMigrationConfig = dbMigrationConfig; if (dbMigrationConfig.ProcessorId == ProcessorIds.PostgresProcessorId) { var stopWatch = new StopWatch(); PostgresDatabaseCreator.CreateDatabase( dbMigrationConfig, () => { Logger.LogSay($"Creating Postgres database '{dbMigrationConfig.DatabaseName.ToLower()}'..."); stopWatch.Start(); }, sql => { stopWatch.Stop(); Logger.LogSql(sql); Logger.LogSay($"Created Postgres database '{dbMigrationConfig.DatabaseName.ToLower()}'..."); Logger.LogElapsedTime(stopWatch.ElapsedTime()); }); } this.SetPrivateFieldValue <PostgresProcessor>("_quoter", quoter); }
public ExtendedOracleProcessorBase(OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IOptionsSnapshot <RunnerOptions> runnerOptions, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator, IDbMigrationConfig migrationConfig, IMigrationSourceItem migrationSourceItem = null, IVersionTableMetaData versionTableMetaData = null, IOptions <FluentMigratorLoggerOptions> loggerGenOptions = null, IOptions <LogFileFluentMigratorLoggerOptions> logFileOptions = null) : base(ProcessorIds.OracleProcessorId, factory, generator, logger, options, connectionStringAccessor) { RunnerOptions = runnerOptions; MigrationConfig = migrationConfig; VersionTableMetaData = versionTableMetaData; LoggerOptions = loggerGenOptions?.Value; LoggerFileOptions = logFileOptions?.Value; IsSqlLogEnabled = (LoggerOptions?.ShowSql ?? false) || (LoggerFileOptions?.ShowSql ?? false); ExtendedGenerator = extendedGenerator; MigrationMetadata = new MigrationMetadata(migrationSourceItem).InitMetadata(MigrationConfig); ConnectionStringFunc = () => connectionStringAccessor.ConnectionString; Initialize(); }
public ExtendedOracleProcessorBase(OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator) : base(ProcessorIds.OracleProcessorId, factory, generator, logger, options, connectionStringAccessor) { ExtendedGenerator = extendedGenerator; }
public ExtendedOracleProcessorBase( IDbConfig dbConfig, OracleBaseDbFactory factory, IMigrationGenerator generator, ILogger logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedOracleMigrationGenerator> extendedGenerator) : base(dbConfig.DbType.GetProcessorId(), factory, generator, logger, options, connectionStringAccessor) { ExtendedGenerator = extendedGenerator; }
public ExtendedPostgresProcessor( IDbConfig dbConfig, PostgresQuoter quoter, PostgresDbFactory factory, PostgresGenerator generator, ILogger <ExtendedPostgresProcessor> logger, IOptionsSnapshot <ProcessorOptions> options, IConnectionStringAccessor connectionStringAccessor, IExtendedMigrationGenerator <ExtendedPostgresGenerator> extendedGenerator) : base(factory, generator, logger, options, connectionStringAccessor) { ExtendedGeneratorField = extendedGenerator; DbConfig = dbConfig; if (dbConfig.DbType.GetProcessorId() == ProcessorIds.PostgresProcessorId) { PostgresDatabaseCreator.CreateDatabase(dbConfig); } this.SetPrivateFieldValue <PostgresProcessor>("_quoter", quoter); }