Migrator
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public class Migrator : object
Properties
DbFactory
View Source
Declaration
public IDbConnectionFactory DbFactory { get; }
MigrationTypes
View Source
Declaration
public Type[] MigrationTypes { get; }
Timeout
View Source
Declaration
public TimeSpan Timeout { get; set; }
Log
View Source
Declaration
public ILog Log { get; set; }
Fields
All
View Source
Declaration
public const string All = null
Last
View Source
Declaration
public const string Last = null
Methods
Run()
View Source
Declaration
public AppTaskResult Run()
Returns
Run(Boolean)
View Source
Declaration
public AppTaskResult Run(bool throwIfError)
Returns
Parameters
Type | Name |
---|---|
System.Boolean | throwIfError |
GetAllMigrationTypes(Assembly[])
View Source
Declaration
public static List<Type> GetAllMigrationTypes(params Assembly[] migrationAssemblies)
Returns
List<Type>
Parameters
Type | Name |
---|---|
Assembly[] | migrationAssemblies |
Init(IDbConnection)
View Source
Declaration
public static void Init(IDbConnection db)
Parameters
Type | Name |
---|---|
IDbConnection | db |
Recreate(IDbConnection)
View Source
Declaration
public static void Recreate(IDbConnection db)
Parameters
Type | Name |
---|---|
IDbConnection | db |
Clear(IDbConnection)
View Source
Declaration
public static void Clear(IDbConnection db)
Parameters
Type | Name |
---|---|
IDbConnection | db |
Revert(Nullable<String>)
View Source
Declaration
public AppTaskResult Revert(string? migrationName)
Returns
Parameters
Type | Name |
---|---|
System.Nullable<System.String> | migrationName |
Revert(Nullable<String>, Boolean)
View Source
Declaration
public AppTaskResult Revert(string? migrationName, bool throwIfError)
Returns
Parameters
Type | Name |
---|---|
System.Nullable<System.String> | migrationName |
System.Boolean | throwIfError |
Down(IDbConnectionFactory, Type)
View Source
Declaration
public static AppTaskResult Down(IDbConnectionFactory dbFactory, Type migrationType)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
Type | migrationType |
Down(IDbConnectionFactory, Type[])
View Source
Declaration
public static AppTaskResult Down(IDbConnectionFactory dbFactory, Type[] migrationTypes)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
Type[] | migrationTypes |
Up(IDbConnectionFactory, Type)
View Source
Declaration
public static AppTaskResult Up(IDbConnectionFactory dbFactory, Type migrationType)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
Type | migrationType |
Up(IDbConnectionFactory, Type[])
View Source
Declaration
public static AppTaskResult Up(IDbConnectionFactory dbFactory, Type[] migrationTypes)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
Type[] | migrationTypes |
Run(IDbConnectionFactory, Type, Action<MigrationBase>)
View Source
Declaration
public static MigrationBase Run(IDbConnectionFactory dbFactory, Type nextRun, Action<MigrationBase> migrateAction)
Returns
ServiceStack.OrmLite.MigrationBase
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
Type | nextRun |
Action<ServiceStack.OrmLite.MigrationBase> | migrateAction |
RunAll(IDbConnectionFactory, IEnumerable<Type>, Action<MigrationBase>)
View Source
Declaration
public static AppTaskResult RunAll(IDbConnectionFactory dbFactory, IEnumerable<Type> migrationTypes, Action<MigrationBase> migrateAction)
Returns
Parameters
Type | Name |
---|---|
ServiceStack.Data.IDbConnectionFactory | dbFactory |
IEnumerable<Type> | migrationTypes |
Action<ServiceStack.OrmLite.MigrationBase> | migrateAction |