You are here

function asset_youtube_install in Asset 5

Same name and namespace in other branches
  1. 6 asset_youtube/asset_youtube.install \asset_youtube_install()

Implementation of hook_install()

File

asset_youtube/asset_youtube.install, line 6

Code

function asset_youtube_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {asset_youtube_user} (\n        uid int(10) unsigned NOT NULL,\n        username varchar(128) NOT NULL default '',\n        PRIMARY KEY  (uid)\n      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {asset_youtube_user} (\n        uid SERIAL,\n        username varchar(128) NOT NULL default '',\n        PRIMARY KEY (uid)\n      )");
      break;
  }
  drupal_set_message(t('Asset YouTube tables have been configured.'));
}