You are here

asset_emfield.install in Asset 5.2

Same filename and directory in other branches
  1. 6 contrib/asset_emfield/asset_emfield.install

asset_emfield module install file

File

contrib/asset_emfield/asset_emfield.install
View source
<?php

/**
* @file
* asset_emfield module install file
*/

/**
 * Implementation of hook_install()
 */
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.'));
}

/**
 * Implementation of hook_install()
 */
function asset_emfield_uninstall() {
  db_query('DROP TABLE {asset_emfield}');
}

Functions

Namesort descending Description
asset_emfield_install Implementation of hook_install()
asset_emfield_uninstall Implementation of hook_install()