You are here

function drupagram_update_7100 in Drupagram 7

Adds the drupagram_local_image table.

File

./drupagram.install, line 323
Install, update and uninstall functions for the drupagram module.

Code

function drupagram_update_7100() {
  $schema['drupagram_local_image'] = array(
    'description' => "Stores references to the local image",
    'fields' => array(
      'path' => array(
        'description' => "The remote location of the locally cached image.",
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'file_object' => array(
        'description' => "The serialized array of the locally stored file",
        'type' => 'text',
        'not null' => FALSE,
        'serialize' => TRUE,
      ),
    ),
    'indexes' => array(
      'path' => array(
        'path',
      ),
    ),
  );
  if (!db_table_exists('drupagram_local_image')) {
    db_create_table('drupagram_local_image', $schema['drupagram_local_image']);
    return st('Drupagram Local Image table was created successfully');
  }
  return st('There was an error creating the Drupagram Local Image table');
}