You are here

function paypal_donations_schema in PayPal Donations 7

Implements hook_schema().

File

./paypal_donations.install, line 13
Sets up the base table for our entity and a table to store information about the entity types.

Code

function paypal_donations_schema() {
  $schema = array();
  $schema['paypal_donations_item'] = array(
    'description' => 'The base table for paypal_donations_item entities.',
    'fields' => array(
      'donation_id' => array(
        'description' => 'Primary Key: Identifier for a donation.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'created' => array(
        'description' => 'A timestamp to indicate if or when the item was added',
        'type' => 'int',
        'size' => 'big',
        'not null' => TRUE,
        'default' => 1,
      ),
    ),
    'primary key' => array(
      'donation_id',
    ),
    'indexes' => array(
      'created' => array(
        'created',
      ),
    ),
  );
  return $schema;
}