kales-cli / kales.cli.task / GenerateMigrationTask

GenerateMigrationTask

class GenerateMigrationTask : KalesContextualTask

Constructors

<init>

GenerateMigrationTask(workingDir: File, migrationClassName: String, tableToCreate: String? = null, dateProvider: () -> Date = { Date() })

Inherited Properties

appDirectory

val appDirectory: File

returns the directory where the code for package "com.example.foo.app" is found

applicationRootDir

val applicationRootDir: File

appPackageName

val appPackageName: String?

returns "com.example.foo"

dbMigrateDir

val dbMigrateDir: File

Returns the path to the migrations directory

resourcesDir

val resourcesDir: File

Functions

run

fun run(): Unit

Inherited Functions

rawWriteTo

fun FileSpec.rawWriteTo(destination: Path): Unit

Writes this FileSpec to the provided file Path

readDatabaseConfig

fun readDatabaseConfig(): KalesDatabaseConfig

Returns a KalesDatabaseConfig representing the current project's database.yml file