My setup: Drupal 7.13 / IIS 7.5 / SQL Server 2008 / PHP 5.3
When I ran the update script for the Feeds module, I received the following error:
Failed: PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Error: The new name 'state_old' is already in use as a COLUMN name and would cause a duplicate that is not permitted.: EXEC sp_rename :old, :new, :type; Array ( [:old] => feeds_source.state [:new] => state_old [:type] => COLUMN ) in db_change_field() (line 2988 of C:\inetpub\wwwroot\includes\database\database.inc).
All other module updates have been running fine. I'm not sure if this is an issue with the Feeds module or the SQLSrv module, and I didn't see any other issues related to this, so I thought I'd start here.
Comments
Comment #1
katannshaw commentedI've received no replies in four days, so I've disabled this module for now. Hopefully someone responds soon.
Comment #2
dgtlmoon commented"state_old" doesnt appear to be a column name in Feeds module, so I think it could be from your SQLSrv module, but try latest dev again
Comment #3
lyricnz commenteddgtlmoon: columnname_old is used as an intermediate step during execution of db_change_field(). If that had previously failed, like in #1828950: Update to alpha7 database update fails on MSSQL, then update.php was run again, you would get the error described by this user.
Comment #4
lyricnz commentedRaised #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary against sqlsvr project.
Comment #5
dgtlmoon commentedComment #6
katannshaw commentedThanks for the replies. I will test out the patch mentioned on #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary. Thanks.
Comment #7
Uncle_Code_Monkey commentedlyricnz said:
I ran into a similar error converting CTools module and have tested out lyrincz's patch (slightly modified) and found that it fixed the issue quite nicely. Thanks lyricnz!
See my comment for my modified and tested patch.
Comment #8
omegamonk commentedThe contrib patch for #1830024: Cannot execute db_change_field() to convert nvarchar to varbinary has been committed to the sqlsrv development release. Per the comments, this issue is likely resolved, but since I didn't verify that I am not marking as fixed.
Comment #8.0
omegamonk commentedAdded my setup information
Comment #9
tterranigma commentedAlmost 3 years later with no follow up, it would be safe to assume the issue is fixed.