public static UpgradeEngineBuilder TestDatabase(this SupportedDatabases supportedDatabases, IDbConnection connection) { var builder = supportedDatabases.SqlDatabase(""); builder.OverrideConnectionFactory(connection); return(builder); }
public static UpgradeEngineBuilder SqlDatabase(this SupportedDatabases supported, string connectionString, string schema, bool useAzureSqlIntegratedSecurity) { if (useAzureSqlIntegratedSecurity) { return(AzureSqlDatabaseWithIntegratedSecurity(supported, connectionString, schema)); } return(supported.SqlDatabase(new SqlConnectionManager(connectionString), schema)); }
protected override UpgradeEngineBuilder For(SupportedDatabases supportedDatabases, string connectionString) { return(supportedDatabases.SqlDatabase(connectionString)); }
public UpgradeEngineBuilder DeployTo(SupportedDatabases supported, MigrationConfig config) { return(supported .SqlDatabase(config.ConnectionString) .JournalToSqlTable(DefaultSchema, config.JournalingTable)); }
/// <summary>Creates an upgrader for Azure SQL Databases using Azure AD Integrated Security.</summary> /// <param name="supported">Fluent helper type.</param> /// <param name="connectionString">The connection string.</param> /// <param name="schema">The SQL schema name to use. Defaults to 'dbo' if <see langword="null" />.</param> /// <param name="resource">Resource to access. e.g. https://management.azure.com/.</param> /// <param name="tenantId">If not specified, default tenant is used. Managed Service Identity REST protocols do not accept tenantId, so this can only be used with certificate and client secret based authentication.</param> /// <param name="azureAdInstance">Specify a value for clouds other than the Public Cloud.</param> /// <returns>A builder for a database upgrader designed for Azure SQL Server databases.</returns> public static UpgradeEngineBuilder AzureSqlDatabaseWithIntegratedSecurity(this SupportedDatabases supported, string connectionString, string schema, string resource, string tenantId, string azureAdInstance = "https://login.microsoftonline.com/") { return(supported.SqlDatabase(new AzureSqlConnectionManager(connectionString, resource, tenantId, azureAdInstance), schema)); }