TSMigrationGenerator
Hierarchy
- MigrationGenerator
- TSMigrationGenerator
Index
Constructors
Methods
Constructors
constructor
Parameters
driver: AbstractSqlDriver<AbstractSqlConnection, AbstractSqlPlatform>
namingStrategy: NamingStrategy
options: MigrationsOptions
Returns TSMigrationGenerator
Methods
inheritedcreateStatement
Parameters
sql: string
padLeft: number
Returns string
inheritedgenerate
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.