JSMigrationGenerator
Hierarchy
- MigrationGenerator
- JSMigrationGenerator
Index
Constructors
Methods
Constructors
constructor
Parameters
driver: AbstractSqlDriver<AbstractSqlConnection, AbstractSqlPlatform>
namingStrategy: NamingStrategy
options: MigrationsOptions
Returns JSMigrationGenerator
Methods
createStatement
Parameters
sql: string
padLeft: number
Returns string
generate
Generates the full contents of migration file. Uses
generateMigrationFile
to get the file contents.Parameters
diff: { down: string[]; up: string[] }
down: string[]
up: string[]
optionalpath: string
optionalname: string
Returns Promise<[string, string]>
generateMigrationFile
Returns the file contents of given migration.
Parameters
className: string
diff: { down: string[]; up: string[] }
down: string[]
up: string[]
Returns string
Creates single migration statement. By default adds
this.addSql(sql);
to the code.