Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-569

json_array/simple_array columns constantly updated by schema-tool

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
    • Environment:
      IIS 7.5, PHP 5.4.11, SQL Server 2012

      Description

      I have the following columns defined:

          /**
           * @ORM\Column(type="json_array")
           * @var array
           */
          protected $feedKey = array();
      
          /**
           * @ORM\Column(type="simple_array")
           * @var array
           */
          protected $privileges = array('none');
      

      Every time I run " .\vendor\bin\doctrine-module orm:schema-tool:update --dump-sql", these two columns are "updated":

      ALTER TABLE RoleResource ALTER COLUMN [privileges] VARCHAR(MAX) NOT NULL;
      ALTER TABLE FeedEntity ALTER COLUMN feedKey VARCHAR(MAX) NOT NULL

      When I browse to that table in Microsoft SQL Server Management Studio, the column definitions are already "privileges (varchar(max), not null)" and "feedKey (varchar(max), not null)".

      The repeated update from schema-tool continues even after I let it run with --force.

        Issue Links

          Activity

          Hide
          Steve Müller added a comment -

          There is WIP PR to support column comments in SQL Server which resolves this issue:

          https://github.com/doctrine/dbal/pull/426

          Show
          Steve Müller added a comment - There is WIP PR to support column comments in SQL Server which resolves this issue: https://github.com/doctrine/dbal/pull/426
          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-426] was closed:
          https://github.com/doctrine/dbal/pull/426

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-426] was closed: https://github.com/doctrine/dbal/pull/426
          Show
          Steve Müller added a comment - Fixed in commit: https://github.com/doctrine/dbal/commit/28264a15a404496155d84a0abfa3404d01302905

            People

            • Assignee:
              Steve Müller
              Reporter:
              Jonathan Campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: