Running bin/console doctrine:schema:update --force again and again, it always output 39 queries executed even after clearing cache/restarting php-fpm. So it always execute the same SQL requests again and again...
The SQL looks likes (from --dump-sql)
ALTER TABLE apply_queue CHANGE cv_id cv_id INT DEFAULT NULL, CHANGE team_id team_id INT DEFAULT NULL;
....
And a lot of lines similar to this.
The ApplyQueue class look like:
/**
* AppBundle\Entity\ApplyQueue.
*
* @ORM\Entity(repositoryClass="AppBundle\Entity\ApplyQueueRepository")
* @ORM\Table(name="apply_queue")
*/
class ApplyQueue
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Cv")
* @ORM\JoinColumn(name="cv_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $cv;
/**
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Team")
* @ORM\JoinColumn(name="team_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected $team;
...
}
DBAL config :
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
types:
json: Sonata\Doctrine\Types\JsonType
review_status: AppBundle\Model\Enum\ReviewStatusEnumType
mapping_types:
review_status: string
The structure of the table:
This is an "old" project that has been upgraded to Symfony 3.4 and MariaDB 10.2.
Thanks
