view SQLite/Plugins/InstallCustomData.sql @ 576:b0533b703c2c attach-custom-data

merged find-refactoring -> attach-custom-data
author Alain Mazy <am@orthanc.team>
date Tue, 01 Oct 2024 16:02:48 +0200
parents cd9521e04249
children
line wrap: on
line source


-- Add new column for customData
ALTER TABLE AttachedFiles ADD COLUMN customData TEXT;
ALTER TABLE DeletedFiles ADD COLUMN revision INTEGER;
ALTER TABLE DeletedFiles ADD COLUMN customData TEXT;


DROP TRIGGER AttachedFileDeleted;

CREATE TRIGGER AttachedFileDeleted
AFTER DELETE ON AttachedFiles
BEGIN
   INSERT INTO DeletedFiles VALUES(old.uuid, old.filetype, old.compressedSize,
                                   old.uncompressedSize, old.compressionType,
                                   old.uncompressedHash, old.compressedHash,
                                   old.revision, old.customData);
END;