You are here

function uc_recurring_subscription_schema in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_subscription/uc_recurring_subscription.install \uc_recurring_subscription_schema()

Implements hook_schema().

File

modules/uc_recurring_subscription/uc_recurring_subscription.install, line 32
Installs the Recurring Subscription module.

Code

function uc_recurring_subscription_schema() {
  $schema['uc_recurring_subscription'] = array(
    'description' => 'Data for recurring fees attached to products.',
    'fields' => array(
      'nid' => array(
        'description' => 'The product ID.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'access' => array(
        'description' => 'Serialized list of drupal roles that should be applied on this subscription.',
        'type' => 'text',
        'serialize' => TRUE,
      ),
      'ca' => array(
        'description' => 'Serialized list of drupal CA events to tie to this subscription.',
        'type' => 'text',
        'serialize' => TRUE,
      ),
      'weight' => array(
        'description' => 'The order the product is listed.',
        'type' => 'int',
        'unsigned' => FALSE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'parent' => array(
        'description' => 'Allows subscription to inherit roles and notifications.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'nid',
    ),
  );
  return $schema;
}