CREATE TABLE dr_webfor ( `nid` INT unsigned NOT NULL COMMENT 'The node identifier of a webform.', `confirmation` TEXT NOT NULL COMMENT 'The confirmation message or URL displayed to the user after submitting a form.', `confirmation_format` TINYINT NOT NULL DEFAULT 0 COMMENT 'The input format used by the confirmation message.', `redirect_url` VARCHAR(255) DEFAULT '' COMMENT 'The URL a user is redirected to after submitting a form.', `status` TINYINT NOT NULL DEFAULT 1 COMMENT 'Boolean value of a webform for open (1) or closed (0).', `block` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether this form be available as a block.', `teaser` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether the entire form should be displayed on the teaser.', `allow_draft` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean value for whether submissions to this form be saved as a draft.', `submit_notice` TINYINT NOT NULL DEFAULT 1 COMMENT 'Boolean value for whether to show or hide the previous submissions notification.', `submit_text` VARCHAR(255) DEFAULT NULL COMMENT 'The title of the submit button on the form.', `submit_limit` TINYINT NOT NULL DEFAULT -1 COMMENT 'The number of submissions a single user is allowed to submit within an interval. -1 is unlimited.', `submit_interval` INT NOT NULL DEFAULT -1 COMMENT 'The amount of time in seconds that must pass before a user can submit another submission within the set limit.', PRIMARY KEY (`nid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Table for storing additional properties for webform nodes.'; RENAME TABLE dr_webfor TO dr_webform; CREATE TABLE dr_webform_component ( `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `cid` SMALLINT unsigned NOT NULL DEFAULT 0 COMMENT 'The identifier for this component within this node, starts at 0 for each node.', `pid` SMALLINT unsigned NOT NULL DEFAULT 0 COMMENT 'If this component has a parent fieldset, the cid of that component.', `form_key` VARCHAR(128) DEFAULT NULL COMMENT 'When the form is displayed and processed, this key can be used to reference the results.', `name` VARCHAR(255) DEFAULT NULL COMMENT 'The label for this component.', `type` VARCHAR(16) DEFAULT NULL COMMENT 'The field type of this component (textfield, select, hidden, etc.).', `value` TEXT NOT NULL COMMENT 'The default value of the component when displayed to the end-user.', `extra` TEXT NOT NULL COMMENT 'Additional information unique to the display or processing of this component.', `mandatory` TINYINT NOT NULL DEFAULT 0 COMMENT 'Boolean flag for if this component is required.', `weight` SMALLINT NOT NULL DEFAULT 0 COMMENT 'Determines the position of this component in the form.', PRIMARY KEY (`nid`, `cid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores information about components for webform nodes.'; RENAME TABLE dr_webform_component TO dr_webform_components; CREATE TABLE dr_webform_email ( `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `eid` SMALLINT unsigned NOT NULL DEFAULT 0 COMMENT 'The e-mail identifier for this row’s settings.', `email` TEXT NULL DEFAULT NULL COMMENT 'The e-mail address that will be sent to upon submission. This may be an e-mail address, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `subject` VARCHAR(255) NULL DEFAULT NULL COMMENT 'The e-mail subject that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `from_name` VARCHAR(255) NULL DEFAULT NULL COMMENT 'The e-mail \"from\" name that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `from_address` VARCHAR(255) NULL DEFAULT NULL COMMENT 'The e-mail \"from\" e-mail address that will be used. This may be a string, the special key \"default\" or a numeric value. If a numeric value is used, the value of a component will be substituted on submission.', `template` TEXT NULL DEFAULT NULL COMMENT 'A template that will be used for the sent e-mail. This may be a string or the special key \"default\", which will use the template provided by the theming layer.', `excluded_components` TEXT NOT NULL COMMENT 'A list of components that will not be included in the %email_values token. A list of CIDs separated by commas.', `html` TINYINT unsigned NOT NULL DEFAULT 0 COMMENT 'Determines if the e-mail will be sent in an HTML format. Requires Mime Mail module.', `attachments` TINYINT unsigned NOT NULL DEFAULT 0 COMMENT 'Determines if the e-mail will include file attachments. Requires Mime Mail module.', PRIMARY KEY (`nid`, `eid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Holds information regarding e-mails that should be sent...'; RENAME TABLE dr_webform_email TO dr_webform_emails; CREATE TABLE dr_webform_role ( `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `rid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The role identifier.', PRIMARY KEY (`nid`, `rid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Holds access information regarding which roles are...'; RENAME TABLE dr_webform_role TO dr_webform_roles; CREATE TABLE dr_webform_submission ( `sid` INT unsigned NOT NULL auto_increment COMMENT 'The unique identifier for this submission.', `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `uid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The id of the user that completed this submission.', `is_draft` TINYINT NOT NULL DEFAULT 0 COMMENT 'Is this a draft of the submission?', `submitted` INT NOT NULL DEFAULT 0 COMMENT 'Timestamp of when the form was submitted.', `remote_addr` VARCHAR(128) DEFAULT NULL COMMENT 'The IP address of the user that submitted the form.', PRIMARY KEY (`sid`), UNIQUE KEY `sid_nid` (`sid`, `nid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Holds general information about submissions outside of...'; RENAME TABLE dr_webform_submission TO dr_webform_submissions; CREATE TABLE dr_webform_submitted_data1 ( `nid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The node identifier of a webform.', `sid` INT unsigned NOT NULL DEFAULT 0 COMMENT 'The unique identifier for this submission.', `cid` SMALLINT unsigned NOT NULL DEFAULT 0 COMMENT 'The identifier for this component within this node, starts at 0 for each node.', `no` VARCHAR(128) NOT NULL DEFAULT '0' COMMENT 'Usually this value is 0, but if a field has multiple values (such as a time or date), it may require multiple rows in the database.', `data` MEDIUMTEXT NOT NULL COMMENT 'The submitted value of this field, may be serialized for some components.', PRIMARY KEY (`nid`, `sid`, `cid`, `no`), INDEX `nid` (`nid`), INDEX `sid_nid` (`sid`, `nid`) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 COMMENT 'Stores all submitted field data for webform submissions.'; RENAME TABLE dr_webform_submitted_data1 TO dr_webform_submitted_data;