From 7a7d3f3384d4ada1dc75c13800a3d49b10c3d86b Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 22 Jun 2021 16:58:04 +0100 Subject: [PATCH] Disable AvailableSettings.HBM2DDL_SCRIPTS_CREATE_APPEND --- .../orm/runtime/FastBootHibernatePersistenceProvider.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java index 34858d5c20b04..e57ed4a5f33dd 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/FastBootHibernatePersistenceProvider.java @@ -340,6 +340,9 @@ private static void injectRuntimeConfiguration(String persistenceUnitName, runtimeSettingsBuilder.put(AvailableSettings.HBM2DDL_HALT_ON_ERROR, "true"); } + //Never append on existing scripts: + runtimeSettingsBuilder.put(AvailableSettings.HBM2DDL_SCRIPTS_CREATE_APPEND, "false"); + runtimeSettingsBuilder.put(AvailableSettings.HBM2DDL_SCRIPTS_ACTION, persistenceUnitConfig.scripts.generation.generation);