You are here

function img_assist_install in Image Assist 5.3

Same name and namespace in other branches
  1. 5 img_assist.install \img_assist_install()
  2. 5.2 img_assist.install \img_assist_install()
  3. 6.2 img_assist.install \img_assist_install()
  4. 6 img_assist.install \img_assist_install()

Implementation of hook_install().

File

./img_assist.install, line 7

Code

function img_assist_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query('CREATE TABLE {img_assist_map} (
        nid INT(10) UNSIGNED NOT NULL ,
        iid INT(10) UNSIGNED NOT NULL ,
        PRIMARY KEY (nid, iid)
      ) /*!40100 DEFAULT CHARACTER SET utf8 */;');
      break;
    case 'pgsql':
      db_query('CREATE TABLE {img_assist_map} (
        nid integer NOT NULL,
        iid integer NOT NULL,
        PRIMARY KEY (nid, iid)
      );');
      break;
  }
}