cuba-platform / cuba-gradle-plugin

Gradle plugin for building CUBA platform and applications
https://www.cuba-platform.com
Apache License 2.0
15 stars 18 forks source link

assembleDbScripts shows "up-to-date" after app component version has been changed #134

Open alexbudarov opened 4 years ago

alexbudarov commented 4 years ago

Environment

Description of the bug or enhancement

forum topic: https://www.cuba-platform.com/discuss/t/the-way-cuba-studio-handle-db-scripts-of-addons-seems-not-always-right/11954/6?u=alexbudarov

If you have two versions of app component, with database schema changes and update scripts. And upgrade project from app component 0.1 to 0.2 by changing build.gradle file.

Then subsequent calls of "updateDb" will show:

19:09:32: Executing task 'updateDb'...

> Task :uni-core:assembleDbScripts UP-TO-DATE
> Task :uni-core:updateDb

So cuba plugin doesn't detect that there were changes. Only until you execute "gradlew clean" - then changes will be detected.

Sample app component: 0.1-SNAPSHOT: myuni-0.1.zip 0.2-SNAPSHOT: myuni-0.2.zip

Sample project: uni2.zip