You are here

function filebrowser_schema in Filebrowser 8

Same name and namespace in other branches
  1. 8.2 filebrowser.install \filebrowser_schema()
  2. 6.2 filebrowser.install \filebrowser_schema()
  3. 6 filebrowser.install \filebrowser_schema()
  4. 7.4 filebrowser.install \filebrowser_schema()
  5. 7.2 filebrowser.install \filebrowser_schema()
  6. 7.3 filebrowser.install \filebrowser_schema()
  7. 3.x filebrowser.install \filebrowser_schema()

Implements hook_schema().

File

./filebrowser.install, line 66
Install, update and uninstall routines for filebrowser module.

Code

function filebrowser_schema() {
  $schema['filebrowser'] = array(
    'description' => 'Stores FooBar items.',
    'fields' => array(
      'filebrowserid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique FooBar item ID.',
      ),
      'uuid' => array(
        'description' => 'Unique Key: Universally unique identifier for this entity.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
      ),
      'type' => array(
        'description' => 'The bundle of the FooBar entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'langcode' => array(
        'description' => 'The {language}.langcode of the original variant of this FoBar entity.',
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
      ),
      'name' => array(
        'description' => 'The name of the FooBar entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'user_id' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => NULL,
        'description' => 'The {users}.uid of the associated user.',
      ),
      'filebrowser_field' => array(
        'description' => 'Additional field for the FooBar entity.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => FALSE,
        'default' => '',
      ),
    ),
    'primary key' => array(
      'filebrowserid',
    ),
    'unique keys' => array(
      'uuid' => array(
        'uuid',
      ),
    ),
  );
  return $schema;
}