-- Pack 16 support SQL

ALTER TABLE users
    ADD COLUMN employee_id INT UNSIGNED NULL,
    ADD COLUMN external_partner_id INT UNSIGNED NULL,
    ADD COLUMN reset_token VARCHAR(120) NULL,
    ADD COLUMN reset_token_expires_at DATETIME NULL;

ALTER TABLE users
    MODIFY COLUMN role ENUM('admin','manager','employee','partner') NOT NULL DEFAULT 'employee';

CREATE INDEX idx_users_employee_id ON users(employee_id);
CREATE INDEX idx_users_external_partner_id ON users(external_partner_id);
CREATE INDEX idx_users_reset_token ON users(reset_token);
