You are here

function nopremium_install in Node Option Premium 6

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

Implementation of hook_install().

File

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

Code

function nopremium_install() {
  db_query("UPDATE {system} SET weight = %d WHERE name = '%s'", 10, 'nopremium');
  $ret = array();
  db_add_field($ret, 'node', 'premium', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ), array(
    'indexes' => array(
      'node_premium_status' => array(
        'premium',
        'status',
      ),
    ),
  ));
}