[DBAL-43] Doctrine\DBAL\Platforms\MsSqlPlatform Generates invalid T-SQL Created: 15/Aug/10  Updated: 27/Nov/10  Resolved: 27/Nov/10

Status: Resolved
Project: Doctrine DBAL
Component/s: Platforms
Affects Version/s: 2.0.0-BETA3
Fix Version/s: 2.0.0-RC1-RC3

Type: Bug Priority: Major
Reporter: Karl Southern Assignee: Juozas Kaziukenas
Resolution: Fixed Votes: 0
Labels: None

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

Comment by Juozas Kaziukenas [ 14/Nov/10 ]

Isn't this fixed in current master https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php#L226 ?

Comment by Benjamin Eberlei [ 27/Nov/10 ]


Generated at Wed Oct 07 13:37:45 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.