You are here

apachesolr_mlt.install in Apache Solr Search 5

File

contrib/apachesolr_mlt/apachesolr_mlt.install
View source
<?php

function apachesolr_mlt_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $pass = db_query("CREATE TABLE IF NOT EXISTS {apachesolr_mlt} (\n          `id` int(11) NOT NULL auto_increment,\n          `data` longtext NOT NULL,\n          PRIMARY KEY  (`id`)\n          )");
      break;
  }
  if ($pass) {
    drupal_set_message(t('Created the apachesolr_mlt table'));
  }
}
function apachesolr_mlt_uninstall() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $pass = db_query("DROP TABLE {apachesolr_mlt}");
      break;
  }
  if ($pass) {
    drupal_set_message(t('Dropped the apachesolr_mlt table'));
  }
}