Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-483

default values make orm:validate-schema fail

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.4
    • Component/s: None
    • Security Level: All
    • Labels:
    • Environment:
      MySQL, PHP 5.3, Doctrine 2.3

      Description

      % ./bin/doctrine.php --env=development orm:schema-tool:update --dump-sql                                                                                                  
      ALTER TABLE groups CHANGE active active TINYINT(1) DEFAULT '1' NOT NULL;
      ALTER TABLE module ADD root_order INT DEFAULT 0 NOT NULL
      % ./bin/doctrine.php --env=development orm:schema-tool:update --force
      Updating database schema...
      Database schema updated successfully! "2" queries were executed
      % ./bin/doctrine.php --env=development orm:schema-tool:update --dump-sql                                                                                                  ALTER TABLE groups CHANGE active active TINYINT(1) DEFAULT '1' NOT NULL;
      ALTER TABLE module CHANGE root_order root_order INT DEFAULT 0 NOT NULL
      

      My entities define these columns like this:

      Group
          /**
           * @ORM\Column(name="active", type="boolean", options={"default":true})
           */
          private $active = true;
      
      Module
          /**
           * @ORM\Column(name="root_order", type="integer", options={"default":0})
           */
          private $rootOrder = 0;
      

        Activity

        Till created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Project Doctrine Migrations [ 10041 ] Doctrine DBAL [ 10040 ]
        Key DMIG-38 DBAL-483
        Workflow jira [ 21137 ] jira-feedback3 [ 21138 ]
        Security All [ 10000 ]
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3.4 [ 10421 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Till
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: