You are here

function backup_db_schema in Backup Database 8

Implements hook_schema().

File

./backup_db.install, line 29
backup_db.install

Code

function backup_db_schema() {
  $schema['backup_db'] = array(
    'description' => 'Tracks export creation and location.',
    'fields' => array(
      'eid' => array(
        'description' => 'The export identifier.',
        'type' => 'serial',
        'not null' => TRUE,
      ),
      'fid' => array(
        'description' => 'The referenced file id.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'name' => array(
        'description' => 'The name of the export.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'uri' => array(
        'description' => 'The uri of the export.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'created' => array(
        'description' => 'The timestamp when the export was created.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'eid',
    ),
    'foreign keys' => array(
      'file' => array(
        'table' => 'file_managed',
        'columns' => array(
          'fid' => 'fid',
        ),
      ),
    ),
  );
  return $schema;
}