view NewTests/PostgresUpgrades/downgrade.sh @ 779:7b29eaf4ab82 attach-custom-data

merged default -> attach-custom-data
author Alain Mazy <am@orthanc.team>
date Thu, 30 Jan 2025 17:38:39 +0100
parents e3d41c4168c3 2c7dde490d63
children ff1ab89bc1c0
line wrap: on
line source

#!/bin/bash

pushd /scripts

apt-get update && apt-get install -y wget mercurial
hg clone https://orthanc.uclouvain.be/hg/orthanc-databases
# TODO: change attach-custom-data by the plugin version number or "default" !
hg update -r attach-custom-data
psql -U postgres -f /scripts/orthanc-databases/PostgreSQL/Plugins/SQL/Downgrades/Rev4ToRev3.sql
psql -U postgres -f /scripts/orthanc-databases/PostgreSQL/Plugins/SQL/Downgrades/Rev3ToRev2.sql

# if you want to test a downgrade procedure, you may use this code ...
# psql -U postgres -f downgrade.sql
popd