While updating from Webform 7.x-4.7 to webform 7.x-4.9

The following updates returned messages

webform module

Update #7423
Failed: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '384-1-0' for key 'PRIMARY': INSERT INTO {webform_conditional_actions} (nid, rgid, action, target_type, target, argument) SELECT c.nid AS nid, c.rgid AS rgid, c.action AS action, c.target_type AS target_type, c.target AS target, '' AS argument FROM {webform_conditional} c ORDER BY nid ASC, rgid ASC; Array ( ) in webform_update_7423()

select * from webform_conditional_actions

'384', '1', '0', 'component', '18', '1', 'show', ''
'384', '2', '0', 'component', '21', '1', 'show', ''
'384', '4', '0', 'component', '24', '1', 'show', ''
'384', '6', '0', 'component', '35', '1', 'show', ''
'384', '8', '0', 'component', '41', '1', 'show', ''
'384', '10', '0', 'component', '48', '1', 'show', ''
'384', '12', '0', 'component', '53', '1', 'show', ''
'384', '14', '0', 'component', '58', '1', 'show', ''
'477', '0', '0', 'component', '12', '1', 'show', ''
'477', '1', '0', 'component', '13', '1', 'show', ''
'477', '2', '0', 'component', '7', '0', 'show', ''
'477', '3', '0', 'component', '10', '1', 'show', ''

select * from webform_conditional

'384', '1', NULL, 'hide', 'component', '18', '-8'
'384', '2', NULL, 'hide', 'component', '21', '-8'
'384', '4', NULL, 'hide', 'component', '24', '-8'
'384', '6', NULL, 'hide', 'component', '35', '-8'
'384', '8', NULL, 'hide', 'component', '41', '-8'
'384', '10', NULL, 'hide', 'component', '48', '-8'
'384', '12', NULL, 'hide', 'component', '53', '-8'
'384', '14', NULL, 'hide', 'component', '58', '-6'
'477', '0', NULL, 'hide', 'component', '12', '-1'
'477', '1', NULL, 'hide', 'component', '13', '0'
'477', '2', NULL, 'show', 'component', '7', '1'
'477', '3', NULL, 'hide', 'component', '10', '2'

So all of these entries already exist. What's going on?

Comments

kaosagnt’s picture

Sorry my mistake

db_create_table('webform_conditional_actions', $schema['webform_conditional_actions']);

This table is created with the 7.x-4.9 update. Was testing before the going live and I dumped a live database over the test one that had already been updated. Dropping the table and running the update script works. Sorry for the noise.

DanChadwick’s picture

Category: Bug report » Support request
Priority: Critical » Normal
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.