diff options
author | friendica <info@friendica.com> | 2013-12-25 01:22:51 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-25 01:22:51 -0800 |
commit | 5dee22c94d1ab366c88a7d3058867e70f5cfb827 (patch) | |
tree | 3db1dfb2498305153e3e5baf8e1da3a4d723c071 /install | |
parent | b1ade138ff7fc47f2b70fb3fbf130127140b5271 (diff) | |
download | volse-hubzilla-5dee22c94d1ab366c88a7d3058867e70f5cfb827.tar.gz volse-hubzilla-5dee22c94d1ab366c88a7d3058867e70f5cfb827.tar.bz2 volse-hubzilla-5dee22c94d1ab366c88a7d3058867e70f5cfb827.zip |
db update for directory profiles - and fix broken database.sql from the sys_perms addition a couple days back
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 31 | ||||
-rw-r--r-- | install/update.php | 12 |
2 files changed, 29 insertions, 14 deletions
diff --git a/install/database.sql b/install/database.sql index cb332c75b..6be73f193 100644 --- a/install/database.sql +++ b/install/database.sql @@ -54,7 +54,7 @@ CREATE TABLE IF NOT EXISTS `account` ( `account_expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `account_expire_notified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `account_service_class` char(32) NOT NULL DEFAULT '', - `account_level` int(10) unsigned NOT NULL DEFAULT 0, + `account_level` int(10) unsigned NOT NULL, PRIMARY KEY (`account_id`), KEY `account_email` (`account_email`), KEY `account_service_class` (`account_service_class`), @@ -848,6 +848,15 @@ CREATE TABLE IF NOT EXISTS `spam` ( KEY `term` (`term`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS `sys_perms` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cat` char(255) NOT NULL, + `k` char(255) NOT NULL, + `v` mediumtext NOT NULL, + `public_perm` tinyint(1) unsigned NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + CREATE TABLE IF NOT EXISTS `term` ( `tid` int(10) unsigned NOT NULL AUTO_INCREMENT, `aid` int(10) unsigned NOT NULL DEFAULT '0', @@ -915,7 +924,7 @@ CREATE TABLE IF NOT EXISTS `verify` ( KEY `token` (`token`), KEY `meta` (`meta`), KEY `created` (`created`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `vote` ( `vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -971,7 +980,7 @@ CREATE TABLE IF NOT EXISTS `xconfig` ( KEY `xchan` (`xchan`), KEY `cat` (`cat`), KEY `k` (`k`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xign` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -1008,6 +1017,9 @@ CREATE TABLE IF NOT EXISTS `xprof` ( `xprof_postcode` char(32) NOT NULL DEFAULT '', `xprof_country` char(255) NOT NULL DEFAULT '', `xprof_keywords` text NOT NULL, + `xprof_about` text NOT NULL, + `xprof_homepage` char(255) NOT NULL DEFAULT '', + `xprof_hometown` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`xprof_hash`), KEY `xprof_desc` (`xprof_desc`), KEY `xprof_dob` (`xprof_dob`), @@ -1018,7 +1030,8 @@ CREATE TABLE IF NOT EXISTS `xprof` ( KEY `xprof_region` (`xprof_region`), KEY `xprof_postcode` (`xprof_postcode`), KEY `xprof_country` (`xprof_country`), - KEY `xprof_age` (`xprof_age`) + KEY `xprof_age` (`xprof_age`), + KEY `xprof_hometown` (`xprof_hometown`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xtag` ( @@ -1030,12 +1043,4 @@ CREATE TABLE IF NOT EXISTS `xtag` ( KEY `xtag_term` (`xtag_term`), KEY `xtag_hash` (`xtag_hash`), KEY `xtag_flags` (`xtag_flags`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -CREATE TABLE if not exists `sys_perms` ( - `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `cat` CHAR( 255 ) NOT NULL , - `k` CHAR( 255 ) NOT NULL , - `v` MEDIUMTEXT NOT NULL, - `public_perm` TINYINT( 1 ) UNSIGNED NOT NULL -) ENGINE = MYISAM DEFAULT CHARSET = utf8"); +) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/install/update.php b/install/update.php index c731eab06..8e64413dc 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1087 ); +define( 'UPDATE_VERSION' , 1088 ); /** * @@ -957,3 +957,13 @@ ADD INDEX ( `account_level` )"); return UPDATE_FAILED; } +function update_r1087() { + $r = q("ALTER TABLE `xprof` ADD `xprof_about` TEXT NOT NULL DEFAULT '', +ADD `xprof_homepage` CHAR( 255 ) NOT NULL DEFAULT '', +ADD `xprof_hometown` CHAR( 255 ) NOT NULL DEFAULT '', +ADD INDEX ( `xprof_hometown` )"); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + |