Files
duplicati/Duplicati/Library/SQLiteHelper/DBSchemaUpgrades/DbUpgradesRegistry.cs
T
Dan Stahr d0f8fffc25 Added support for executing non-SQL code when performing a database update.
Some of the database migrations I'm planning to perform are very slow if using SQL only
or entirely impossible using the standard SQLite toolchain. I added a simple interface
with "before SQL" and "after SQL" hooks so that a database upgrade can perform custom
code operations as well.
2017-06-08 15:50:03 +01:00

20 lines
745 B
C#

using System.Collections.Generic;
using Duplicati.Library.SQLiteHelper.DBUpdates;
namespace Duplicati.Library.SQLiteHelper.DBSchemaUpgrades
{
class DbUpgradesRegistry
{
/// <summary>
/// Registry of custom code to be executed along a SQL schema upgrade. The key of the map
/// represents a 1-based version the upgrade code applies to (after performing the update
/// the database will be at that version), the value is an instance of upgrader that
/// implements the hooks code.
/// </summary>
public static readonly IDictionary<int, IDbSchemaUpgrade> CodeChanges =
new Dictionary<int, IDbSchemaUpgrade>()
{
};
}
}