Answer the question
In order to leave comments, you need to log in
Why does doctrine 2 (postgresql) fail to execute DEFAULT NULL when migrating?
Basically there is a column
/**
* @ORM\Column(type="string", nullable=true, options={"default": "slug"})
*/
protected $slug = null;
php app/console doctrine:migrations:diff
ALTER TABLE blog ADD slug VARCHAR(255) DEFAULT NULL
php app/console doctrine:migrations:migrate
I get[PDOException]
SQLSTATE[23502]: Not null violation: 7 ERROR: column "slug" contains null values
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question