Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JournalToOracleTable extension method #10

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@ protected override void ReadCustomStatement() { }
}
public static class OracleExtensions
{
public static DbUp.Builder.UpgradeEngineBuilder JournalToOracleTable(this DbUp.Builder.UpgradeEngineBuilder builder, string schema, string table) { }
public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(DbUp.Engine.Transactions.IConnectionManager connectionManager) { }
[System.ObsoleteAttribute("Use OracleDatabaseWithDefaultDelimiter, OracleDatabaseWithSemicolonDelimiter or the OracleDatabase with the delimiter parameter instead, see https://github.com/DbUp/DbUp/pull/335")]
public static DbUp.Builder.UpgradeEngineBuilder OracleDatabase(this DbUp.Builder.SupportedDatabases supported, string connectionString) { }
13 changes: 13 additions & 0 deletions src/dbup-oracle/OracleExtensions.cs
Original file line number Diff line number Diff line change
@@ -170,6 +170,19 @@ public static UpgradeEngineBuilder OracleDatabase(IConnectionManager connectionM
builder.WithPreprocessor(new OraclePreprocessor());
return builder;
}

/// <summary>
/// Tracks the list of executed scripts in an Oracle table.
/// </summary>
/// <param name="builder">The builder.</param>
/// <param name="schema">The schema.</param>
/// <param name="table">The table.</param>
/// <returns></returns>
public static UpgradeEngineBuilder JournalToOracleTable(this UpgradeEngineBuilder builder, string schema, string table)
{
builder.Configure(c => c.Journal = new OracleTableJournal(() => c.ConnectionManager, () => c.Log, schema, table));
return builder;
}
}
#pragma warning restore IDE0060 // Remove unused parameter
}