--
-- Holds the ids of files that are actually in the filesystem. Once it is
-- updated, we can delete all static_pages that don't have a row in
-- sp_extant_files.
--
CREATE TABLE sp_extant_files (
--
-- 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 static_page_id for a file in the filesystem.
--
static_page_id integer NOT NULL,
ON DELETE CASCADE,
CONSTRAINT sp_extant_files_file_id_fk REFERENCES static_pages ()
);
CREATE TRIGGER RI_ConstraintTrigger_c_342954 AFTER INSERT FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_ins (disabled)
CREATE TRIGGER RI_ConstraintTrigger_c_342955 AFTER UPDATE FOR EACH ROW EXECUTE PROCEDURE RI_FKey_check_upd (disabled)
-- Table size: 8,192 bytes
-- Table rows: 180
Tables: