i am trying to add custom_attribute to quote table name as is_requested. this work fine, column is created. here is Upgrade schem
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
class UpgradeSchema implements UpgradeSchemaInterface
{
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$setup->startSetup();
$setup->getConnection()
->addColumn(
$setup->getTable('quote'),
'is_requested',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
'length' => 255,
'nullable' => true,
'default' => 0,
'comment' => 'Requested Quote'
]
);
$setup->endSetup();
}
}
now the problem is when i try to add value by this code
Magento\Quote\Model\QuoteFactory $quote;
$quote = $this->quote->create();
$quote->setCustomAttribute('is_requested', '1')->save();
value is not save in quote table.