Merge pull request #220 from Mibew/cluster_fix

Cluster fix
This commit is contained in:
Fedor A. Fetisov 2018-01-16 18:32:56 +03:00 committed by GitHub
commit 28e968b15f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "mibew/mibew", "name": "mibew/mibew",
"version": "3.0.0", "version": "3.1.0",
"description": "Mibew Messenger - open-source live support application", "description": "Mibew Messenger - open-source live support application",
"type": "project", "type": "project",
"homepage": "http://mibew.org", "homepage": "http://mibew.org",

View File

@ -226,7 +226,7 @@ operatorstatistics:
revision: revision:
fields: fields:
id: "INT NOT NULL" id: "INT NOT NULL PRIMARY KEY"
# Contains relations between operators and groups # Contains relations between operators and groups
operatortoopgroup: operatortoopgroup:

View File

@ -439,4 +439,30 @@ class Updater
return true; return true;
} }
/**
* Performs all database updates needed for 3.1.0.
*
* @return boolean True if the updates have been applied successfully and
* false otherwise.
*/
protected function update30100()
{
$db = $this->getDatabase();
if (!$db) {
return false;
}
try {
// Alter plugin table.
$db->query('ALTER TABLE {revision} ADD PRIMARY KEY (id)');
} catch (\Exception $e) {
$this->errors[] = getlocal('Cannot update tables: {0}', $e->getMessage());
return false;
}
return true;
}
} }

View File

@ -20,7 +20,7 @@
/** /**
* Current version of Mibew Messenger * Current version of Mibew Messenger
*/ */
define('MIBEW_VERSION', '3.0.0'); define('MIBEW_VERSION', '3.1.0');
/** /**
* Prefix for session variables. * Prefix for session variables.