Files
duplicati/Duplicati/Library/SQLiteHelper/DBSchemaUpgrades/IDbSchemaUpgrade.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

27 lines
772 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Duplicati.Library.SQLiteHelper.DBUpdates
{
// TODO: Consider passing in a transaction and performing everything in one go.
public interface IDbSchemaUpgrade
{
/// <summary>
/// Executed before the textual SQL command is executed.
/// </summary>
/// <param name="connection"></param>
void BeforeSql(System.Data.IDbConnection connection);
/// <summary>
/// Executed after the textual SQL command is executed.
/// </summary>
/// <param name="connection"></param>
void AfterSql(System.Data.IDbConnection connection);
}
}