Something went wrong. Try again.
A database migration tool for .NET
Something went wrong. Try again.
1.2 kB · 35 lines
C#
at develop
123456789101112131415161718192021222324252627282930313233343536using System.Collections.Generic;using System.Data;
namespace Migrato.Core;
/// <summary>/// IMigrationProvider is the seam implemented by each supported database backend/// </summary>public interface IMigrationProvider{ /// <summary> /// Creates and opens a connection to the database identified by <paramref name="connectionString"/> /// </summary> IDbConnection CreateConnection(string connectionString);
/// <summary> /// Ensures the version table used to track applied migrations exists /// </summary> void EnsureVersionTable(IDbConnection connection);
/// <summary> /// Gets the migrations that have been recorded as applied, in no particular order /// </summary> IReadOnlyList<AppliedMigration> GetAppliedMigrations(IDbConnection connection);
/// <summary> /// Records that <paramref name="migration"/> has been applied /// </summary> void RecordMigration(IDbConnection connection, IDbTransaction transaction, Migration migration);
/// <summary> /// Removes the applied-migration record for <paramref name="version"/> /// </summary> void RemoveMigration(IDbConnection connection, IDbTransaction transaction, long version);}