public SqlServerFixture() : base(new SqlConnection(CreateConnectionString()), new SqlServerDialect()) { var runner = new SqlServerMigrationRunner(Connection.ConnectionString); runner.CreateDatabaseIfNotExists(); runner.MigrateUp(typeof(TMigrationInfo).Assembly, typeof(TMigrationInfo).Namespace); }
private static void MigrateToLatest(string connectionString, RuntimeOptions options) { var runner = new SqlServerMigrationRunner(connectionString); if (options.CreateIfNotExists) { runner.CreateDatabaseIfNotExists(); } if (options.MigrateOnStartup) { runner.MigrateUp(typeof(CreateIdentitySchema).Assembly, typeof(CreateIdentitySchema).Namespace); } }