1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 16:42:50 -05:00

Fix journal table name

This commit is contained in:
Michal Checinski
2023-08-24 16:30:25 +02:00
parent 98168feb59
commit d73dbfbe41
2 changed files with 14 additions and 14 deletions

View File

@ -1,3 +1,3 @@
ALTER TABLE dbo.Migrations
ALTER TABLE dbo.Migration
ADD Rerunable bit NOT NULL DEFAULT 0
GO

View File

@ -40,26 +40,26 @@ public class RerunableSqlTableJournal : SqlTableJournal
appliedParam.Value = DateTime.Now;
command.Parameters.Add(appliedParam);
// var rerunableParam = command.CreateParameter();
// rerunableParam.ParameterName = "rerunable";
// rerunableParam.Value = Rerunable;
// command.Parameters.Add(rerunableParam);
var rerunableParam = command.CreateParameter();
rerunableParam.ParameterName = "rerunable";
rerunableParam.Value = Rerunable;
command.Parameters.Add(rerunableParam);
command.CommandText = GetInsertJournalEntrySql("@scriptName", "@applied");
// command.CommandText = GetInsertJournalEntrySql("@scriptName", "@applied", "@rerrunable");
command.CommandText = GetInsertJournalEntrySql("@scriptName", "@applied", "@rerrunable");
command.CommandType = CommandType.Text;
return command;
}
// protected string GetInsertJournalEntrySql(string @scriptName, string @applied, string @rerrunable)
// {
// return $"insert into {FqSchemaTableName} (ScriptName, Applied, Rerunable) values ({@scriptName}, {@applied}, {@rerrunable})";
// }
protected string GetInsertJournalEntrySql(string @scriptName, string @applied, string @rerrunable)
{
return $"insert into {FqSchemaTableName} (ScriptName, Applied, Rerunable) values ({@scriptName}, {@applied}, {@rerrunable})";
}
// protected override string GetJournalEntriesSql()
// {
// return $"select [ScriptName] from {FqSchemaTableName} where [Rerunable] = 0 order by [ScriptName]";
// }
protected override string GetJournalEntriesSql()
{
return $"select [ScriptName] from {FqSchemaTableName} where [Rerunable] = 0 order by [ScriptName]";
}
protected override string CreateSchemaTableSql(string quotedPrimaryKeyName)
{