From 01489e2c019ced44577e7add292076cc399a569d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nya=20=CE=9Elimu?= Date: Wed, 19 Jun 2024 15:39:16 +0700 Subject: [PATCH] Update DB_MIGRATION.md --- DB_MIGRATION.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DB_MIGRATION.md b/DB_MIGRATION.md index 9cd7a694d..234dec76d 100644 --- a/DB_MIGRATION.md +++ b/DB_MIGRATION.md @@ -2,7 +2,8 @@ By using the Java Persistence API (JPA), classed annotated by @Entity (in the [`model`](src/main/java/ai/elimu/model) package) get mapped automatically to database tables/columns: [`src/main/resources/META-INF/jpa-persistence.xml`](https://github.com/elimu-ai/webapp/blob/main/src/main/resources/META-INF/jpa-persistence.xml) -However, when _deleting, modifying or renaming_ an entity class/attribute, we have to manually update the underlying database structure. +> [!IMPORTANT] +> However, when _deleting, modifying or renaming_ an entity class/attribute, we have to manually update the underlying database structure. ## Migration Scripts @@ -27,4 +28,5 @@ For an example of a previous database migration script, see https://github.com/e ## Caveats 😅 -Note that DB migration performed automatically by the ORM provider (Hibernate), e.g. when adding a new property to an @Entity, is executed _before_ our custom migration scripts. +> [!WARNING] +> Note that DB migration performed automatically by the ORM provider (Hibernate), e.g. when adding a new property to an `@Entity`, is executed _before_ our custom migration scripts.