-- ============================================================================
-- Widen all short VARCHAR columns in configuration_items to TEXT
-- Autotask data frequently exceeds VARCHAR(100/255) limits for identifiers,
-- hostnames, serial numbers, SNMP strings, etc.
-- ============================================================================

ALTER TABLE configuration_items
  ALTER COLUMN datto_serial_number              TYPE TEXT,
  ALTER COLUMN device_type                      TYPE TEXT,
  ALTER COLUMN reference_number                 TYPE TEXT,
  ALTER COLUMN rmm_device_audit_mac_address     TYPE TEXT,
  ALTER COLUMN rmm_device_audit_mobile_number   TYPE TEXT,
  ALTER COLUMN serial_number                    TYPE TEXT,
  ALTER COLUMN backup_type_udf                  TYPE TEXT,
  ALTER COLUMN datto_hostname                   TYPE TEXT,
  ALTER COLUMN reference_title                  TYPE TEXT,
  ALTER COLUMN rmm_device_audit_description     TYPE TEXT,
  ALTER COLUMN rmm_device_audit_hostname        TYPE TEXT,
  ALTER COLUMN rmm_device_audit_last_user       TYPE TEXT,
  ALTER COLUMN rmm_device_audit_snmp_contact    TYPE TEXT,
  ALTER COLUMN rmm_device_audit_snmp_location   TYPE TEXT,
  ALTER COLUMN rmm_device_audit_snmp_name       TYPE TEXT,
  ALTER COLUMN rmm_device_uid                   TYPE TEXT,
  ALTER COLUMN snmp_contact                     TYPE TEXT,
  ALTER COLUMN snmp_location                    TYPE TEXT,
  ALTER COLUMN snmp_name                        TYPE TEXT;
