nodeapi_example.install

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.
<?php

// $Id: nodeapi_example.install,v 1.4 2007/10/05 16:44:50 drewish Exp $

/**
 * Implementation of hook_install().
 */
function nodeapi_example_install() {
  drupal_install_schema('nodeapi_example');
}

/**
 * Implementation of hook_uninstall().
 */
function nodeapi_example_uninstall() {
  drupal_uninstall_schema('nodeapi_example');
}

/**
 * Implementation of hook_schema().
 */
function nodeapi_example_schema() {
  $schema['nodeapi_example'] = array(
    'fields' => array(
      'nid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'rating' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
    ),
    'primary key' => array('nid'),
  );

  return $schema;
}

function nodeapi_example_update_1() {
  return _system_update_utf8(array('nodeapi_example'));
}

Вход в систему