You are here

function salesforce_api_install in Salesforce Suite 5.2

Same name and namespace in other branches
  1. 6.2 salesforce_api/salesforce_api.install \salesforce_api_install()
  2. 7 salesforce_api/salesforce_api.install \salesforce_api_install()
  3. 7.2 salesforce_api/salesforce_api.install \salesforce_api_install()

Implementation of hook_install().

File

salesforce_api/salesforce_api.install, line 12
Installs any global tables needed for Salesforce integration.

Code

function salesforce_api_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {salesforce_ids} (\n        drupal_type varchar(127) NOT NULL default '',\n        drupal_id varchar(32) NOT NULL default '',\n        sfid varchar(18) NOT NULL default '',\n        fieldmap int unsigned NOT NULL default '0',\n        PRIMARY KEY (drupal_type, drupal_id)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */");
      break;
    case 'pgsql':
      break;
  }
}