Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-43

Doctrine\DBAL\Platforms\MsSqlPlatform Generates invalid T-SQL


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-BETA3
    • Fix Version/s: 2.0.0-RC1-RC3
    • Component/s: Platforms
    • Labels:
    • Environment:
      Any version of SQLSrv that I have available (2000-2008 R2)


      MsSqlPlatform::getAlterTableSQL generates a reasonable quantity of invalid T-SQL (to my knowledge, I'd happily be corrected if wrong).

      Unfortunately SqlSrv (to my knowledge) only accepts "ALTER old_old_name column_definition" and renames of tables and columns are only capable using a stored procedure.

      I'm happy to produce a patch but I think I need a bit of guidance to do so more quickly

      The major one is that getAlterTableSQL will need to produce multiple SQL statements, but in my testing I'm not able to get this to do so without some additional problems, and I've not yet had the opportunity to dive into the bowels of the rest of the schema bits and bobs to understand why. If anyone could point me in the vague direction that would be really handy


        the_angry_angel Karl Southern created issue -
        the_angry_angel Karl Southern made changes -
        Field Original Value New Value
        Fix Version/s 2.0.0-BETA4 [ 10071 ]
        beberlei Benjamin Eberlei made changes -
        Assignee Benjamin Eberlei [ beberlei ] Juozas Kaziukenas [ juokaz ]
        juokaz Juozas Kaziukenas added a comment - Isn't this fixed in current master https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php#L226 ?
        beberlei Benjamin Eberlei added a comment -


        beberlei Benjamin Eberlei added a comment - Fixed
        beberlei Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0-RC1 [ 10094 ]
        Resolution Fixed [ 1 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 11773 ] jira-feedback2 [ 17657 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17657 ] jira-feedback3 [ 20012 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DBAL-43}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            juokaz Juozas Kaziukenas
            the_angry_angel Karl Southern
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: