using System.Collections.Generic; using System.Data; namespace Migrato.Core; /// /// IMigrationProvider is the seam implemented by each supported database backend /// public interface IMigrationProvider { /// /// Creates and opens a connection to the database identified by /// IDbConnection CreateConnection(string connectionString); /// /// Ensures the version table used to track applied migrations exists /// void EnsureVersionTable(IDbConnection connection); /// /// Gets the migrations that have been recorded as applied, in no particular order /// IReadOnlyList GetAppliedMigrations(IDbConnection connection); /// /// Records that has been applied /// void RecordMigration(IDbConnection connection, IDbTransaction transaction, Migration migration); /// /// Removes the applied-migration record for /// void RemoveMigration(IDbConnection connection, IDbTransaction transaction, long version); }