commerce_product_reference.install in Commerce Core 7
File
modules/product_reference/commerce_product_reference.install
View source
<?php
function commerce_product_reference_field_schema($field) {
if ($field['type'] == 'commerce_product_reference') {
return array(
'columns' => array(
'product_id' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => FALSE,
),
),
'indexes' => array(
'product_id' => array(
'product_id',
),
),
'foreign keys' => array(
'product_id' => array(
'table' => 'commerce_product',
'columns' => array(
'product_id' => 'product_id',
),
),
),
);
}
}
function commerce_product_reference_uninstall() {
module_load_include('module', 'commerce');
commerce_delete_fields('commerce_product_reference');
}