I have an entity with field $usedMB
. I'm using Doctrine2 as ORM and DoctrineMigrationsBundle for DB migrations.
/**
* @ORM\Entity
*/
class DeviceStatus
{
...
/**
* @ORM\Column(type="float", nullable=true, options={"unsigned":true})
*/
private $usedMB;
...
}
If I execute command php bin/console doctrine:migrations:diff
, I get the following line in the migrations file:
ALTER TABLE device_status CHANGE used_mb used_mb DOUBLE PRECISION DEFAULT NULL
After that, I execute command php bin/console doctrine:migrations:migrate
, and I get the message that migration executed successfully.
But the problem is - if I execute php bin/console doctrine:migrations:diff
again, I get the same line in the migrations file:
ALTER TABLE device_status CHANGE used_mb used_mb DOUBLE PRECISION DEFAULT NULL
Just to point out - no code changes were made between executing commands.
After that, I execute command php bin/console doctrine:migrations:migrate, and again - I get the message that migration executed successfully. And that could go on forever.
This is how concrete field in DB looks:
Can some please explain me why is the same migration generated every time?