GenerateMigrationsTask
Task for generating SQL migration scripts from Exposed table definitions. Uses the Gradle Workers API for better isolation and parallel execution.
Properties
Optional password for the database connection, which should be considered as the current schema.
Optional URL for the database connection, which should be considered as the current schema.
Optional username for the database connection, which should be considered as the current schema.
Directory where the generated migration scripts will be stored. Defaults to src/main/resources/db/migration.
Optional file extension for migration scripts. Defaults to ".sql".
Optional prefix for migration script names. Defaults to "V".
Optional separator for migration script names. Defaults to "__".
Optional version format for migration script names. Defaults to using the full current timestamp (with seconds) in the format YYYYMMDDHHMMSS.
Package name where Exposed tables definitions are located.
Optional Docker image name for when using TestContainers to apply existing scripts before generating new ones.
Optional flag for whether the descriptive part of migration script names should be all in upper-case. Defaults to true.
The task's executor instance that accepts submitted work.
Functions
Submits a GenerateMigrationsWorker work to be executed in isolated contexts.
Optional command line argument that overrides any filename configurations declared in the build file. Passing an argument to this option means all migration statements will be stored in a single generated file with the specified name, which should include the required extension as well.