From 7d880f9283adc3d16622f73385c4926e8c2997e2 Mon Sep 17 00:00:00 2001
From: Hutomo Saleh <hutomo.saleh@iem.fraunhofer.de>
Date: Tue, 30 Jul 2024 11:36:10 +0200
Subject: [PATCH] chore: revert database ddl-auto settings

---
 app/backend/src/main/resources/application.properties | 4 ++--
 app/backend/src/main/resources/dev.properties         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/backend/src/main/resources/application.properties b/app/backend/src/main/resources/application.properties
index 4ae65ea9..f4389f89 100644
--- a/app/backend/src/main/resources/application.properties
+++ b/app/backend/src/main/resources/application.properties
@@ -34,8 +34,8 @@ springdoc.show-actuator=true
 spring.main.web-application-type=REACTIVE
 server.port=${PORT}
 
-# This setting should only be used in dev. In prod we want to switch to update
-spring.jpa.hibernate.ddl-auto=update
+# Database Settings
+spring.jpa.hibernate.ddl-auto=validate
 spring.jpa.properties.hibernate.format_sql=true
 spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
 spring.jpa.properties.hibernate.bytecode.use_reflection_optimizer=false
diff --git a/app/backend/src/main/resources/dev.properties b/app/backend/src/main/resources/dev.properties
index 311e02bb..258d84f9 100644
--- a/app/backend/src/main/resources/dev.properties
+++ b/app/backend/src/main/resources/dev.properties
@@ -1,5 +1,5 @@
 spring.datasource.url=jdbc:postgresql://${host}:${DB_PORT}/${DB_NAME}?sslmode=disable&user=root
-spring.jpa.hibernate.ddl-auto=create-drop
+spring.jpa.hibernate.ddl-auto=update
 opencode.host=https://gitlab.dev.o4oe.de/
 opencode.api.base-path=https://sl.dev.o4oe.de/api/v1/project/
 opencode.api.auth=https://sl.dev.o4oe.de/api/
-- 
GitLab