From 604a35d6889a7f0c131b1282278ea7c654a0fc66 Mon Sep 17 00:00:00 2001 From: Bernaldo Mihasi Date: Sun, 21 Aug 2022 22:41:36 +0200 Subject: [PATCH] Update 'Page 4: Update Project' --- Page-4%3A-Update-Project.md | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Page-4%3A-Update-Project.md diff --git a/Page-4%3A-Update-Project.md b/Page-4%3A-Update-Project.md new file mode 100644 index 0000000..bafb128 --- /dev/null +++ b/Page-4%3A-Update-Project.md @@ -0,0 +1,40 @@ +# Page 4: Update Project +## Windows +### A. Database +1. Press and hold the *shift* key and press the right click in the folder(after the context menu shows release the *shift* key) +2. From the context menu select **Open PowerShell here** +3. Type in the **PowerShell** `docker exec -it opendmp-db /bin/bash` +4. Type in the **PowerShell** `psql -d dmptool -U dmptool` +5. Type in the **PowerShell** `SELECT version FROM "DBVersion";` +6. Type in the **PowerShell** `exit` +7. Go to */dmp-db-scema/updates* folder +8. On the **PowerShell** check the version number and check if the are .sql files inside the *updates* folder that are having higher number +9. If there are, then in **PowerShell** Type `psql -U dmptool -d dmptool -f updates/` +10. If there are more than one then repeat step 9 with the order the files are numbered +11. Type in the **PowerShell** `exit` + +### B. Backend & Frontend +1. Go to project's directory +2. Press and hold the *shift* key and press the right click in the folder(after the context menu shows release the *shift* key) +3. From the context menu select **Open PowerShell here** +4. Type in **PowerShell** `docker-compose down` +5. Type in **PowerShell** `docker-compose up -d --build` + +## Linux +### A. Database +1. Press the right click and select **Open Terminal** +2. Type in the **Terminal** `docker exec -it opendmp-db /bin/bash` +3. Type in the **Terminal** `psql -d dmptool -U dmptool` +4. Type in the **Terminal** `SELECT version FROM "DBVersion` +5. Type in the **Terminal** `exit;` +6. Go to */dmp-db-scema/updates* folder +7. On the **Terminal** check the version number and check if the are .sql files inside the *updates* folder that are having higher number +8. If there are, then in **Terminal** Type `psql -U dmptool -d dmptool -f updates/` +9. If there are more than one then repeat step 9 with the order the files are numbered +10. Type in the **Terminal** `exit` + +### B. Backend & Frontend +1. Go to project's directory +2. Press the right click in the folder and select **Open Terminal** +3. Type in **Terminal** `docker-compose down` +4. Type in **Terminal** `docker-compose up -d --build` \ No newline at end of file