You are here

function file_admin_schema_alter in File admin 7

Implements hook_schema_alter().

Add file_managed table published and promote fields.

2 calls to file_admin_schema_alter()
file_admin_install in ./file_admin.install
Implements hook_install().
file_admin_uninstall in ./file_admin.install
Implements hook_uninstall().

File

./file_admin.install, line 44
Installation file for file_admin module.

Code

function file_admin_schema_alter(&$schema) {
  $schema['file_managed']['fields']['created'] = array(
    'description' => 'The Unix timestamp when the file record was created.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
  $schema['file_managed']['fields']['published'] = array(
    'description' => 'Boolean indicating whether the media item is published (visible to non-administrators).',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 1,
  );
  $schema['file_managed']['fields']['promote'] = array(
    'description' => 'Boolean indicating whether the media item should be displayed on the front page or similar lists of promoted content.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
  $schema['file_managed']['fields']['sticky'] = array(
    'description' => 'Boolean indicating whether the media item should be displayed at the top of lists in which it appears.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
}