function filedepot_schema in filedepot 6
Same name and namespace in other branches
- 7 filedepot.install \filedepot_schema()
Implementation of hook_schema().
File
- ./
filedepot.install, line 91 - filedepot.install filedepot: File Management Module developed by Nextide www.nextide.ca
Code
function filedepot_schema() {
$schema['filedepot_categories'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'cid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'pid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'nid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'vid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'name' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'folderorder' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
),
'last_modified_date' => array(
'description' => t('TODO: please describe this field!'),
'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' => t('TODO: please describe this table!'),
'fields' => array(
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'cid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'size' => 'big',
'not null' => FALSE,
),
'version' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'cckfid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'size' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'extension' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '',
),
'submitter' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'version_ctl' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'status_changedby_uid' => array(
'description' => t('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' => t('filedepot Access Rights - for user or group access to category'),
'fields' => array(
'accid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'catid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'permid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'permtype' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '0',
),
'view' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload_direct' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'upload_ver' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'approval' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'admin' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'cckfid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'size' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'notes' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'date' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'status' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'remote_ip' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '15',
'not null' => TRUE,
'default' => '',
),
'date' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
),
'indexes' => array(
'topic_id' => array(
'fid',
),
'uid' => array(
'uid',
),
),
);
$schema['filedepot_recentfolders'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'not null' => TRUE,
),
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'cid' => array(
'description' => t('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_filesubmissions'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fname' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'tempname' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'title' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '128',
'not null' => TRUE,
'default' => '',
),
'description' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'cckfid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'tags' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'version_note' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'size' => 'big',
'not null' => TRUE,
),
'size' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'default' => '',
),
'extension' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '8',
'not null' => TRUE,
'default' => '',
),
'submitter' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'version_ctl' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'notify' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'status' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'notify_newfile' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'notify_changedfile' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'allow_broadcasts' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 1,
),
'allowable_view_folders' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'not null' => TRUE,
),
),
'indexes' => array(
'uid' => array(
'uid',
),
),
);
$schema['filedepot_import_queue'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'not null' => TRUE,
),
'orig_filename' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '150',
'not null' => TRUE,
),
'queue_filename' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
),
'cckfid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'mimetype' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '128',
'not null' => FALSE,
),
'size' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'description' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
'version_note' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '255',
'not null' => FALSE,
),
),
'primary key' => array(
'id',
),
);
$schema['filedepot_export_queue'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'not null' => TRUE,
),
'orig_filename' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '150',
'not null' => TRUE,
),
'token' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '20',
'not null' => TRUE,
),
'extension' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '10',
'not null' => TRUE,
),
'timestamp' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
),
'primary key' => array(
'id',
),
);
$schema['filedepot_notificationlog'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'target_uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'submitter_uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'notification_type' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'datetime' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
),
'indexes' => array(
'target_uid' => array(
'target_uid',
),
),
);
$schema['filedepot_notifications'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'size' => 'medium',
'not null' => TRUE,
),
'fid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'ignore_filechanges' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'cid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'cid_newfiles' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'cid_changes' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
'default' => 0,
),
'date' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'id' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'serial',
'not null' => TRUE,
),
'tagword' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'displayword' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '32',
'not null' => FALSE,
),
'metric' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 1,
),
'last_updated' => array(
'description' => t('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' => t('TODO: please describe this table!'),
'fields' => array(
'itemid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => TRUE,
),
'type' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'tags' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'text',
'not null' => FALSE,
),
),
'indexes' => array(
'itemid' => array(
'itemid',
),
'type' => array(
'type',
),
),
);
$schema['nextag_metrics'] = array(
'description' => t('TODO: please describe this table!'),
'fields' => array(
'tagid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
),
'type' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
),
'groupid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => FALSE,
),
'roleid' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'medium',
'not null' => FALSE,
),
'metric' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
),
'last_updated' => array(
'description' => t('TODO: please describe this field!'),
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
),
'indexes' => array(
'tagid' => array(
'tagid',
),
'type' => array(
'type',
),
'uid' => array(
'roleid',
),
),
);
return $schema;
}