Class MigrationExtensions

Assembly: redb.Core.Pro.dll

Extension methods for working with migrations.
Database-agnostic: requires ISqlDialectPro to be passed.

public static class MigrationExtensions

Inheritance

ObjectMigrationExtensions

Methods

MigrateAllAsync(IRedbService, ISqlDialectPro, Assembly, bool, string?)

Execute all migrations from assembly for all found types.

public static Task<Dictionary<Type, List<MigrationResult>>> MigrateAllAsync(this IRedbService redb, ISqlDialectPro dialect, Assembly assembly, bool dryRun = false, string? appliedBy = null)

MigrateAsync<TProps, TMigration>(IRedbService, ISqlDialectPro, bool, string?)

Execute migration for Props type.

public static Task<List<MigrationResult>> MigrateAsync<TProps, TMigration>(this IRedbService redb, ISqlDialectPro dialect, bool dryRun = false, string? appliedBy = null) where TProps : class where TMigration : IRedbMigration<TProps>, new()

MigrateAsync<TProps>(IRedbService, ISqlDialectPro, Assembly, bool, string?)

Execute all migrations from assembly for specified Props type.

public static Task<List<MigrationResult>> MigrateAsync<TProps>(this IRedbService redb, ISqlDialectPro dialect, Assembly assembly, bool dryRun = false, string? appliedBy = null) where TProps : class

PreviewMigrationAsync<TProps, TMigration>(IRedbService, ISqlDialectPro)

Preview migration (dry-run) - show SQL without executing.

public static Task<List<MigrationResult>> PreviewMigrationAsync<TProps, TMigration>(this IRedbService redb, ISqlDialectPro dialect) where TProps : class where TMigration : IRedbMigration<TProps>, new()