blogapi_schema

6 blogapi.install blogapi_schema()

Implementation of hook_schema().

File

modules/blogapi/blogapi.install, line 23

Code

function blogapi_schema() {
  //This table was introduced in Drupal 6.4
  $schema['blogapi_files'] = array(
    'description' => 'Stores information for files uploaded via the blogapi.', 
    'fields' => array(
      'fid' => array(
        'description' => 'Primary Key: Unique file ID.', 
        'type' => 'serial',
      ), 
      'uid' => array(
        'description' => 'The {users}.uid of the user who is associated with the file.', 
        'type' => 'int', 
        'unsigned' => TRUE, 
        'not null' => TRUE, 
        'default' => 0,
      ), 
      'filepath' => array(
        'description' => 'Path of the file relative to Drupal root.', 
        'type' => 'varchar', 
        'length' => 255, 
        'not null' => TRUE, 
        'default' => '',
      ), 
      'filesize' => array(
        'description' => 'The size of the file in bytes.', 
        'type' => 'int', 
        'unsigned' => TRUE, 
        'not null' => TRUE, 
        'default' => 0,
      ),
    ), 
    'primary key' => array('fid'), 
    'indexes' => array(
      'uid' => array('uid'),
    ),
  );

  return $schema;
}
Login or register to post comments