You are here

function uc_recurring_subscription_schema in UC Recurring Payments and Subscriptions 6.2

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

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