You are here

function asset_emfield_install in Asset 5.2

Same name and namespace in other branches
  1. 6 contrib/asset_emfield/asset_emfield.install \asset_emfield_install()

Implementation of hook_install()

File

contrib/asset_emfield/asset_emfield.install, line 11
asset_emfield module install file

Code

function asset_emfield_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':

      // this definition taken from the emfield cck field definition
      db_query("CREATE TABLE {asset_emfield} (\n        aid int unsigned NOT NULL default 0,\n        embed longtext NOT NULL default '',\n        value varchar(255) NOT NULL default '',\n        provider varchar(255) NOT NULL default '',\n        data longtext NOT NULL default '',\n        PRIMARY KEY  (aid)\n      ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':

      //TODO: postgresql
      break;
  }
  drupal_set_message(t('Asset Embedded Media tables have been configured.'));
}