You are here

function scald_update_7012 in Scald: Media Management made easy 7

Add the {scald_atoms}.created and {scald_atoms}.changed column.

File

./scald.install, line 654

Code

function scald_update_7012() {
  $new_field = array(
    'description' => 'The Unix timestamp when the atom was created.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
  db_add_field('scald_atoms', 'created', $new_field);
  $new_field = array(
    'description' => 'The Unix timestamp when the atom was most recently saved.',
    'type' => 'int',
    'not null' => TRUE,
    'default' => 0,
  );
  db_add_field('scald_atoms', 'changed', $new_field);
  db_add_index('scald_atoms', 'atom_changed', array(
    'changed',
  ));
  db_add_index('scald_atoms', 'atom_created', array(
    'created',
  ));
}