Magento 2 Install schema
-
04-01-2021 - |
سؤال
When I am adding column of TYPE_DECIMAL
like this
->addColumn(
'credit',
Table::TYPE_DECIMAL,
null,
['nullable' => false, 'default' => '0.00', 'length' => '10,2'],
'Decimal'
)
Not giving decimal length in 10,2 it makes 10,0 Why? Any idea?
المحلول
You should define the length passing as third parameter.
->addColumn(
'credit',
Table::TYPE_DECIMAL,
'10,2',
['nullable' => false, 'default' => '0.00'],
'Decimal'
)
لا تنتمي إلى magento.stackexchange