1 Page 4: Update Project
Bernaldo Mihasi edited this page 2022-08-21 22:41:36 +02:00

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 <project's directory>/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/<name of the file>
  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 <project's directory>/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/<name of the file>
  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