I want to update MySQL field from text to longtext using Doctrine schema.
Now my code is like this:
/**
*@var string
*@ORM\Column(name="head_fa", type="string", length=1000, nullable=true)
*/
private $head_fa;
/**
*@var string
*@ORM\Column(name="head_en", type="string", length=1000, nullable=true)
*/
private $head_en;
/**
*@var string
*@ORM\Column(name="body_fa", type="text", length=1000, nullable=true)
*/
private $body_fa;
/**
*@var string
*@ORM\Column(name="body_en", type="text", length=1000, nullable=true)
*/
private $body_en;
and the problem is when i change this field to this code
/**
*@var string
*@ORM\Column(name="head_fa", type="string", length=1000, nullable=true)
*/
private $head_fa;
/**
*@var string
*@ORM\Column(name="head_en", type="string", length=1000, nullable=true)
*/
private $head_en;
/**
*@var string
*@ORM\Column(name="body_fa", type="text", nullable=true)
*/
private $body_fa;
/**
*@var string
*@ORM\Column(name="body_en", type="text", nullable=true)
*/
private $body_en;
and run "php app/console doctrine:schema:update --force" command on console it said that "Nothing to update - your database is already in sync with the current entity metadata." How to change this field to longtext on mysql database.
I do the same on different part of the project. this is the code
/**
* @ORM\Column(name="body", type="text", nullable=true)
*/
protected $body;
and after executing the "php app/console doctrine:schema:update --force" command on terminal this field is changed to longtext on MySQL database.