-- Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

CREATE TABLE llx_filearchiv_pinned (
    rowid           INTEGER AUTO_INCREMENT PRIMARY KEY,
    filepath        VARCHAR(500) NOT NULL,
    modulepart      VARCHAR(100),
    fk_user         INTEGER,
    datec           DATETIME,
    entity          INTEGER DEFAULT 1
) ENGINE=InnoDB;

ALTER TABLE llx_filearchiv_pinned ADD UNIQUE INDEX uk_filearchiv_pinned (filepath, entity);
