SchemaMigrationExecutor
age-schema-client / SchemaMigrationExecutor
Class: SchemaMigrationExecutor
Defined in: src/schema/migration-executor.ts:164
Schema migration executor
Constructors
Constructor
new SchemaMigrationExecutor(
queryExecutor,
sqlGenerator,
options): SchemaMigrationExecutor;
Defined in: src/schema/migration-executor.ts:177
Create a new schema migration executor
Parameters
| Parameter | Type | Description |
|---|---|---|
queryExecutor | QueryExecutor | Query executor |
sqlGenerator | SQLGenerator | SQL generator |
options | SchemaMigrationExecutorOptions | Migration executor options |
Returns
SchemaMigrationExecutor
Methods
createMigrationPlan()
createMigrationPlan(
sourceSchema,
targetSchema,
options): MigrationPlan;
Defined in: src/schema/migration-executor.ts:193
Create a migration plan
Parameters
| Parameter | Type | Description |
|---|---|---|
sourceSchema | SchemaDefinition | Source schema |
targetSchema | SchemaDefinition | Target schema |
options | MigrationOptions | Migration options |
Returns
Migration plan
executeMigrationPlan()
executeMigrationPlan(plan, options): Promise<MigrationResult>;
Defined in: src/schema/migration-executor.ts:235
Execute a migration plan
Parameters
| Parameter | Type | Description |
|---|---|---|
plan | MigrationPlan | Migration plan |
options | MigrationOptions | Migration options |
Returns
Promise<MigrationResult>
Migration result