As you like me came here from google and your issue is related to Doctrine, and your column type is type="decimal"
, then you should configure precision
and scale
properties of your column in the right way.
For me, it was like before:
/** @ORM\Column(name="revenue", type="decimal", scale=4, nullable=true) */
private $revenue;
after
/** @ORM\Column(name="revenue", type="decimal", precision=14, scale=4, nullable=true) */
private $revenue;
It will be converted to DECIMAL(14,4), which means fourteen digits total, four of which are to the right of the decimal point.
Don't forget to prepare migration and run it to apply the changes.
Finally, you should get SQL like this:
ALTER TABLE project_finance CHANGE revenue revenue NUMERIC(14, 4) DEFAULT NULL