Merge remote-tracking branch 'upstream/master'

Conflicts:
	boot.php
	update.php
This commit is contained in:
Michael Vogel 2014-09-04 02:29:12 +02:00
commit 24b3befc4d
4 changed files with 31 additions and 5 deletions

View File

@ -14,7 +14,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.2.1753' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1171 );
define ( 'DB_UPDATE_VERSION', 1173 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -507,7 +507,7 @@ CREATE TABLE IF NOT EXISTS `intro` (
CREATE TABLE IF NOT EXISTS `item` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`guid` char(64) NOT NULL,
`guid` char(255) NOT NULL,
`uri` char(255) CHARACTER SET ascii NOT NULL,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',

View File

@ -623,7 +623,7 @@ function db_definition() {
$database["guid"] = array(
"fields" => array(
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
"guid" => array("type" => "varchar(64)", "not null" => "1"),
"guid" => array("type" => "varchar(255)", "not null" => "1"),
),
"indexes" => array(
"PRIMARY" => array("id"),
@ -664,7 +664,7 @@ function db_definition() {
$database["item"] = array(
"fields" => array(
"id" => array("type" => "int(10) unsigned", "not null" => "1", "extra" => "auto_increment", "primary" => "1"),
"guid" => array("type" => "varchar(64)", "not null" => "1"),
"guid" => array("type" => "varchar(255)", "not null" => "1"),
"uri" => array("type" => "varchar(255)", "not null" => "1"),
"uid" => array("type" => "int(10) unsigned", "not null" => "1", "default" => "0"),
"contact-id" => array("type" => "int(11)", "not null" => "1"),

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1171 );
define( 'UPDATE_VERSION' , 1173 );
/**
*
@ -32,6 +32,8 @@ define( 'UPDATE_VERSION' , 1171 );
* 3. Increment the DB_UPDATE_VERSION in boot.php *AND* the UPDATE_VERSION in this file to match it
* 4. TEST the upgrade prior to checkin and filing a pull request.
*
* IMPORTANT!
* NEVER do a database change anymore in the update functions! Only do this in the file include/dbstructure.php!
*/
@ -1599,3 +1601,27 @@ function update_1169() {
return UPDATE_SUCCESS;
}
function update_1170() {
$r = q("ALTER TABLE `guid` CHANGE `guid` `guid` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
if (!$r)
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}
function update_1171() {
$r = q("ALTER TABLE `item` CHANGE `guid` `guid` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL");
if (!$r)
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}
/*
==========
ATTENTION!
==========
All following update functions are ONLY for jobs that need to run AFTER the database changes are applied.
Database changes are ONLY applied in the file include/dbstructure.php.
*/