summaryrefslogtreecommitdiffstats
path: root/drupal_hub.install
blob: 295120432bce0dc19eae41af9abb813deefa7838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
// $Id$

function drupal_hub_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("
        CREATE TABLE {drupal_hub_types} (
          type varchar(32) NOT NULL default '',
          hub longtext,
          PRIMARY KEY (type)
        ) /*!40100 DEFAULT CHARACTER SET utf8 */;
      ");
      break;

    case 'pgsql':
      db_query("
        CREATE TABLE {drupal_hub_types} (
          type varchar(32) NOT NULL default '',
          hub text NUT NULL,
          PRIMARY KEY (type)
        );
      ");
      db_query("CREATE INDEX {drupal_hub_types}_type_idx ON {drupal_hub_types}(type);");
      break;
  }
}