1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into rewrites/coding-convention

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2017-03-20 20:51:32 +01:00
commit 09851331a9
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
29 changed files with 6874 additions and 6842 deletions

View file

@ -1,6 +1,6 @@
<?php
define('UPDATE_VERSION' , 1215);
define('UPDATE_VERSION' , 1216);
/**
*
@ -48,8 +48,8 @@ function update_1000() {
q("ALTER TABLE `intro` ADD `duplex` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `knowyou` ");
q("ALTER TABLE `contact` ADD `duplex` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `rel` ");
q("ALTER TABLE `contact` CHANGE `issued-pubkey` `issued-pubkey` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
q("ALTER TABLE `contact` ADD `term-date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `avatar-date`");
q("ALTER TABLE `contact` CHANGE `issued-pubkey` `issued-pubkey` TEXTCHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
q("ALTER TABLE `contact` ADD `term-date` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `avatar-date`");
}
function update_1001() {
@ -243,8 +243,8 @@ function update_1022() {
}
function update_1023() {
q("ALTER TABLE `user` ADD `register_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `timezone` ,
ADD `login_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `register_date` ");
q("ALTER TABLE `user` ADD `register_date` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `timezone` ,
ADD `login_date` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `register_date` ");
}
function update_1024() {
@ -350,7 +350,7 @@ function update_1034() {
function update_1035() {
q("ALTER TABLE `contact` ADD `success_update` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `last-update` ");
q("ALTER TABLE `contact` ADD `success_update` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `last-update` ");
}
@ -442,7 +442,7 @@ function update_1049() {
`user` CHAR( 255 ) NOT NULL ,
`pass` CHAR( 255 ) NOT NULL ,
`reply_to` CHAR( 255 ) NOT NULL ,
`last_check` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
`last_check` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00'
) ENGINE = MYISAM ");
}
@ -453,8 +453,8 @@ function update_1050() {
`filetype` CHAR( 64 ) NOT NULL ,
`filesize` INT NOT NULL ,
`data` LONGBLOB NOT NULL ,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`edited` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
`edited` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
`allow_cid` MEDIUMTEXT NOT NULL ,
`allow_gid` MEDIUMTEXT NOT NULL ,
`deny_cid` MEDIUMTEXT NOT NULL ,
@ -532,6 +532,7 @@ function update_1065() {
function update_1066() {
$r = q("ALTER TABLE `item` ADD `received` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `edited` ");
/// @TODO Decide to use dbm::is_result() here, what does $r include?
if ($r) {
q("ALTER TABLE `item` ADD INDEX ( `received` ) ");
}
@ -676,7 +677,7 @@ function update_1079() {
}
function update_1080() {
q("ALTER TABLE `fcontact` ADD `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'");
q("ALTER TABLE `fcontact` ADD `updated` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00'");
}
function update_1081() {
@ -736,7 +737,7 @@ function update_1086() {
}
function update_1087() {
q("ALTER TABLE `item` ADD `commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `edited` ");
q("ALTER TABLE `item` ADD `commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `edited` ");
$r = q("SELECT `id` FROM `item` WHERE `parent` = `id` ");
if (dbm::is_result($r)) {
@ -757,8 +758,8 @@ function update_1087() {
function update_1088() {
q("ALTER TABLE `user` ADD `account_expired` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `expire` ,
ADD `account_expires_on` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `account_expired` ,
ADD `expire_notification_sent` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `account_expires_on` ");
ADD `account_expires_on` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `account_expired` ,
ADD `expire_notification_sent` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `account_expires_on` ");
}
function update_1089() {
@ -943,8 +944,8 @@ ADD INDEX ( `hidden` ) ");
function update_1109() {
q("ALTER TABLE `conv` ADD `creator` CHAR( 255 ) NOT NULL ,
ADD `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
ADD `updated` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
ADD `created` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
ADD `updated` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
ADD `subject` MEDIUMTEXT NOT NULL,
ADD INDEX ( `created` ), ADD INDEX ( `updated` ) ");
}
@ -1644,11 +1645,11 @@ function update_1169() {
`iid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`contact-id` int(11) unsigned NOT NULL DEFAULT '0',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`commented` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`received` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`edited` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`commented` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`received` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`changed` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
`wall` tinyint(1) NOT NULL DEFAULT '0',
`private` tinyint(1) NOT NULL DEFAULT '0',
`pubmail` tinyint(1) NOT NULL DEFAULT '0',