# MigrationsExtension

open class 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

Companion
Link copied to clipboard
object Companion

## Properties

classpath
Link copied to clipboard
val classpath: ConfigurableFileCollection

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

databasePassword
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.

databaseUrl
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.

databaseUser
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.

fileDirectory
Link copied to clipboard
val fileDirectory: DirectoryProperty

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

fileExtension
Link copied to clipboard
val fileExtension: Property<String>

File extension for migration scripts. Defaults to `.sql`.

filePrefix
Link copied to clipboard
val filePrefix: Property<String>

Prefix for migration script names. Defaults to `V`.

fileSeparator
Link copied to clipboard
val fileSeparator: Property<String>

Separator for migration script names. Defaults to `__`.

fileVersionFormat
Link copied to clipboard
val fileVersionFormat: Property<VersionFormat>

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

tablesPackage
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.

testContainersImageName
Link copied to clipboard
val testContainersImageName: Property<String>

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.

useUpperCaseDescription
Link copied to clipboard
val useUpperCaseDescription: Property<Boolean>

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