Given mysql column is created under a table after extension installation. As mentioned, the size of VARCHAR column is 100.
$table_config->addColumn(
'value',
Varien_Db_Ddl_Table::TYPE_VARCHAR,
100,
array(
'nullable' => false,
)
);
But when I try to save a created API key through model->save() method. The string gets truncated to 25 characters only.
$key = hash('sha256', 'mm_'.rand());
/save API Key in the configure page
Mage::getModel('mm_sync/config')->setData(array(
'name' => 'api/key',
'value' => $key,
))
->save();
The same value in the table:
+-----------+---------+--------------------------+
| config_id | name | value |
+-----------+---------+--------------------------+
| 1 | api/key | 91XVVbiUBMDt40jZgKA51g== |
Any clue ?