View source
<?php
function apply_for_role_install() {
drupal_install_schema('apply_for_role');
}
function apply_for_role_schema() {
$schema['users_roles_apply'] = array(
'fields' => array(
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'rid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'approved' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'apply_date' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'approve_date' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'uid',
'rid',
),
);
return $schema;
}
function apply_for_role_uninstall() {
drupal_uninstall_schema('apply_for_role');
variable_del('users_apply_roles');
variable_del('apply_for_role_multiple');
variable_del('apply_for_role_register');
}