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
- Press and hold the shift key and press the right click in the folder(after the context menu shows release the shift key)
- From the context menu select Open PowerShell here
- Type in the PowerShell
docker exec -it opendmp-db /bin/bash
- Type in the PowerShell
psql -d dmptool -U dmptool
- Type in the PowerShell
SELECT version FROM "DBVersion";
- Type in the PowerShell
exit
- Go to <project's directory>/dmp-db-scema/updates folder
- On the PowerShell check the version number and check if the are .sql files inside the updates folder that are having higher number
- If there are, then in PowerShell Type
psql -U dmptool -d dmptool -f updates/<name of the file>
- If there are more than one then repeat step 9 with the order the files are numbered
- Type in the PowerShell
exit
B. Backend & Frontend
- Go to project's directory
- Press and hold the shift key and press the right click in the folder(after the context menu shows release the shift key)
- From the context menu select Open PowerShell here
- Type in PowerShell
docker-compose down
- Type in PowerShell
docker-compose up -d --build
Linux
A. Database
- Press the right click and select Open Terminal
- Type in the Terminal
docker exec -it opendmp-db /bin/bash
- Type in the Terminal
psql -d dmptool -U dmptool
- Type in the Terminal
SELECT version FROM "DBVersion
- Type in the Terminal
exit;
- Go to <project's directory>/dmp-db-scema/updates folder
- On the Terminal check the version number and check if the are .sql files inside the updates folder that are having higher number
- If there are, then in Terminal Type
psql -U dmptool -d dmptool -f updates/<name of the file>
- If there are more than one then repeat step 9 with the order the files are numbered
- Type in the Terminal
exit
B. Backend & Frontend
- Go to project's directory
- Press the right click in the folder and select Open Terminal
- Type in Terminal
docker-compose down
- Type in Terminal
docker-compose up -d --build