db update for directory profiles - and fix broken database.sql from the sys_perms addition a couple days back
This commit is contained in:
parent
b1ade138ff
commit
5dee22c94d
2
boot.php
2
boot.php
@ -46,7 +46,7 @@ define ( 'RED_PLATFORM', 'Red Matrix' );
|
|||||||
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||||
define ( 'ZOT_REVISION', 1 );
|
define ( 'ZOT_REVISION', 1 );
|
||||||
|
|
||||||
define ( 'DB_UPDATE_VERSION', 1087 );
|
define ( 'DB_UPDATE_VERSION', 1088 );
|
||||||
|
|
||||||
define ( 'EOL', '<br />' . "\r\n" );
|
define ( 'EOL', '<br />' . "\r\n" );
|
||||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||||
|
@ -54,7 +54,7 @@ CREATE TABLE IF NOT EXISTS `account` (
|
|||||||
`account_expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`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_expire_notified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
`account_service_class` char(32) NOT NULL DEFAULT '',
|
`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`),
|
PRIMARY KEY (`account_id`),
|
||||||
KEY `account_email` (`account_email`),
|
KEY `account_email` (`account_email`),
|
||||||
KEY `account_service_class` (`account_service_class`),
|
KEY `account_service_class` (`account_service_class`),
|
||||||
@ -848,6 +848,15 @@ CREATE TABLE IF NOT EXISTS `spam` (
|
|||||||
KEY `term` (`term`)
|
KEY `term` (`term`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) 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` (
|
CREATE TABLE IF NOT EXISTS `term` (
|
||||||
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`aid` int(10) unsigned NOT NULL DEFAULT '0',
|
`aid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
@ -1008,6 +1017,9 @@ CREATE TABLE IF NOT EXISTS `xprof` (
|
|||||||
`xprof_postcode` char(32) NOT NULL DEFAULT '',
|
`xprof_postcode` char(32) NOT NULL DEFAULT '',
|
||||||
`xprof_country` char(255) NOT NULL DEFAULT '',
|
`xprof_country` char(255) NOT NULL DEFAULT '',
|
||||||
`xprof_keywords` text NOT NULL,
|
`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`),
|
PRIMARY KEY (`xprof_hash`),
|
||||||
KEY `xprof_desc` (`xprof_desc`),
|
KEY `xprof_desc` (`xprof_desc`),
|
||||||
KEY `xprof_dob` (`xprof_dob`),
|
KEY `xprof_dob` (`xprof_dob`),
|
||||||
@ -1018,7 +1030,8 @@ CREATE TABLE IF NOT EXISTS `xprof` (
|
|||||||
KEY `xprof_region` (`xprof_region`),
|
KEY `xprof_region` (`xprof_region`),
|
||||||
KEY `xprof_postcode` (`xprof_postcode`),
|
KEY `xprof_postcode` (`xprof_postcode`),
|
||||||
KEY `xprof_country` (`xprof_country`),
|
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;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `xtag` (
|
CREATE TABLE IF NOT EXISTS `xtag` (
|
||||||
@ -1031,11 +1044,3 @@ CREATE TABLE IF NOT EXISTS `xtag` (
|
|||||||
KEY `xtag_hash` (`xtag_hash`),
|
KEY `xtag_hash` (`xtag_hash`),
|
||||||
KEY `xtag_flags` (`xtag_flags`)
|
KEY `xtag_flags` (`xtag_flags`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) 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");
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
define( 'UPDATE_VERSION' , 1087 );
|
define( 'UPDATE_VERSION' , 1088 );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -957,3 +957,13 @@ ADD INDEX ( `account_level` )");
|
|||||||
return UPDATE_FAILED;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user