USE spchs;

-- Default mapping reconstructed from the final wizard architecture.
-- It can be changed later through Admin > Equipment Management.

INSERT INTO unit_equipment
    (unit_id, equipment_id, display_order, status)
VALUES
    (1, 1, 1, 'Active'),
    (1, 2, 2, 'Active'),
    (1, 3, 3, 'Active'),
    (1, 4, 4, 'Active'),
    (1, 5, 5, 'Active'),
    (1, 6, 6, 'Active'),
    (1, 8, 7, 'Active'),

    (2, 1, 1, 'Active'),
    (2, 2, 2, 'Active'),
    (2, 3, 3, 'Active'),
    (2, 4, 4, 'Active'),
    (2, 5, 5, 'Active'),
    (2, 6, 6, 'Active'),
    (2, 8, 7, 'Active'),

    (3, 1, 1, 'Active'),
    (3, 2, 2, 'Active'),
    (3, 3, 3, 'Active'),
    (3, 4, 4, 'Active'),
    (3, 5, 5, 'Active'),
    (3, 6, 6, 'Active'),
    (3, 8, 7, 'Active'),

    (4, 1, 1, 'Active'),
    (4, 2, 2, 'Active'),
    (4, 3, 3, 'Active'),
    (4, 4, 4, 'Active'),
    (4, 5, 5, 'Active'),
    (4, 6, 6, 'Active'),
    (4, 7, 7, 'Active'),
    (4, 8, 8, 'Active')
ON DUPLICATE KEY UPDATE
    display_order = VALUES(display_order),
    status = VALUES(status);
