Why can't providerbut database Symfony4/Doctr?

Started the project on симфони2, then updated to 3.4 version
need to do refactoring and some rewriting, I decided to crawl on 4 version under the guise of

The design is simple, in principle(complicated in my brain is not enough :((( ), some functionality added, and need something to do
and for this they are trying to move to version 4
faced with a situation that you cannot comprehend

now the case
- moved the entity database
something changed doing doctrine:schema:update --force
the doctrine reports that everything is OK, for example, 2 queries were executed
but in fact something that is not updated
when you try to re-do doctrine:schema:update --force
doctrine again reports that everything is OK - 2 queries were executed
that is - in fact - nothing updates

then the farm does not pass the validation
swears [ERROR] The database schema is not in sync with the current mapping file.

doctrine:schema:update --dump-sql shows
Sym4test ALTER TABLE CHANGE name name VARCHAR(255) DEFAULT NULL;

swears on fields which are nullable=true (if nullable=false, then error disappears, but I need the field to be optional)
code entity quote below
<?php

namespace App\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="App\Repository\Sym4TestRepository")
*/
class Sym4Test
{
/**
 * @ORM\Id()
 * @ORM\GeneratedValue()
 * @ORM\Column(type="integer")
*/
 private $id;

/**
 * @ORM\Column(type="string", length=255, nullable=true)
*/
 private $name;

 public function getId(): ?int
{
 return $this->id;
}

 public function getName(): ?string
{
 return $this->name;
}

 public function setName(?string $name): self
{
 $this->name = $name;

 return $this;
}
}
March 20th 20 at 11:32
0 answer

Find more questions by tags SymfonyDoctrine ORM