You are here

function nopremium_install in Node Option Premium 7

Same name and namespace in other branches
  1. 6 nopremium.install \nopremium_install()

Implementation of hook_install().

File

./nopremium.install, line 29
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function nopremium_install() {
  db_update('system')
    ->fields(array(
    'weight' => 10,
  ))
    ->condition('name', 'nopremium')
    ->execute();
  db_add_field('node', 'premium', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'indexes' => array(
      'node_premium_status' => array(
        'premium',
        'status',
      ),
    ),
  ));
}