drupal/modules/profile/profile.install

34 lines
1.1 KiB
Plaintext
Raw Normal View History

<?php
function profile_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {profile_fields} (
fid int(10) NOT NULL auto_increment,
title varchar(255) default NULL,
name varchar(128) default NULL,
explanation TEXT default NULL,
category varchar(255) default NULL,
page varchar(255) default NULL,
type varchar(128) default NULL,
weight tinyint(1) DEFAULT '0' NOT NULL,
required tinyint(1) DEFAULT '0' NOT NULL,
register tinyint(1) DEFAULT '0' NOT NULL,
visibility tinyint(1) DEFAULT '0' NOT NULL,
autocomplete tinyint(1) DEFAULT '0' NOT NULL,
options text,
KEY category (category),
UNIQUE KEY name (name),
PRIMARY KEY (fid)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("CREATE TABLE {profile_values} (
fid int(10) unsigned default '0',
uid int(10) unsigned default '0',
value text,
KEY uid (uid),
KEY fid (fid)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
}
}