Mercurial > hg > orthanc-databases
view PostgreSQL/Plugins/SQL/Upgrades/UnknownToRev1.sql @ 619:a9a7dceeaad0
fix pg unit tests (2) + bug in patient recycling+protection
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Wed, 18 Dec 2024 12:22:00 +0100 |
parents | ff84104f7842 |
children |
line wrap: on
line source
-- add the revision columns if not yet done DO $body$ BEGIN IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema='public' AND table_name='metadata' AND column_name='revision') THEN ALTER TABLE Metadata ADD COLUMN revision INTEGER; ELSE raise notice 'the metadata.revision column already exists'; END IF; IF NOT EXISTS (SELECT * FROM information_schema.columns WHERE table_schema='public' AND table_name='attachedfiles' AND column_name='revision') THEN ALTER TABLE AttachedFiles ADD COLUMN revision INTEGER; ELSE raise notice 'the attachedfiles.revision column already exists'; END IF; END $body$;