You are here

function lti_tool_provider_schema in LTI Tool Provider 7

Implements hook_schema().

File

./lti_tool_provider.install, line 92
Install, update, and uninstall functions for the LTI Tool Provider module.

Code

function lti_tool_provider_schema() {
  $schema = array();

  // The name of the table can be any name we choose. However, namespacing the
  // table with the module name is best practice.
  $schema['lti_tool_provider_consumer'] = array(
    'description' => 'The base table for our lti_tool_provider_consumer.',
    'fields' => array(
      'lti_tool_provider_consumer_id' => array(
        'description' => 'Primary key of the lti_tool_provider_consumer.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'lti_tool_provider_consumer_key' => array(
        'description' => 'The key for LTITP Consumer',
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
      ),
      'lti_tool_provider_consumer_secret' => array(
        'description' => 'The secret for LTITP Consumer',
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
      ),
      'lti_tool_provider_consumer_consumer' => array(
        'description' => 'A representive name of LTITP Consumer',
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
      ),
      'lti_tool_provider_consumer_domain' => array(
        'description' => 'A representive name of the domain',
        'type' => 'varchar',
        'length' => 512,
        'not null' => TRUE,
      ),
      'lti_tool_provider_consumer_dummy_pref' => array(
        'description' => 'A representive name of the domain',
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
      ),
      'date_joined' => array(
        'description' => 'The Unix timestamp of the entity creation time.',
        'type' => 'int',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'lti_tool_provider_consumer_id',
    ),
  );
  return $schema;
}