0

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?

2

You should define the length passing as third parameter.

->addColumn(
    'credit',
    Table::TYPE_DECIMAL,
    '10,2',
    ['nullable' => false, 'default' => '0.00'],
    'Decimal'
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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