Skip to content

ApplicationCommand can be registered as a Gradle task #175

@rainboyan

Description

@rainboyan

Below is an example when using database-migration plugin,

dependencies {
    developmentOnly "org.graceframework.plugins:database-migration:6.0.0-M1"
}

Execute ./gradlew tasks, you will see,

Command tasks
-------------
dbmChangelogSync - Mark all changes as executed in the database
dbmChangelogSyncSql - Writes the SQL that will mark all changes as executed in the database to STDOUT or a file
dbmClearChecksums - Removes current checksums from database. On next run checksums will be recomputed
dbmDbDoc - Generates Javadoc-like documentation based on current database and change log
dbmDiff - Compares two databases and creates a changelog that will make the changes required to bring them into sync
dbmDropAll - Drops all database objects owned by the user
dbmFutureRollbackCountSql - Writes SQL to roll back the database to the current state after <number> changes in the changeslog have been applied
dbmFutureRollbackSql - Writes SQL to roll back the database to the current state after the changes in the changeslog have been applied
dbmGenerateChangelog - Generates an initial changelog XML or Groovy DSL file from the database
dbmGenerateGormChangelog - Generates an initial changelog XML or Groovy DSL file from current GORM classes
dbmGormDiff - Diffs GORM classes against a database and generates a changelog XML or Groovy DSL file
dbmListLocks - Lists who currently has locks on the database changelog to STDOUT or a file
dbmMarkNextChangesetRan - Mark the next change set as executed in the database
dbmMarkNextChangesetRanSql - Writes SQL to mark the next change as executed in the database to STDOUT or a file
dbmPreviousChangesetSql - Generates the SQL to apply the previous <value> change sets
dbmReleaseLocks - Releases all locks on the database changelog
dbmRollback - Rolls back the database to the state it was in when the tag was applied
dbmRollbackCount - Rolls back the specified number of change sets
dbmRollbackCountSql - Writes the SQL to roll back the specified number of change sets to STDOUT or a file
dbmRollbackSql - Writes SQL to roll back the database to the state it was in when the tag was applied to STDOUT or a file
dbmRollbackToDate - Rolls back the database to the state it was in at the given date/time
dbmRollbackToDateSql - Writes SQL to roll back the database to the state it was in at the given date/time to STDOUT or a file
dbmStatus - Outputs count or list of unrun change sets to STDOUT or a file
dbmTag - Adds a tag to mark the current database state
dbmUpdate - Updates a database to the current version
dbmUpdateCount - Applies next NUM changes to the database
dbmUpdateCountSql - Writes the SQL that will partially update a database to STDOUT or a file
dbmUpdateSql - Writes the SQL that will update the database to the current version to STDOUT or a file
dbmValidate - Checks the changelog for errors

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions