You are here

function feedback_install in Feedback 5

Same name and namespace in other branches
  1. 5.2 feedback.install \feedback_install()
  2. 6.2 feedback.install \feedback_install()
1 call to feedback_install()
feedback_update_1 in ./feedback.install

File

./feedback.install, line 3

Code

function feedback_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysqli':
    case 'mysql':
      $result = db_query("\n        CREATE TABLE IF NOT EXISTS {feedback_pages} (\n        name VARCHAR(32) NOT NULL PRIMARY KEY,\n        data LONGTEXT\n        ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      $result = db_query("\n      CREATE TABLE {feedback_pages} (\n        name VARCHAR(32) NOT NULL PRIMARY KEY,\n        data TEXT\n        )");
    default:
      break;
  }

  //insert default feedback page
  require_once drupal_get_path('module', 'feedback') . '/feedback.module';
  _feedback_add_page('default');
}