comparison PostgreSQL/Plugins/SQL/Upgrades/Rev1ToRev2.sql @ 470:11c6bcc9d1f2

cleanup
author Alain Mazy <am@osimis.io>
date Mon, 05 Feb 2024 18:26:37 +0100
parents ff84104f7842
children f18e46d7dbf8
comparison
equal deleted inserted replaced
469:302f3c2b1c34 470:11c6bcc9d1f2
1 -- This file contains part of the changes required to upgrade from 6.1 to 6.2 (DB version 6 and revision 2) 1 -- This file contains part of the changes required to upgrade from Revision 1 to Revision 2 (DB version 6 and revision 1 or 2)
2 -- It actually contains only the changes that: 2 -- It actually contains only the changes that:
3 -- can not be executed with an idempotent statement in SQL 3 -- can not be executed with an idempotent statement in SQL
4 -- or would polute the PrepareIndex.sql 4 -- or would polute the PrepareIndex.sql
5 -- This file is executed only if the current schema is in revision 1 and it is executed 5 -- This file is executed only if the current schema is in revision 1 and it is executed
6 -- before PrepareIndex.sql that is idempotent. 6 -- before PrepareIndex.sql that is idempotent.
33 END IF; 33 END IF;
34 34
35 END $body$ LANGUAGE plpgsql; 35 END $body$ LANGUAGE plpgsql;
36 36
37 37
38 -- In V6.2, we'll now use temporary tables so we need to remove the old tables that might have been used in previous revisions ! 38 -- In Rev2, we'll now use temporary tables so we need to remove the old tables that might have been used in previous revisions !
39 -- these statements, although idempotent, are not part of PrepareIndexV2.sql to keep it clean 39 -- these statements, although idempotent, are not part of PrepareIndexV2.sql to keep it clean
40 DROP TABLE IF EXISTS DeletedFiles; 40 DROP TABLE IF EXISTS DeletedFiles;
41 DROP TABLE IF EXISTS RemainingAncestor; 41 DROP TABLE IF EXISTS RemainingAncestor;
42 DROP TABLE IF EXISTS DeletedResources; 42 DROP TABLE IF EXISTS DeletedResources;
43 43
44 -- These triggers disappears and are not replaced in V6.2 44 -- These triggers disappears and are not replaced in Rev2
45 DROP TRIGGER IF EXISTS CountResourcesTracker ON Resources; 45 DROP TRIGGER IF EXISTS CountResourcesTracker ON Resources;
46 46
47 -- The signature has changed so we must delete the function before replacing it. 47 -- The signature has changed so we must delete the function before replacing it.
48 DROP FUNCTION IF EXISTS CreateInstance; 48 DROP FUNCTION IF EXISTS CreateInstance;