forked from Sanders/TelegaBot
fix: Correct migration version generation in build.gradle
This commit is contained in:
+4
-3
@@ -72,9 +72,10 @@ tasks.register('generateMigration', JavaExec) {
|
||||
]
|
||||
}
|
||||
|
||||
static def getNextMigrationVersion() {
|
||||
def existing = file('src/main/resources/db/migration').listFiles()?.collect {
|
||||
(it.name =~ /V(\d+)__/)[0][1]
|
||||
def getNextMigrationVersion() {
|
||||
def migrationDir = project.file('src/main/resources/db/migration')
|
||||
def existing = migrationDir.listFiles()?.collect {
|
||||
(it.name =~ /V(\d+)__/)[0][1]
|
||||
}?.max() ?: 0
|
||||
return String.format("%03d", existing.toInteger() + 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user