Skip to content

SQL error following doc steps: can't create "not null" column with null default value #9424

@liarco

Description

@liarco

Dear Sirs,
I was reading the documentation, following the steps one-by-one, then I got stuck with a SQL error.
I'm a very newbie with Symfony, but I think that there's something missing in the annotation here: https://github.com/symfony/symfony-docs/blame/master/doctrine.rst#L244

I was using SQLite, the error complains about the impossibility to create a new "NOT NULL" column with NULL default value.

Changing my code to the following solved the issue, but I'm not sure that's what was intended:

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $description;

Thank you for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions