function filedepot_schema in filedepot 7
Same name and namespace in other branches
- 6 filedepot.install \filedepot_schema()
Implementation of hook_schema().
File
- ./
filedepot.install, line 300 - filedepot.install filedepot: File Management Module developed by Nextide www.nextide.ca
Code
function filedepot_schema() {
$schema['filedepot_categories'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'pid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'group_nid' => array(
'description' => t('Used with OG mode to set the group root folder'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'name' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'folderorder' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'last_modified_date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'last_updated_date' => array(
'description' => 'Used to signify if this directory has been changed in any way (including adding a new file into it)',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'cid',
),
'indexes' => array(
'nid' => array(
'nid',
'vid',
),
'pid' => array(
'pid',
),
),
);
$schema['filedepot_files'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
),
'version' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'fileorder' => array(
'description' => 'File order in the folder',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'drupal_fid' => array(
'description' => 'Drupal file id also called fid in the drupal tables',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'size' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'extension' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '',
),
'submitter' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'version_ctl' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'status_changedby_uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'fid',
),
'indexes' => array(
'cid' => array(
'cid',
),
),
);
$schema['filedepot_access'] = array(
'description' => 'filedepot Access Rights - for user or group access to category',
'fields' => array(
'accid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'catid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'permid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'permtype' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '0',
),
'view' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload_direct' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload_ver' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'approval' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'admin' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'accid',
),
'indexes' => array(
'catid' => array(
'catid',
),
'permid' => array(
'permid',
),
'permtype' => array(
'permtype',
),
),
);
$schema['filedepot_fileversions'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'drupal_fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'size' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'notes' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'fid' => array(
'fid',
),
),
);
$schema['filedepot_downloads'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'remote_ip' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '50',
'not null' => TRUE,
'default' => '',
),
'date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'date' => array(
'date',
),
'fid' => array(
'fid',
),
'uid' => array(
'uid',
),
),
);
$schema['filedepot_favorites'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
),
'indexes' => array(
'topic_id' => array(
'fid',
),
'uid' => array(
'uid',
),
),
);
$schema['filedepot_recentfolders'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'not null' => TRUE,
),
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'cid' => array(
'cid',
),
'uid' => array(
'uid',
),
),
);
$schema['filedepot_folderindex'] = array(
'description' => 'Maintains the folder index for each user',
'fields' => array(
'cid' => array(
'description' => 'Folder or category ID',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'uid' => array(
'description' => 'User ID',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'folderprefix' => array(
'description' => 'Folder index base value',
'type' => 'varchar',
'length' => '255',
'default' => '',
),
),
'indexes' => array(
'cid' => array(
'cid',
),
'uid' => array(
'uid',
),
),
);
$schema['filedepot_filesubmissions'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'tempname' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'drupal_fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'tags' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'version_note' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'size' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'extension' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '',
),
'submitter' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'version_ctl' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'notify' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'status' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'cid' => array(
'cid',
),
),
);
$schema['filedepot_usersettings'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'notify_newfile' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'notify_changedfile' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'allow_broadcasts' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'allowable_view_folders' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'not null' => TRUE,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
$schema['filedepot_import_queue'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'not null' => TRUE,
),
'orig_filename' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '150',
'not null' => TRUE,
),
'queue_filename' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'drupal_fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '128',
'not null' => FALSE,
),
'size' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'description' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'version_note' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
),
'primary key' => array(
'id',
),
);
$schema['filedepot_export_queue'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'not null' => TRUE,
),
'orig_filename' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '150',
'not null' => TRUE,
),
'token' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '20',
'not null' => TRUE,
),
'extension' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '10',
'not null' => TRUE,
),
'timestamp' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
),
'primary key' => array(
'id',
),
);
$schema['filedepot_notificationlog'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'target_uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'submitter_uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'notification_type' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'datetime' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
),
'indexes' => array(
'target_uid' => array(
'target_uid',
),
),
);
$schema['filedepot_notifications'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'ignore_filechanges' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid_newfiles' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'cid_changes' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'cid' => array(
'cid',
),
'fid' => array(
'fid',
),
'uid' => array(
'uid',
),
),
);
$schema['nextag_words'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'not null' => TRUE,
),
'tagword' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'displayword' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '32',
'not null' => FALSE,
),
'metric' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 1,
),
'last_updated' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'tagword' => array(
'tagword',
),
),
);
$schema['nextag_items'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'itemid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'type' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'tags' => array(
'description' => 'TODO: please describe this field!',
'type' => 'text',
'not null' => FALSE,
),
),
'indexes' => array(
'itemid' => array(
'itemid',
),
'type' => array(
'type',
),
),
);
$schema['nextag_metrics'] = array(
'description' => 'TODO: please describe this table!',
'fields' => array(
'id' => array(
'description' => 'TODO: please describe this field!',
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'tagid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
),
'type' => array(
'description' => 'TODO: please describe this field!',
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'groupid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => FALSE,
),
'roleid' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'medium',
'not null' => FALSE,
),
'metric' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
),
'last_updated' => array(
'description' => 'TODO: please describe this field!',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'indexes' => array(
'tagid' => array(
'tagid',
),
'type' => array(
'type',
),
'uid' => array(
'roleid',
),
),
);
return $schema;
}