MigrationsExtension

Configuration of the migrations extension for the Exposed Gradle Plugin.

This extension allows users to configure the behavior of the plugin in their build.gradle.kts file in a nested migrations block.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val classpath: ConfigurableFileCollection

Classpath that is scanned for Exposed table definitions. Defaults to the project's runtime classpath.

Link copied to clipboard
val databasePassword: Property<String>

Password for the database connection, which should be considered as the current schema. This is optional only if testContainersImageName is not set.

Link copied to clipboard
val databaseUrl: Property<String>

URL for the database connection, which should be considered as the current schema. This is optional only if testContainersImageName is not set.

Link copied to clipboard
val databaseUser: Property<String>

Username for the database connection, which should be considered as the current schema. This is optional only if testContainersImageName is not set.

Link copied to clipboard
val fileDirectory: DirectoryProperty

Directory where the generated migration scripts will be stored. Defaults to src/main/resources/db/migration.

Link copied to clipboard
val fileExtension: Property<String>

File extension for migration scripts. Defaults to .sql.

Link copied to clipboard
val filePrefix: Property<String>

Prefix for migration script names. Defaults to V.

Link copied to clipboard
val fileSeparator: Property<String>

Separator for migration script names. Defaults to __.

Link copied to clipboard

Version format for migration script names. Defaults to using the full current timestamp (with seconds) in the format YYYYMMDDHHMMSS.

Link copied to clipboard
val tablesPackage: Property<String>

Package name where Exposed table definitions are located. The plugin will scan this package for table definitions.

Link copied to clipboard

Docker image name for when using TestContainers to apply existing scripts before generating new ones. This is optional only if no values are set for any database properties.

Link copied to clipboard

Whether the descriptive part of migration script names should be all in upper-case. Defaults to true.