Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // $Id:$
- /**
- *
- * @file
- * Schema for tables relative to quiz module extensions
- *
- */
- function qbpm_install() {
- // go forth and make tables!
- drupal_set_message('installing qbpm tables.');
- drupal_install_schema('qbpm');
- }
- function qbpm_schema() {
- $schema = array();
- $schema['quiz_impersonations'] = array(
- 'description' => 'The base table for taking a *type* of quiz on the behalf of someone else',
- 'fields' => array(
- 'rid' => array(
- 'type' => 'serial',
- 'size' => 'normal',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- // user id of the 'impersonator'
- 'iuid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- // user id of the individual on whose behalf we're evaluating
- 'auid' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- // date of the evaluation
- // decided to change the 'datetime' type to an 'int'
- // using unix style timestamps, in my opinion, is just less of
- // a pain
- 'date' => array(
- 'type' => 'int',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- ),
- ),
- 'primary key' => array('rid'),
- );
- return $schema;
- }
- function qbpm_uninstall() {
- drupal_uninstall_schema('qbpm');
- $tables = array(
- 'quiz_impersonations'
- );
- foreach($tables as $table) {
- variable_del($table);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement