Skip to content

Commit

Permalink
Add JournalToOracleTable extension method (#10)
Browse files Browse the repository at this point in the history
* Add JournalToOracleTable extension method

* Updated surface area test

---------

Co-authored-by: nic upchurch <[email protected]>
  • Loading branch information
droyad and nicUpchurch authored Dec 17, 2024
1 parent 8cb2925 commit dbb0e19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Tests/ApprovalFiles/NoPublicApiChanges.Run.approved.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) { }
Expand Down
13 changes: 13 additions & 0 deletions src/dbup-oracle/OracleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit dbb0e19

Please sign in to comment.