Juste after update from webform-6.x-2.9 to 3.1, I observed the following:

Tables for which the schema and database are different.

formulaire

  • webform

    • column confirmation_format - difference on: size

      declared: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'not null' => TRUE, 'default' => 0)

      actual: array('description' => t('TODO: please describe this field!'), 'type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0)
    • additional_validate: unexpected column in database
    • additional_submit: unexpected column in database

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nardberjean’s picture

More information about update process:

The following queries were executed

webform module

Update #6301

  • ALTER TABLE {webform} ADD `confirmation_format` TINYINT NOT NULL DEFAULT 0

Update #6302

  • CREATE TABLE {webform_emails} (
    `nid` INT unsigned NOT NULL DEFAULT 0,
    `eid` SMALLINT unsigned NOT NULL DEFAULT 0,
    `email` TEXT DEFAULT NULL,
    `subject` VARCHAR(255) DEFAULT NULL,
    `from_name` VARCHAR(255) DEFAULT NULL,
    `from_address` VARCHAR(255) DEFAULT NULL,
    `template` TEXT DEFAULT NULL,
    PRIMARY KEY (nid, eid)
    ) /*!40100 DEFAULT CHARACTER SET UTF8 */
  • ALTER TABLE {webform} DROP email
  • ALTER TABLE {webform} DROP email_from_name
  • ALTER TABLE {webform} DROP email_from_address
  • ALTER TABLE {webform} DROP email_subject

Update #6303

  • ALTER TABLE {webform} ADD `submit_notice` TINYINT NOT NULL DEFAULT 0
  • UPDATE {webform} SET submit_notice = 1 WHERE submit_notice = 0

Update #6304

  • UPDATE {node_type} SET module = 'node', custom = 1, modified = 1, locked = 0 WHERE type = 'webform'

Update #6305

  • UPDATE {permission} SET perm = 'access printer-friendly version, access comments, post comments, use faceted search, view imagecache gal_thumb, view imagecache gallery, access content, create story content, search content, use advanced search, subscribe to newsletters' WHERE rid = 1
  • UPDATE {permission} SET perm = 'access printer-friendly version, add content to books, administer book outlines, skip CAPTCHA, access comments, post comments, access site-wide contact form, check out documents, use faceted search, view imagecache gal_thumb, view imagecache gallery, access All tab, access I Can Edit tab, access I Can View tab, access I Created tab, access I Last Modified tab, access Published tab, access content, create story content, edit own event_flux content, edit own flux content, edit own groupe_de_travail content, edit own image_gallery content, edit own livre content, edit own page content, edit own simplenews content, edit own story content, view revisions, maintain own subscriptions, manage own subscriptions, skip notifications, subscribe to content, subscribe to views savedsearch, delete privatemsg, read privatemsg, write privatemsg, create recipes, edit own recipes, edit revisions, view revision status messages, view revisions of any story content, view revisions of own event_flux content, view revisions of own flux content, view revisions of own forum content, view revisions of own groupe_de_travail content, view revisions of own image_gallery content, view revisions of own livre content, view revisions of own page content, view revisions of own recipe content, view revisions of own simplenews content, view revisions of own story content, view revisions of own webform content, search content, use advanced search, subscribe to newsletters, select different theme, translate content, change own username, use views savedsearch, access own webform submissions, edit own webform submissions, delete own webform submissions' WHERE rid = 2
  • UPDATE {permission} SET perm = 'view advanced help index, view advanced help popup, view advanced help topic, administer blocks, administer book outlines, administer CAPTCHA settings, administer filters, administer form filters, administer forums, create forum topics, edit own forum topics, administer imagecache, flush imagecache, administer job queue, view queued jobs, administer lightbox2, download original image, administer languages, translate interface, administer menu, administer messaging, administer content types, administer nodes, create groupe_de_travail content, create page content, edit any page content, administer notifications, administer organic groups, administer url aliases, create url aliases, administer pathauto, notify of path changes, administer privatemsg settings, administer search, administer newsletters, administer simplenews settings, access site reports, administer actions, administer files, administer site configuration, administer tracker, access user profiles, administer permissions, administer users, access all views' WHERE rid = 3
  • UPDATE {permission} SET perm = 'view advanced help index, view advanced help popup, view advanced help topic, administer book outlines, create new books, administer checked out documents, administer faceted search, administer languages, translate interface, administer nodes, create groupe_de_travail content, create page content, delete any livre content, delete any page content, delete any simplenews content, delete any story content, edit any page content, revert revisions, create url aliases, export recipes, import recipes, administer search' WHERE rid = 4
  • UPDATE {permission} SET perm = 'manage all subscriptions, administer newsletters, administer simplenews subscriptions, access user profiles, administer users' WHERE rid = 5
  • UPDATE {permission} SET perm = 'administer comments, access Unpublished tab, edit any event_flux content, edit any flux content, edit any groupe_de_travail content, edit any image_gallery content, edit any story content, edit any recipes, access Pending tab, publish revisions, unpublish current revision, view revisions of any event_flux content, view revisions of any flux content, view revisions of any forum content, view revisions of any groupe_de_travail content, view revisions of any image_gallery content, view revisions of any livre content, view revisions of any page content, view revisions of any recipe content, view revisions of any simplenews content, view revisions of any webform content' WHERE rid = 6
  • UPDATE {permission} SET perm = 'view forms without filtering' WHERE rid = 7
  • UPDATE {permission} SET perm = 'post comments without approval' WHERE rid = 8
  • UPDATE {permission} SET perm = 'add webform content, edit own webform content, delete own webform content, edit any webform content, delete any webform content, access all webform results, edit all webform submissions, delete all webform submissions' WHERE rid = 9
  • UPDATE {permission} SET perm = 'edit captions, mass upload images, download original image, create image_gallery content' WHERE rid = 10
  • UPDATE {permission} SET perm = 'create page content' WHERE rid = 11
  • UPDATE {permission} SET perm = 'create simplenews content, edit any simplenews content, send newsletter' WHERE rid = 12
  • UPDATE {permission} SET perm = 'administer taxonomy' WHERE rid = 13
  • UPDATE {permission} SET perm = 'access administration menu, access administration pages' WHERE rid = 14

Update #6306

  • ALTER TABLE {webform} ADD `allow_draft` TINYINT NOT NULL DEFAULT 0
  • ALTER TABLE {webform_submissions} ADD `is_draft` TINYINT NOT NULL DEFAULT 0

Update #6307

  • Updated file components to use numeric file IDs in the submitted values.

Update #6308

  • ALTER TABLE {webform_emails} ADD `excluded_components` TEXT DEFAULT NULL
  • ALTER TABLE {webform_emails} CHANGE `excluded_components` `excluded_components` TEXT NOT NULL
  • ALTER TABLE {webform_component} DROP email

Update #6309

  • UPDATE {permission} SET perm = 'access printer-friendly version, access comments, post comments, use faceted search, view imagecache gal_thumb, view imagecache gallery, access content, create story content, search content, use advanced search, subscribe to newsletters' WHERE rid = 1
  • UPDATE {permission} SET perm = 'access printer-friendly version, add content to books, administer book outlines, skip CAPTCHA, access comments, post comments, access site-wide contact form, check out documents, use faceted search, view imagecache gal_thumb, view imagecache gallery, access All tab, access I Can Edit tab, access I Can View tab, access I Created tab, access I Last Modified tab, access Published tab, access content, create story content, edit own event_flux content, edit own flux content, edit own groupe_de_travail content, edit own image_gallery content, edit own livre content, edit own page content, edit own simplenews content, edit own story content, view revisions, maintain own subscriptions, manage own subscriptions, skip notifications, subscribe to content, subscribe to views savedsearch, delete privatemsg, read privatemsg, write privatemsg, create recipes, edit own recipes, edit revisions, view revision status messages, view revisions of any story content, view revisions of own event_flux content, view revisions of own flux content, view revisions of own forum content, view revisions of own groupe_de_travail content, view revisions of own image_gallery content, view revisions of own livre content, view revisions of own page content, view revisions of own recipe content, view revisions of own simplenews content, view revisions of own story content, view revisions of own webform content, search content, use advanced search, subscribe to newsletters, select different theme, translate content, change own username, use views savedsearch, access own webform submissions, edit own webform submissions, delete own webform submissions' WHERE rid = 2
  • UPDATE {permission} SET perm = 'view advanced help index, view advanced help popup, view advanced help topic, administer blocks, administer book outlines, administer CAPTCHA settings, administer filters, administer form filters, administer forums, create forum topics, edit own forum topics, administer imagecache, flush imagecache, administer job queue, view queued jobs, administer lightbox2, download original image, administer languages, translate interface, administer menu, administer messaging, administer content types, administer nodes, create groupe_de_travail content, create page content, edit any page content, administer notifications, administer organic groups, administer url aliases, create url aliases, administer pathauto, notify of path changes, administer privatemsg settings, administer search, administer newsletters, administer simplenews settings, access site reports, administer actions, administer files, administer site configuration, administer tracker, access user profiles, administer permissions, administer users, access all views' WHERE rid = 3
  • UPDATE {permission} SET perm = 'view advanced help index, view advanced help popup, view advanced help topic, administer book outlines, create new books, administer checked out documents, administer faceted search, administer languages, translate interface, administer nodes, create groupe_de_travail content, create page content, delete any livre content, delete any page content, delete any simplenews content, delete any story content, edit any page content, revert revisions, create url aliases, export recipes, import recipes, administer search' WHERE rid = 4
  • UPDATE {permission} SET perm = 'manage all subscriptions, administer newsletters, administer simplenews subscriptions, access user profiles, administer users' WHERE rid = 5
  • UPDATE {permission} SET perm = 'administer comments, access Unpublished tab, edit any event_flux content, edit any flux content, edit any groupe_de_travail content, edit any image_gallery content, edit any story content, edit any recipes, access Pending tab, publish revisions, unpublish current revision, view revisions of any event_flux content, view revisions of any flux content, view revisions of any forum content, view revisions of any groupe_de_travail content, view revisions of any image_gallery content, view revisions of any livre content, view revisions of any page content, view revisions of any recipe content, view revisions of any simplenews content, view revisions of any webform content' WHERE rid = 6
  • UPDATE {permission} SET perm = 'view forms without filtering' WHERE rid = 7
  • UPDATE {permission} SET perm = 'post comments without approval' WHERE rid = 8
  • UPDATE {permission} SET perm = 'add webform content, edit own webform content, delete own webform content, edit any webform content, delete any webform content, access all webform results, edit all webform submissions, delete all webform submissions' WHERE rid = 9
  • UPDATE {permission} SET perm = 'edit captions, mass upload images, download original image, create image_gallery content' WHERE rid = 10
  • UPDATE {permission} SET perm = 'create page content' WHERE rid = 11
  • UPDATE {permission} SET perm = 'create simplenews content, edit any simplenews content, send newsletter' WHERE rid = 12
  • UPDATE {permission} SET perm = 'administer taxonomy' WHERE rid = 13
  • UPDATE {permission} SET perm = 'access administration menu, access administration pages' WHERE rid = 14

Update #6310

  • ALTER TABLE {webform} ADD `redirect_url` VARCHAR(255) DEFAULT NULL

Update #6311

  • ALTER TABLE {webform_submitted_data} DROP PRIMARY KEY
  • ALTER TABLE {webform_submitted_data} CHANGE `no` `no` VARCHAR(128) NOT NULL DEFAULT '0'
  • ALTER TABLE {webform_submitted_data} ADD PRIMARY KEY (nid, sid, cid, no)
  • UPDATE {webform_submitted_data} SET no = 'month' WHERE no = '0' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'date')
  • UPDATE {webform_submitted_data} SET no = 'day' WHERE no = '1' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'date')
  • UPDATE {webform_submitted_data} SET no = 'year' WHERE no = '2' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'date')
  • UPDATE {webform_submitted_data} SET no = 'hour' WHERE no = '0' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'time')
  • UPDATE {webform_submitted_data} SET no = 'minute' WHERE no = '1' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'time')
  • UPDATE {webform_submitted_data} SET no = 'ampm' WHERE no = '2' AND (nid, cid) IN (SELECT nid, cid FROM {webform_component} WHERE type = 'time')

Update #6312

  • No queries

Update #6313

  • No queries

Update #6314

  • Updated date and time components to use ISO 8601 formatted strings in the submitted values.

Update #6315

  • Removed Webform-specific daylight savings handling, now provided by Date API module if available.

Update #6316

  • Removed the webform_debug variable which is no longer used.

Update #6317

  • DELETE FROM {webform_emails} WHERE nid NOT IN (SELECT nid FROM {node})
quicksketch’s picture

Priority: Normal » Minor

Thanks, the only thing that's unexpected here is the "size" difference on the confirmation_format column. The other two columns "additional_validate" and "additional_submit" are intentionally left in place in case you want to use http://drupal.org/project/webform_php later. If you don't want those columns, you could install Webform PHP and then uninstall it, which will remove the columns.

nardberjean’s picture

Thanks for explanation! I imagine I can also drop the 2 columns with phpmyadmin... I droped both tables and resized the other one successfully with phpmyadmin

quicksketch’s picture

I imagine I can also drop the 2 columns with phpmyadmin... I droped both tables and resized the other one successfully with phpmyadmin

Yeah that definitely works also. :-)

quicksketch’s picture

Status: Active » Fixed
FileSize
1.04 KB

I've committed this patch which will change the "confirmation_format" to be consistent for all users, converting it to a "tinyint" column like other Boolean columns used by Webform.

quicksketch’s picture

Title: Webform schema inconsistency: difference on: size and 2 unexpected column in database » Webform schema inconsistency: confirmation_format should be size "tiny"

Status: Fixed » Closed (fixed)
Issue tags: -schema

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