CREATE TABLE driver_devices (
  organization_id CHAR(36) NOT NULL,
  driver_id CHAR(36) NOT NULL,
  device_token VARCHAR(255) NOT NULL,
  updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (organization_id, driver_id, device_token),
  KEY driver_devices_token_idx (device_token),
  CONSTRAINT driver_devices_driver_fk FOREIGN KEY (organization_id, driver_id) REFERENCES drivers(organization_id, id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;