Grails 3 schema-export in build.gradle

2019-09-12 06:30发布

In Grails 2 I had a nifty gradle task that would generate DDL for me:

task extractGrailsDDL(type: org.grails.gradle.plugin.tasks.GrailsTask) {
    command "schema-export"
    args  ddlFileName("Temp") + " --datasouce=operator"

}

But that doesn't work in Grails 3, I get that, a lot has changed.

The question is: How can I create a Gradle Task to run a schema export and pass file name and datasource parameters to it?

1条回答
家丑人穷心不美
2楼-- · 2019-09-12 06:56

You don't need to create a Gradle task. A task already exists.

http://docs.grails.org/latest/ref/Command%20Line/schema-export.html

查看更多
登录 后发表回答