function s3fs_schema in S3 File System 4.0.x
Same name and namespace in other branches
- 8.3 s3fs.install \s3fs_schema()
- 8.2 s3fs.install \s3fs_schema()
- 7.3 s3fs.install \s3fs_schema()
- 7 s3fs.install \s3fs_schema()
- 7.2 s3fs.install \s3fs_schema()
Implements hook_schema().
1 call to s3fs_schema()
- S3fsService::setupTempTable in src/
S3fsService.php - Setup the temporary table.
File
- ./
s3fs.install, line 157 - Install, update and uninstall functions for the S3 File System module.
Code
function s3fs_schema() {
$schema = [];
$schema['s3fs_file'] = [
'description' => 'Stores metadata about files in S3.',
'fields' => [
'uri' => [
'description' => 'The S3 URI of the file.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
],
'filesize' => [
'description' => 'The size of the file in bytes.',
'type' => 'int',
'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'timestamp' => [
'description' => 'UNIX timestamp for when the file was added.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
],
'dir' => [
'description' => 'Boolean indicating whether or not this object is a directory.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'version' => [
'description' => 'The S3 VersionId of the object.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
],
],
'indexes' => [
'timestamp' => [
'timestamp',
],
],
// 'primary key' => ['uri'],
// As mentioned on http://drupal.org/node/2193059, a bug in Drupal core's
// MySQL driver prevents this setting from actually being applied. So we
// manually fix that in hook_install().
'collation' => 'utf8_bin',
];
return $schema;
}