Browse Source

Actually also add type to boost performances when loading muc messages

pull/676/head
Timothée Jaussoin 8 years ago
parent
commit
ef268a6f9a
  1. 16
      composer.lock
  2. 4
      database/migrations/20180606155549_add_jidto_and_type_indexes_to_messages.php

16
composer.lock

@ -1407,23 +1407,24 @@
}, },
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
"version": "v2.0.12",
"version": "v2.99.99",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/paragonie/random_compat.git", "url": "https://github.com/paragonie/random_compat.git",
"reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb"
"reference": "35469243ebbb9be5086cff57538cac6da2c36852"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
"reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/35469243ebbb9be5086cff57538cac6da2c36852",
"reference": "35469243ebbb9be5086cff57538cac6da2c36852",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.2.0"
"php": "^7"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.*|5.*"
"phpunit/phpunit": "4.*|5.*",
"vimeo/psalm": "^1"
}, },
"suggest": { "suggest": {
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
@ -1448,10 +1449,11 @@
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
"keywords": [ "keywords": [
"csprng", "csprng",
"polyfill",
"pseudorandom", "pseudorandom",
"random" "random"
], ],
"time": "2018-04-04T21:24:14+00:00"
"time": "2018-06-06T05:12:00+00:00"
}, },
{ {
"name": "pear/net_dns2", "name": "pear/net_dns2",

4
database/migrations/20180606155549_add_jid_to_indexes_to_messages.php → database/migrations/20180606155549_add_jidto_and_type_indexes_to_messages.php

@ -3,12 +3,13 @@
use Movim\Migration; use Movim\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
class AddJidToIndexesToMessages extends Migration
class AddJidtoAndTypeIndexesToMessages extends Migration
{ {
public function up() public function up()
{ {
$this->schema->table('messages', function(Blueprint $table) { $this->schema->table('messages', function(Blueprint $table) {
$table->index('jidto'); $table->index('jidto');
$table->index('type');
}); });
} }
@ -16,6 +17,7 @@ class AddJidToIndexesToMessages extends Migration
{ {
$this->schema->table('messages', function(Blueprint $table) { $this->schema->table('messages', function(Blueprint $table) {
$table->dropIndex('messages_jidto_index'); $table->dropIndex('messages_jidto_index');
$table->dropIndex('messages_type_index');
}); });
} }
Loading…
Cancel
Save