View source
<?php
function commerce_custom_order_status_schema() {
$schema = array();
$schema['commerce_custom_order_status'] = array(
'description' => 'Stores order statuses',
'fields' => array(
'name' => array(
'description' => 'The status name',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'The status title',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'state' => array(
'description' => 'The state of the status',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'cart' => array(
'description' => 'Is this a cart status',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'weight' => array(
'description' => 'Weight relative to other statuses',
'type' => 'int',
'size' => 'normal',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => 'Is this enabled',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
),
'primary key' => array(
'name',
),
);
return $schema;
}
function commerce_custom_order_status_update_7000() {
db_change_field('commerce_custom_order_status', 'status', 'status', array(
'description' => 'Is this enabled',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
));
}