You are here

fe_nodequeue.install in Features Extra 6

File

fe_nodequeue.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function fe_nodequeue_install() {
  drupal_install_schema('fe_nodequeue');
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'nodequeue'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_nodequeue'", $weight + 1);
}

/**
 * Implementation of hook_update_N().
 * Adjust module weight.
 */
function fe_nodequeue_update_6011() {
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'nodequeue'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'fe_nodequeue'", $weight + 1);
}

/**
 * Implementation of hook_uninstall().
 */
function fe_nodequeue_uninstall() {
  drupal_uninstall_schema('fe_nodequeue');
}

/**
 * Implementation of hook_schema().
 */
function fe_nodequeue_schema() {
  $schema['fe_nodequeue_queue'] = array(
    'description' => '',
    'export' => array(
      'key' => 'machine_name',
      'can disable' => FALSE,
    ),
    'fields' => array(
      'qid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'no export' => TRUE,
      ),
      'machine_name' => array(
        'description' => 'machine_name',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
    ),
    'indexes' => array(
      'machine_name' => array(
        'machine_name',
      ),
    ),
    'primary key' => array(
      'qid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
fe_nodequeue_install Implementation of hook_install().
fe_nodequeue_schema Implementation of hook_schema().
fe_nodequeue_uninstall Implementation of hook_uninstall().
fe_nodequeue_update_6011 Implementation of hook_update_N(). Adjust module weight.