You are here

formdefaults.install in Form Defaults 5

File

formdefaults.install
View source
<?php

function formdefaults_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {formdefaults_forms} (\n                formid varchar(255),\n                formdata longtext,\n                key fromid (formid)\n                ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {formdefaults_forms} (\n                  formid varchar(255),\n                  formdata text,\n                  PRIMARY KEY (formid)\n                );");
      break;
  }
  db_query("UPDATE {system} SET weight = 20 WHERE name = 'formdefaults'");
}

Functions