Skip to content

Loading…

DDC-2469: SQLite handling for ENUM-Fields #3186

Closed
doctrinebot opened this Issue · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user rosslau@my-hammer.de:

SQLite doesn't support ENUMS!

But when I try create the schema of the following Entity Doctrine generates this "CREATE TABLE" - Statement:

CREATE TABLE Entity ([...] NOT NULL, taxation ENUM('incl', 'excl'), maxNumbe[...]
class Entity {
...

    /****
     * @var string
     *
     * @ORM\Column(type="string", columnDefinition="ENUM('incl', 'excl')")
     */
    private $taxation = self::TAXATION_INCL;

...
}

Produces this error:

{color:red}SQLSTATE[HY000]: General error: 1 near "'incl'": syntax error'{color}

@doctrinebot

Comment created by @ocramius:

Usage of columnDefinition in annotations or generally metadata mappings is all about vendor specific syntax. columnDefinition is designed to allow overriding the default ORM column generated DDL to build vendor specific syntax/types, therefore the issue is invalid

@doctrinebot

Issue was closed with resolution "Invalid"

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.