marceloemanoel / gradle-migrations-plugin Goto Github PK
View Code? Open in Web Editor NEWMybatis migrations plugin to use with Gradle
License: Other
Mybatis migrations plugin to use with Gradle
License: Other
MyBatis team launched a new version.
The class CommandHelper assumes that may only be one migration driver, but for applications that are database agnostic there may be more than just one.
All tasks parameters should be configurable through command line. All command line arguments should overwrite the default parameters of the build. Parameters should have synonyms, a descriptive and a short version such as this:
$ gradle migrateNew -Pdescription="My migration description"
should be equivalent to
$ gradle migrateNew -Pd="My migration description"
iBATIS Migrations provides the script
command to generate a script that can migrate a schema from one version to another.
Provide documentation for plugin version 0.2
Provide information on the following topics:
i'm using gradle 2.7 and my plugins are declared in the new syntax.
Looking here it explained how the new notation is presented, although it does not explain how to make plugins to work this way
The version command allow to migrate the schema to any specific version of the database you like.
You simply call it, specifying the version you’d like to end up at, and the migrations system figures out
whether it has to go up or down, and which migrations it needs to run.
Extension points enable namespaced configuration and customization. Enable plugin configuration with an extension point. All the common properties that exist on the plugin convention should be part of the extension point.
To use the extension point one should write such code on the build script file:
migrations {
baseDir = "migrations"
environment = "development"
force = true
}
All elements on the extension point should be optional.
Instead of using properties files under
baseDir/ └── environments ├── development.properties ├── production.properties └── test.properties
Enable these configurations to be located on the migrations extension point like this:
migrations {
environments {
development {
//development properties...
}
test {
//test properties...
}
production {
//production properties
}
}
}
And eliminates the properties files.
development.properties
time_zone=GMT+0:00 username=adminuser send_full_script=false password=****** delimiter=; full_line_delimeter=false auto_commit=true changelog=CHANGELOG driver=com.mysql.cj.jdbc.Driver url=jdbc:mysql://localhost:3306/admin
Result ->
:migrateUp FAILED
FAILURE: Build failed with an exception.
Error executing command. Cause: java.lang.ArrayIndexOutOfBoundsException
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.