You are here

function filefield_paths_schema in File (Field) Paths 6

Implements hook_schema().

File

./filefield_paths.install, line 10
Install, update and uninstall functions for the FileField Paths module.

Code

function filefield_paths_schema() {
  $schema['filefield_paths'] = array(
    'fields' => array(
      'type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'field' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'filename' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
      'filepath' => array(
        'type' => 'text',
        'size' => 'medium',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
    ),
    'unique keys' => array(
      'type_field' => array(
        'type',
        'field',
      ),
    ),
  );
  return $schema;
}