I am currently migrating from a legacy project to a Symfony4. So I still need to keep the schema of the database.
I imported the database, and after fixing tons of issues I'm still unable to solve this one :
I have a join column where Doctrine is trying to set default value
$this->addSql('ALTER TABLE temperature_recording_system_sensor ALTER temperature_recording_system_site_uuid SET DEFAULT \'uuid_generate_v4()\'');
My column definition is actually like this :
/**
* @var TemperatureRecordingSystemSite
*
* @ORM\ManyToOne(targetEntity="TemperatureRecordingSystemSite")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="temperature_recording_system_site_uuid", referencedColumnName="temperature_recording_system_site_uuid", nullable=true, columnDefinition="DEFAULT NULL")
* })
*/
private $temperatureRecordingSystemSiteUuid;
How should I tell Doctrine to not set default values, as I can't use the option field on join column ?
I'm on Postgres 9.6.10 also. Ia not trying to set a default value, plus it's on a JoinColumn, not a Column.