function filebrowser_schema in Filebrowser 8.2
Same name and namespace in other branches
- 8 filebrowser.install \filebrowser_schema()
- 6.2 filebrowser.install \filebrowser_schema()
- 6 filebrowser.install \filebrowser_schema()
- 7.4 filebrowser.install \filebrowser_schema()
- 7.2 filebrowser.install \filebrowser_schema()
- 7.3 filebrowser.install \filebrowser_schema()
- 3.x filebrowser.install \filebrowser_schema()
File
- ./
filebrowser.install, line 48 - Install, update and uninstall functions for the Filebrowser module.
Code
function filebrowser_schema() {
$schema['filebrowser_nodes'] = [
'description' => 'Stores filebrowser specific data for each node',
'fields' => [
'nid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'nid of the node holding this filebrowser',
],
'folder_path' => [
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'description' => 'uri to the exposed directory',
],
'properties' => [
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => 'serialised data containing the filebrowser settings for this node',
],
],
'primary key' => [
'nid',
],
];
$schema['filebrowser_content'] = [
'description' => 'contains information about the file. one row per file',
'fields' => [
'nid' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'nid of the node holding this file',
],
'fid' => [
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => 'id of this file',
],
'root' => [
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'description' => 'relative root of this file',
],
'path' => [
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'description' => 'path to the file',
],
'file_data' => [
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => 'serialised field containing file data',
],
],
'primary key' => [
'fid',
],
'unique keys' => [
'nid_fid' => [
'nid',
'fid',
],
'fid' => [
'fid',
],
],
];
return $schema;
}