0

HI am getting this error while more columns to sales_order and quote table

SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

even though i have text fields still am getting the issue below is my code

class InstallSchema implements InstallSchemaInterface
{
    public function install(
        SchemaSetupInterface $setup, 
        ModuleContextInterface $context
    ){
        $setup->startSetup();

        $quote = $setup->getTable('quote');
        $salesOrder = $setup->getTable('sales_order');
        
        
        $setup->getConnection()->addColumn(
            $quote,
            'shippingaccntno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Shipping Carrear Account No'
            ]
        );

        $setup->getConnection()->addColumn(
            $quote,
            'dropdown',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Drop Down'
            ]
        );

        $setup->getConnection()->addColumn(
            $quote,
            'deliverytelephoneno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Delivery Tele Phone Number'
            ]
        );
        

        $setup->getConnection()->addColumn(
            $salesOrder,
            'shippingaccntno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Shipping Carrear Account No'
            ]
        );

        $setup->getConnection()->addColumn(
            $salesOrder,
            'dropdown',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Drop Down'
            ]
        );

        $setup->getConnection()->addColumn(
            $salesOrder,
            'deliverytelephoneno',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                // 'nullable' => true,
                'comment' =>'Delivery Tele Phone Number'
            ]
        );
        
        $setup->endSetup();
    }
}

am not very much familiar with linux and starting to get used to this so please explain me about this issue

1 Answer 1

0

I am not sure this is because of this.

Look like this is a mysql issue.

Kindly, check this link MySQL: Error Code: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB

If this helps then hit like.

Thank you
Hiren Patel

1
  • the solution over there is way too old and does not work anymore
    – Pramod
    Oct 8, 2020 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.