mirror of
https://github.com/bitwarden/server.git
synced 2025-05-23 04:21:05 -05:00
include bit. namespace prefix
This commit is contained in:
parent
1bd4d39136
commit
5da0edb412
@ -46,17 +46,19 @@ namespace Bit.Migrator
|
|||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
using(var connection = new SqlConnection(_connectionString))
|
using(var connection = new SqlConnection(_connectionString))
|
||||||
{
|
{
|
||||||
// Rename old migration scripts to new namespace.
|
// Rename old migration scripts to new namespace.
|
||||||
var command = new SqlCommand(
|
var command = new SqlCommand(
|
||||||
"IF OBJECT_ID('Migration','U') IS NOT NULL " +
|
"IF OBJECT_ID('Migration','U') IS NOT NULL " +
|
||||||
"UPDATE [dbo].[Migration] SET " +
|
"UPDATE [dbo].[Migration] SET " +
|
||||||
"[ScriptName] = REPLACE([ScriptName], '.Setup.', '.Migrator.');", connection);
|
"[ScriptName] = REPLACE([ScriptName], 'Bit.Setup.', 'Bit.Migrator.');", connection);
|
||||||
command.Connection.Open();
|
command.Connection.Open();
|
||||||
command.ExecuteNonQuery();
|
command.ExecuteNonQuery();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
var builder = DeployChanges.To
|
var builder = DeployChanges.To
|
||||||
.SqlDatabase(_connectionString)
|
.SqlDatabase(_connectionString)
|
||||||
.JournalToSqlTable("dbo", "Migration")
|
.JournalToSqlTable("dbo", "Migration")
|
||||||
@ -92,6 +94,7 @@ namespace Bit.Migrator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return result.Successful;
|
return result.Successful;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user