Skip to main content
Version: 4.4

Class: MigrationGenerator#

migrations.MigrationGenerator

Hierarchy#

  • MigrationGenerator

Constructors#

constructor#

+ new MigrationGenerator(driver: AbstractSqlDriver<AbstractSqlConnection>, namingStrategy: NamingStrategy, options: MigrationsOptions): MigrationGenerator

Parameters:#

NameType
driverAbstractSqlDriver<AbstractSqlConnection>
namingStrategyNamingStrategy
optionsMigrationsOptions

Returns: MigrationGenerator

Defined in: packages/migrations/src/MigrationGenerator.ts:5

Properties#

driver#

Protected Readonly driver: AbstractSqlDriver<AbstractSqlConnection>


namingStrategy#

Protected Readonly namingStrategy: NamingStrategy


options#

Protected Readonly options: MigrationsOptions

Methods#

createStatement#

createStatement(sql: string, padLeft: number): string

Parameters:#

NameType
sqlstring
padLeftnumber

Returns: string

Defined in: packages/migrations/src/MigrationGenerator.ts:30


generate#

generate(diff: string[], path?: string): Promise<[string, string]>

Parameters:#

NameType
diffstring[]
path?string

Returns: Promise<[string, string]>

Defined in: packages/migrations/src/MigrationGenerator.ts:11


generateJSMigrationFile#

generateJSMigrationFile(className: string, diff: string[]): string

Parameters:#

NameType
classNamestring
diffstring[]

Returns: string

Defined in: packages/migrations/src/MigrationGenerator.ts:39


generateTSMigrationFile#

generateTSMigrationFile(className: string, diff: string[]): string

Parameters:#

NameType
classNamestring
diffstring[]

Returns: string

Defined in: packages/migrations/src/MigrationGenerator.ts:53

Last updated on by renovate[bot]