You are here

function blockanimate_install in BlockAnimate 7

Implements hook_install().

File

./blockanimate.install, line 11
Install, update and uninstall functions for the blockanimate module.

Code

function blockanimate_install() {
  $schema['block'] = array();
  blockanimate_schema_alter($schema);
  foreach ($schema['block']['fields'] as $field => $field_spec) {
    if (db_field_exists('block', $field)) {
      watchdog('system', 'Module install: Attempt to recreate field: "%field",
        when it already exists.', array(
        '%field' => $field,
      ), WATCHDOG_WARNING);
    }
    else {
      db_add_field('block', $field, $field_spec);
    }
  }
}