mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
Add extension to use rerunable sql table journal
This commit is contained in:
19
util/Migrator/RerunableSqlTableJournalExtensions.cs
Normal file
19
util/Migrator/RerunableSqlTableJournalExtensions.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user