Skip to content

Loading…

DBAL-105: Schema Comparator produces invalid SQL #982

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user johannes:

Before:

/****
 * @orm:Entity
 * @orm:Table(name="twitter_users")
 */
class TwitterUser implements UserInterface
{
    const ROLE*DEFAULT = 'ROLE_TWITTER*USER';

    /****
     * @orm:Id
     * @orm:GeneratedValue(strategy="AUTO")
     * @orm:Column(type="integer")
     */
    private $id;

    /****
     * @orm:Column(type="integer", unique=true, nullable=false)
     */
    private $twitterId;

    /****
     * @orm:Column(type="string", unique=true, nullable=false)
     */
    private $displayName;
}

After:

/****
 * @orm:Entity
 * @orm:Table(name="twitter_users")
 */
class TwitterUser implements UserInterface
{
    const ROLE*DEFAULT = 'ROLE_TWITTER*USER';

    /****
     * @orm:Id
     * @orm:GeneratedValue(strategy="AUTO")
     * @orm:Column(type="integer")
     */
    private $id;

    /****
     * @orm:Column(type="integer", unique=true, nullable=false, name="twitter_id")
     */
    private $twitterId;

    /****
     * @orm:Column(type="string", unique=true, nullable=false, name="display_name")
     */
    private $displayName;

    /****
     * @orm:Column(type="datetime", name="last*logged_in*at", nullable=true)
     */
    private $lastLoggedInAt;
}

Bugs in the generated SQL:

  • lastlogged_inat column is not added
  • displayName is dropped, and at the same time the column name "displayName" is changed to "display_name"
  • twitterId same as above
@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.4 milestone
@doctrinebot doctrinebot closed this
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.