'Modify composite keys length in MySQL 8

I want to add composite keys to my existing migration. The goal is to perform a mass update for a considerable dataset from Amazon API. The problem is Amazon API's data structure is not structured well, so I need to add multiple unique columns. However, MySQL 8 will yell; it says

Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes.

I understand that innodb_large_prefix is no longer supported. Are there any ways to modify this max length requirement in mysql8? I am using an ORM. Is it possible to manually add the composite keys directly to the database? Any idea how?

$table->unique(['settlement_id', 'transaction_type', 'order_id', 'posted_date',
    'sku','item_related_fee_type'],'settlement_unique');


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source