Mercurial > hg > orthanc-databases
diff PostgreSQL/Plugins/SQL/Upgrades/Rev2ToRev3.sql @ 570:73e784792a51 attach-custom-data
added missing files
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Wed, 25 Sep 2024 09:25:58 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PostgreSQL/Plugins/SQL/Upgrades/Rev2ToRev3.sql Wed Sep 25 09:25:58 2024 +0200 @@ -0,0 +1,19 @@ +-- This file contains part of the changes required to upgrade from Revision 2 to Revision 3 (DB version 6) +-- It actually contains only the changes that: + -- can not be executed with an idempotent statement in SQL + -- or would polute the PrepareIndex.sql +-- This file is executed only if the current schema is in revision 2 and it is executed +-- before PrepareIndex.sql that is idempotent. + + + +DO $body$ +BEGIN + + BEGIN + ALTER TABLE AttachedFiles ADD COLUMN customData TEXT; + EXCEPTION + WHEN duplicate_column THEN RAISE NOTICE 'column customData already exists in AttachedFiles.'; + END; + +END $body$ LANGUAGE plpgsql;