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

Add extension to use rerunable sql table journal

This commit is contained in:
Michal Checinski
2023-08-16 17:31:58 +02:00
parent d83554b850
commit 0d67ee7032

View File

@ -0,0 +1,19 @@
using System;
using System.Data;
using System.Data.SqlClient;
using DbUp;
using DbUp.Builder;
using DbUp.Engine.Output;
using DbUp.Engine.Transactions;
using DbUp.SqlServer;
namespace Bit.Migrator;
public static class RerunableSqlTableJournalExtensions
{
public static UpgradeEngineBuilder JournalRerunableToSqlTable(this UpgradeEngineBuilder builder, string schema, string table)
{
builder.Configure(c => c.Journal = new RerunableSqlTableJournal(() => c.ConnectionManager, () => c.Log, schema, table));
return builder;
}
}