function commerce_invoice_schema in Commerce Invoice 7
Same name and namespace in other branches
- 7.2 commerce_invoice.install \commerce_invoice_schema()
Implements hook_schema().
File
- ./
commerce_invoice.install, line 6
Code
function commerce_invoice_schema() {
$schema = array();
$schema['commerce_invoice'] = array(
'description' => 'The base table for invoices.',
'fields' => array(
'invoice_id' => array(
'description' => 'The primary identifier for an invoice.',
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'invoice_number' => array(
'description' => 'The invoice number displayed to the customer.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'type' => array(
'description' => 'The type of this invoice.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'uid' => array(
'description' => 'The {users}.uid that owns this invoice.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'order_id' => array(
'description' => 'The order id.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'created' => array(
'description' => 'The Unix timestamp when the invoice was created.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'changed' => array(
'description' => 'The Unix timestamp when the invoice was most recently saved.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'invoice_id',
),
);
return $schema;
}