function private_files_download_permission_schema in Private files download permission 7.2
Implements hook_schema().
File
- ./
private_files_download_permission.install, line 15 - Installs, updates and uninstalls module variables and settings.
Code
function private_files_download_permission_schema() {
return array(
'private_files_download_permission_directory' => array(
'description' => 'Directories whose permissions are set.',
'fields' => array(
'did' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'path' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'bypass' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
'grant_file_owners' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
),
'primary key' => array(
'did',
),
'foreign keys' => array(),
'unique keys' => array(
'path' => array(
'path',
),
),
'indexes' => array(),
),
'private_files_download_permission_directory_user' => array(
'description' => 'Users having per-directory download permission.',
'fields' => array(
'duid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'did' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'uid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'duid',
),
'foreign keys' => array(
'private_files_download_permission_directory' => array(
'table' => 'private_files_download_permission_directory',
'columns' => array(
'did' => 'did',
),
),
'private_files_download_permission_directory_user' => array(
'table' => 'users',
'columns' => array(
'uid' => 'uid',
),
),
),
'unique keys' => array(),
'indexes' => array(),
),
'private_files_download_permission_directory_role' => array(
'description' => 'Roles having per-directory download permission.',
'fields' => array(
'drid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'did' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'rid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
),
'primary key' => array(
'drid',
),
'foreign keys' => array(
'private_files_download_permission_directory' => array(
'table' => 'private_files_download_permission_directory',
'columns' => array(
'did' => 'did',
),
),
'private_files_download_permission_directory_role' => array(
'table' => 'role',
'columns' => array(
'rid' => 'rid',
),
),
),
'unique keys' => array(),
'indexes' => array(),
),
);
}