-- Dossiers permanents types : lien BDD ↔ arborescence data/dossiers-permanents

ALTER TABLE folders ADD COLUMN IF NOT EXISTS dp_archetype TEXT;
ALTER TABLE folders ADD COLUMN IF NOT EXISTS dp_layout_root TEXT;

ALTER TABLE folder_documents ADD COLUMN IF NOT EXISTS dp_mirror_path TEXT;

CREATE INDEX IF NOT EXISTS idx_folders_dp_layout_root ON folders(dp_layout_root)
    WHERE dp_layout_root IS NOT NULL;
