--
-- Holds the ids of folders that are actually in the filesystem. Once it is
-- updated, we can delete all sp_folders that don't have a row in
-- sp_extant_folders.
--
CREATE TABLE sp_extant_folders (
--
-- Each syncing session has an identifier in order to avoid conflicts that would
-- arise if two admins sync simultaneously.
--
session_id integer NOT NULL,
--
-- The folder_id for a folder in the filesystem.
--
folder_id integer NOT NULL,
ON DELETE CASCADE,
CONSTRAINT sp_extant_folders_file_id_fk REFERENCES sp_folders ()
);
CREATE TRIGGER RI_ConstraintTrigger_c_342959 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342960 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
-- Table size: 24,576 bytes
-- Table rows: 613
Tables: