You are here

function parallax_block_install in Parallax Toolkit 7.2

Same name and namespace in other branches
  1. 7.3 parallax_block/parallax_block.install \parallax_block_install()

Implements hook_install().

File

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

Code

function parallax_block_install() {
  $schema['block'] = array();
  parallax_block_schema_alter($schema);
  foreach ($schema['block']['fields'] as $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, $spec);
    }
  }
}