Mercurial > hg > orthanc-databases
view PostgreSQL/Plugins/SQL/Downgrades/Rev3ToRev2.sql @ 599:cda99cc96843 find-refactoring tip
childCount in the Resources table instead of a separate table
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Thu, 28 Nov 2024 12:42:36 +0100 |
parents | 272eeb046a88 |
children |
line wrap: on
line source
-- This file contains an SQL procedure to downgrade from schema Rev3 to Rev2 (version = 6, revision = 1). -- It actually deletes the ChildCount table and triggers -- It actually does not uninstall ChildrenIndex2 because it is anyway more efficient than -- ChildrenIndex and is not incompatible with previous revisions. DROP TRIGGER IF EXISTS DecrementChildCount ON Resources; DROP TRIGGER IF EXISTS IncrementChildCount ON Resources; DROP TABLE ChildCount; DROP FUNCTION UpdateChildCount; -- set the global properties that actually documents the DB version, revision and some of the capabilities -- modify only the ones that have changed DELETE FROM GlobalProperties WHERE property IN (4, 11); INSERT INTO GlobalProperties VALUES (4, 2); -- GlobalProperty_DatabasePatchLevel