Closed (fixed)
Project:
Webform
Version:
7.x-4.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2014 at 14:25 UTC
Updated:
6 May 2014 at 21:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
quicksketchThanks for filing this report. We don't have many SQLServer users so I appreciate the report. This may be difficult for me to fix because I don't have a instance of SQLServer at my disposal, and it's unlikely I'd take the time to set one up. I may need help from you to test potential fixes.
I think this may be caused by the indexes that are added to the "serial" database column when it is first created. Some DB backends don't allow you to modify a column while indexes exist on that column. Since we add a unique index but then later try to change the column to add the "NOT NULL" option, this might be causing the error. To fix this, we just need to add the index after the update is finished, rather than at the beginning when it first adds the column. I've attached a patch that does this very thing.
Could you test this out? You'll need to start from a backup of your database before you attempted the upgrade.
Comment #3
quicksketch1: webform_serial_index_update-2241497.patch queued for re-testing.
Comment #6
quicksketchI've gone ahead and committed this change, even if we don't have confirmation it resolves this particular problem. The documentation for db_change_field() specifically states that keys have to be removed before modifying columns that use them, so this puts us inline with that recommendation. I think there's a good chance this will resolve this MSSQL issue, but I don't have a way of confirming. @irriadin, if you get a chance to re-run your update after applying this patch, please post your results and set this back to "active" if it hasn't been fixed.
Comment #7
fenstratNeeds porting to 8.x-4.x.
Comment #8
fenstratCommitted and pushed 56941b5 to 8.x-4.x. Thanks!
Comment #10
Ryan S commentedSorry, I wasn't able to test until now, but the patch worked! Thanks!
Comment #11
quicksketch@irriadin, woo! Thanks for the followup. This patch is in the latest releases already.