# Class Migrator OptimaJet.Workflow.Migrator.Migrator Provides methods for running FluentMigrator migrations. Namespace: [OptimaJet.Workflow.Migrator](https://api.workflowengine.io/migrator/OptimaJet.Workflow.Migrator/) ```csharp public static class Migrator ``` ## Methods `public static void MigrateUp(WorkflowRuntime runtime)` Runs migrations for the specified runtime. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | `public static void CustomMigrateUp(WorkflowRuntime runtime, Assembly assembly)` Runs migrations for the specified runtime from the specified assembly. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | | `assembly` | `Assembly` | The assembly with migrations. | `public static IEnumerable GetUnappliedMigrationNames(WorkflowRuntime runtime, Assembly? scanIn = null)` Get a list of names of not applied SQL scripts. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | | `scanIn` | `Assembly` | The custom assembly with migrations. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | The list of script names. | `public static IEnumerable GetMigrationNames(WorkflowRuntime runtime, Assembly? scanIn = null)` Get a list of SQL script names. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | | `scanIn` | `Assembly` | The custom assembly with migrations. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | The list of script names. | `public static string GetMigrationSql(WorkflowRuntime runtime, string scriptName, Assembly? scanIn = null)` Get the text of the SQL script. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | | `scriptName` | `String` | The full name of the SQL script. | | `scanIn` | `Assembly` | The custom assembly with SQL | ### Returns | Type | Description | | --- | --- | | `String` | The text of the SQL script. | `public static IReadOnlyList GetMigrations(WorkflowRuntime runtime, Assembly? scanIn = null)` Discovers workflow engine migrations in the persistence provider assembly and, optionally, in an additional assembly. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | The WorkflowEngine runtime instance. | | `scanIn` | `Assembly` | An optional additional assembly to scan for migrations. | ### Returns | Type | Description | | --- | --- | | `IReadOnlyList` | A read-only list of discovered migrations ordered by migration version. Returns an empty list when no migrations are found. | [Previous MigrationInfo](https://api.workflowengine.io/migrator/OptimaJet.Workflow.Migrator/MigrationInfo/) [Next ProductVersionAttribute](https://api.workflowengine.io/migrator/OptimaJet.Workflow.Migrator/ProductVersionAttribute/)