function s3fs_schema in S3 File System 7
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.2 s3fs.install \s3fs_schema()
- 4.0.x s3fs.install \s3fs_schema()
Implements hook_schema().
1 call to s3fs_schema()
- _s3fs_refresh_cache in ./
s3fs.module - Refreshes the metadata cache.
File
- ./
s3fs.install, line 126 - Install, update and uninstall functions for the S3 File System module.
Code
function s3fs_schema() {
$schema = array();
$schema['s3fs_file'] = array(
'description' => 'Stores metadata about files in the S3 File System.',
'fields' => array(
'uri' => array(
'description' => 'The S3 URI of the file.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'filesize' => array(
'description' => 'The size of the file in bytes.',
'type' => 'int',
'size' => 'big',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'timestamp' => array(
'description' => 'UNIX timestamp for when the file was added.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'dir' => array(
'description' => 'Boolean indicating whether or not this object is a directory.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
),
'mode' => array(
'description' => 'The file mode returned by the stat function.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'uid' => array(
'description' => 'The S3 uid of the user who is associated with the file.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'version' => array(
'description' => 'The VersionId of the object.',
'type' => 'char',
'length' => 32,
'not null' => FALSE,
'default' => '',
),
),
'indexes' => array(
'timestamp' => array(
'timestamp',
),
),
'primary key' => array(
'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;
}