Browse Source
Change Messages primary key (add jidfrom)
Change Messages primary key (add jidfrom)
Fix events handling to prevent filtering issues Update the dependenciespull/647/head
10 changed files with 64 additions and 23 deletions
-
15app/Message.php
-
8app/widgets/Chat/Chat.php
-
4app/widgets/Chat/_chat.tpl
-
3app/widgets/Chats/chats.js
-
2app/widgets/Rooms/Rooms.php
-
2composer.json
-
10composer.lock
-
23database/migrations/20180515205626_change_messages_primary_key.php
-
14src/Movim/Widget/Base.php
-
6src/Movim/Widget/Wrapper.php
@ -0,0 +1,23 @@ |
|||
<?php |
|||
|
|||
use Movim\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
|
|||
class ChangeMessagesPrimaryKey extends Migration |
|||
{ |
|||
public function up() |
|||
{ |
|||
$this->schema->table('messages', function(Blueprint $table) { |
|||
$table->dropPrimary('messages_pkey'); |
|||
$table->primary(['user_id', 'jidfrom', 'id']); |
|||
}); |
|||
} |
|||
|
|||
public function down() |
|||
{ |
|||
$this->schema->table('messages', function(Blueprint $table) { |
|||
$table->dropPrimary('messages_pkey'); |
|||
$table->primary(['user_id', 'id']); |
|||
}); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue