You are here

function commerce_webform_schema_alter in Commerce Webform 7.2

Same name and namespace in other branches
  1. 8 commerce_webform.install \commerce_webform_schema_alter()
  2. 7 commerce_webform.install \commerce_webform_schema_alter()

Implements hook_schema_alter(). Add columns to the webform table.

3 calls to commerce_webform_schema_alter()
commerce_webform_install in ./commerce_webform.install
Implements hook_install().
commerce_webform_uninstall in ./commerce_webform.install
Implements hook_uninstall().
commerce_webform_update_7101 in ./commerce_webform.install
Add an extra column to the webform table to record if submitting the webform should create a new order or add to the basket.

File

./commerce_webform.install, line 80
Install and uninstall functions for commerce_webform

Code

function commerce_webform_schema_alter(&$schema) {

  // Add field to existing schema.
  $schema['webform']['fields']['commerce_webform_new_order'] = array(
    'type' => 'int',
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => '0',
    'description' => 'Boolean value of a commerce webform as to whether it should create a new order (1) or update the current basket (0).',
  );
}