-- llx_scrap_reason.sql
-- Scrap reason codes managed per category (M/G/F/T/L)

CREATE TABLE IF NOT EXISTS llx_scrap_reason (
  rowid    INT          NOT NULL AUTO_INCREMENT,
  code     VARCHAR(10)  NOT NULL,
  label    VARCHAR(255) NOT NULL,
  category CHAR(1)      NOT NULL,
  active   TINYINT(1)   NOT NULL DEFAULT 1,
  position INT          NOT NULL DEFAULT 0,
  PRIMARY KEY (rowid),
  UNIQUE KEY uk_scrap_reason_code (code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
