-- Copyright (C) 2026  Eduard Wisch  <data@data-it-solution.de>
--
-- Metallzuschlag-Historie: Tägliche Metallnotierungen von externen Quellen
--

CREATE TABLE llx_metallzuschlag_history (
    rowid           integer AUTO_INCREMENT PRIMARY KEY,
    date_notiz      date NOT NULL,
    metal           varchar(4) NOT NULL,
    value           double(24,8) NOT NULL,
    value_month_avg double(24,8) DEFAULT NULL,
    source          varchar(32) DEFAULT 'sonepar' NOT NULL,
    tms             timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=innodb;
