You are here

function flash_install in Flash Node 5

Implementation of hook_install().

File

./flash.install, line 6

Code

function flash_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query('
        CREATE TABLE {flash} (
          nid INT(10) UNSIGNED NOT NULL ,
          height INT(10) UNSIGNED NOT NULL ,
          width INT(10) UNSIGNED NOT NULL ,
          version INT(10) UNSIGNED NOT NULL ,
          build INT(10) UNSIGNED NOT NULL ,
          display TINYINT(3) UNSIGNED NOT NULL ,
          PRIMARY KEY (nid)
        ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;');
      break;
    case 'pgsql':
      db_query('
        create table {flash} (
          nid integer not null,
          height integer not null,
          width integer not null,
          version integer not null,
          build integer not null,
          display integer not null,
          PRIMARY KEY (nid)
        );');
      break;
  }
  drupal_set_message(t('Flash node has been setup.'));
}