-- Material overrides for MO prefill (productionrules -> mo_production flow)
-- Created: 2026-03-29

CREATE TABLE llx_prod_mo_material_overrides (
    rowid         INT AUTO_INCREMENT PRIMARY KEY,
    entity        INT NOT NULL DEFAULT 1,
    fk_bom        INT NOT NULL,
    fk_product    INT NOT NULL,
    qty           DOUBLE NOT NULL DEFAULT 1,
    pos           INT NOT NULL DEFAULT 0,
    datec         DATETIME,
    fk_user_creat INT NULL,
    INDEX idx_prod_mo_matovr_bom (fk_bom),
    INDEX idx_prod_mo_matovr_prod (fk_product),
    INDEX idx_prod_mo_matovr_entity (entity)
);
