CREATE TABLE IF NOT EXISTS stock_ignore_rules (
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
    target VARCHAR(20) NOT NULL,
    match_type VARCHAR(20) NOT NULL,
    pattern VARCHAR(500) NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id),
    UNIQUE KEY uq_stock_ignore_rule (target, match_type, pattern),
    KEY idx_stock_ignore_target (target)
);
