summaryrefslogtreecommitdiff
path: root/modules/profile/profile.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-07-13 13:14:25 +0000
committerDries Buytaert <dries@buytaert.net>2006-07-13 13:14:25 +0000
commit1c75a210bdf85afeee33952fd50c1951999fecb4 (patch)
tree340e364ba1ea0e4f41c2cd7c80e66543caff8304 /modules/profile/profile.install
parente4e416d1f7037dbee8e06096a6c41368d011599c (diff)
downloadbrdo-1c75a210bdf85afeee33952fd50c1951999fecb4.tar.gz
brdo-1c75a210bdf85afeee33952fd50c1951999fecb4.tar.bz2
- Patch #68926 by chx, jeremy, steven, eaton, webchick, amazon, neil, nedjo et al: an initial install system for Drupal core.
Diffstat (limited to 'modules/profile/profile.install')
-rw-r--r--modules/profile/profile.install34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/profile/profile.install b/modules/profile/profile.install
new file mode 100644
index 000000000..2c83adfaf
--- /dev/null
+++ b/modules/profile/profile.install
@@ -0,0 +1,34 @@
+<?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 */ ");
+ }
+} \ No newline at end of file