function commerce_option_update_7100 in Commerce Product Option 7
Same name and namespace in other branches
- 7.2 commerce_option.install \commerce_option_update_7100()
Add new field, which are used to track the line item with the exact option value on the view page.
File
- ./
commerce_option.install, line 127
Code
function commerce_option_update_7100() {
db_add_field('commerce_option', 'product_id', array(
'description' => 'The {commerce_product}.product_id which is linked with this option.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
db_add_field('commerce_option', 'field_name', array(
'description' => 'The {commerce_product} field_name which is linked with this option.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
));
db_add_field('commerce_option', 'field_delta', array(
'description' => 'The {commerce_product} field delta which is linked with this option.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
db_add_field('commerce_option_set', 'data', array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
'description' => 'A serialized array of additional data related to this option set.',
));
return t('Add new fields to the product option entity.');
}