Class: SchemaMigrationDiff
Defined in: src/codegen/SchemaMigrationDiff.ts:36
Builds migration statements from a detailed schema diff.
Constructors
Constructor
new SchemaMigrationDiff():
SchemaMigrationDiff
Returns
SchemaMigrationDiff
Methods
generateStatements()
staticgenerateStatements(diff,entityMetas,adapter):object
Defined in: src/codegen/SchemaMigrationDiff.ts:40
Generates up and down statements from a DetailedSchemaDiff
Parameters
| Parameter | Type |
|---|---|
diff | DetailedSchemaDiff |
entityMetas | EntityMetadata[] |
adapter | IDbAdapter |
Returns
object
| Name | Type | Defined in |
|---|---|---|
up | string[] | src/codegen/SchemaMigrationDiff.ts:44 |
down | string[] | src/codegen/SchemaMigrationDiff.ts:44 |
squashMigrations()
staticsquashMigrations(migrations,squashedName?):MigrationModule
Defined in: src/codegen/SchemaMigrationDiff.ts:121
Squashes multiple migration modules into a single consolidated migration module.
Parameters
| Parameter | Type | Default value |
|---|---|---|
migrations | MigrationModule[] | undefined |
squashedName | string | 'SquashedBaseline' |