Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fix DB migration script naming issue and fail hard and fast on future naming issues (#910)

Rich Turner30b2d6eddaaf
diff --git a/container/src/main/java/org/openremote/container/persistence/PersistenceService.java b/container/src/main/java/org/openremote/container/persistence/PersistenceService.java
index 2df3b7f72..22b3a9204 100644
--- a/container/src/main/java/org/openremote/container/persistence/PersistenceService.java
+++ b/container/src/main/java/org/openremote/container/persistence/PersistenceService.java
@@ -488,6 +488,7 @@ public class PersistenceService implements ContainerService, Consumer<Persistenc
flyway = Flyway.configure()
.cleanDisabled(false)
+ .validateMigrationNaming(true)
.dataSource(connectionUrl, databaseUsername, databasePassword)
.schemas(schemas.toArray(new String[0]))
.locations(locations.toArray(new String[0]))
diff --git a/manager/src/main/resources/org/openremote/manager/setup/database/V20221219_01_HelperFunctions.sql b/manager/src/main/resources/org/openremote/manager/setup/database/V20221219_01__HelperFunctions.sql
similarity index 100%
rename from manager/src/main/resources/org/openremote/manager/setup/database/V20221219_01_HelperFunctions.sql
rename to manager/src/main/resources/org/openremote/manager/setup/database/V20221219_01__HelperFunctions.sql