1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-28 16:15:52 +01:00

include bit. namespace prefix

This commit is contained in:
Kyle Spearrin 2019-03-25 15:59:12 -04:00
parent 1bd4d39136
commit 5da0edb412

View File

@ -46,17 +46,19 @@ namespace Bit.Migrator
command.ExecuteNonQuery();
}
cancellationToken.ThrowIfCancellationRequested();
using(var connection = new SqlConnection(_connectionString))
{
// Rename old migration scripts to new namespace.
var command = new SqlCommand(
"IF OBJECT_ID('Migration','U') IS NOT NULL " +
"UPDATE [dbo].[Migration] SET " +
"[ScriptName] = REPLACE([ScriptName], '.Setup.', '.Migrator.');", connection);
"[ScriptName] = REPLACE([ScriptName], 'Bit.Setup.', 'Bit.Migrator.');", connection);
command.Connection.Open();
command.ExecuteNonQuery();
}
cancellationToken.ThrowIfCancellationRequested();
var builder = DeployChanges.To
.SqlDatabase(_connectionString)
.JournalToSqlTable("dbo", "Migration")
@ -92,6 +94,7 @@ namespace Bit.Migrator
}
}
cancellationToken.ThrowIfCancellationRequested();
return result.Successful;
}
}