view NewTests/PostgresUpgrades/downgrade.sh @ 831:563b6de9f08d attach-custom-data

closing attach-custom-data
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Jun 2025 17:02:35 +0200
parents ba3295716819
children 7c3fce850fc6
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
pushd 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/Rev5ToRev4.sql
psql -U postgres -f /scripts/orthanc-databases/PostgreSQL/Plugins/SQL/Downgrades/Rev4ToRev3.sql

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