You are here

function modr8_update_1000 in modr8 6

Same name and namespace in other branches
  1. 5 modr8.install \modr8_update_1000()

Update table definitions.

File

./modr8.install, line 48

Code

function modr8_update_1000() {
  $ret = array();
  $name = 'modr8_log';
  $table = array(
    'fields' => array(
      'modid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'author_uid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'action' => array(
        'type' => 'varchar',
        'length' => 16,
        'not null' => TRUE,
        'default' => '',
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'message' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'teaser' => array(
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'indexes' => array(
      'nid_time' => array(
        'nid',
        'modid',
      ),
      'action' => array(
        'action',
      ),
    ),
    'primary key' => array(
      'modid',
    ),
  );
  db_create_table($ret, $name, $table);
  return $ret;
}