From 739bed737e756f0ee0e69a2a6a3c490bbcb5bbe0 Mon Sep 17 00:00:00 2001
From: Alex <alex.tran1502@gmail.com>
Date: Thu, 10 Nov 2022 09:30:32 -0600
Subject: [PATCH] Added database migration info to docs

---
 docs/docs/contribution-guidelines.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/docs/contribution-guidelines.md b/docs/docs/contribution-guidelines.md
index e9878c19a8..7d26d157c6 100644
--- a/docs/docs/contribution-guidelines.md
+++ b/docs/docs/contribution-guidelines.md
@@ -80,3 +80,15 @@ OpenAPI is used to generate the client (Typescript, Dart) SDK. `openapi-generato
 npm run api:generate # Run from the `server` directory
 ```
 You can find the generated client SDK in the `web/src/api` for Typescript SDK and `mobile/openapi` for Dart SDK.
+
+## Database migrations
+
+After making any changes in the `server/libs/database/src/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
+
+1. Attached to the server container shell.
+2. Run 
+```bash
+npm run typeorm -- migration:generate ./libs/database/src/<migration-name> -d libs/database/src/config/database.config.ts
+```
+3. Check if the migration file makes sense.
+4. Move the migration file to folder `server/libs/database/src/migrations` in your code editor.
\ No newline at end of file