I'm trying to set a default value for a decimal column. But I still received a "Not null violation error".
What I have tried:
- default('0')
- default(0)
- default('0.00') (
CodePudding user response:
try this
$table->decimal('exit_fee', 19, 2)->default('00000000000000000.00');
and run migrate will see
https://i.stack.imgur.com/k8NQF.png
CodePudding user response:
I saw this in a different question wich kind of resembles your question.
$table->decimal('exit_fee', 19, 2)->default('00000000000000000');