function commerce_cop_schema in Commerce Custom Offline Payments 7
Implements hook_schema().
File
- ./
commerce_cop.install, line 10 - Install functions.
Code
function commerce_cop_schema() {
$schema['commerce_custom_offline_payment'] = array(
'description' => 'Custom offline payments methods for Drupal Commerce',
'fields' => array(
'id' => array(
'description' => 'Machine name of payment',
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'description' => 'Payment title',
'not null' => TRUE,
'default' => '',
'translatable' => TRUE,
),
'description' => array(
'type' => 'text',
'size' => 'normal',
'description' => 'Description for the payment method.',
'translatable' => TRUE,
),
'information' => array(
'type' => 'text',
'size' => 'big',
'description' => 'Default information for the payment method.',
'translatable' => TRUE,
),
'format' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => 'The {filter_format}.format of the payment information.',
),
'status' => array(
'description' => '',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'checkout' => array(
'description' => '',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'terminal' => array(
'description' => '',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'fieldable' => array(
'description' => '',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'unique keys' => array(
'machine_name' => array(
'id',
),
),
'indexes' => array(
'permission' => array(
'id',
),
),
);
return $schema;
}