Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.149.27.125
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
chat-demo-master /
database /
migrations /
Delete
Unzip
Name
Size
Permission
Date
Action
2014_10_12_000000_create_users_table.php
810
B
-rw-r--r--
2021-02-02 18:24
2014_10_12_100000_create_password_resets_table.php
683
B
-rw-r--r--
2021-02-02 18:24
2019_11_06_134235_create_chat_tables.php
3.81
KB
-rw-r--r--
2021-02-02 18:24
Save
Rename
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; use Musonza\Chat\ConfigurationManager; class CreateChatTables extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create(ConfigurationManager::CONVERSATIONS_TABLE, function (Blueprint $table) { $table->bigIncrements('id'); $table->boolean('private')->default(true); $table->boolean('direct_message')->default(false); $table->text('data')->nullable(); $table->timestamps(); }); Schema::create(ConfigurationManager::PARTICIPATION_TABLE, function (Blueprint $table) { $table->bigIncrements('id'); $table->bigInteger('conversation_id')->unsigned(); $table->bigInteger('messageable_id')->unsigned(); $table->string('messageable_type'); $table->text('settings')->nullable(); $table->timestamps(); $table->unique(['conversation_id', 'messageable_id', 'messageable_type'], 'participation_index'); $table->foreign('conversation_id') ->references('id') ->on(ConfigurationManager::CONVERSATIONS_TABLE) ->onDelete('cascade'); }); Schema::create(ConfigurationManager::MESSAGES_TABLE, function (Blueprint $table) { $table->bigIncrements('id'); $table->text('body'); $table->bigInteger('conversation_id')->unsigned(); $table->bigInteger('participation_id')->unsigned()->nullable(); $table->string('type')->default('text'); $table->timestamps(); $table->foreign('participation_id') ->references('id') ->on(ConfigurationManager::PARTICIPATION_TABLE) ->onDelete('set null'); $table->foreign('conversation_id') ->references('id') ->on(ConfigurationManager::CONVERSATIONS_TABLE) ->onDelete('cascade'); }); Schema::create(ConfigurationManager::MESSAGE_NOTIFICATIONS_TABLE, function (Blueprint $table) { $table->bigIncrements('id'); $table->bigInteger('message_id')->unsigned(); $table->bigInteger('messageable_id')->unsigned(); $table->string('messageable_type'); $table->bigInteger('conversation_id')->unsigned(); $table->bigInteger('participation_id')->unsigned(); $table->boolean('is_seen')->default(false); $table->boolean('is_sender')->default(false); $table->boolean('flagged')->default(false); $table->timestamps(); $table->softDeletes(); $table->index(['participation_id', 'message_id'], 'participation_message_index'); $table->foreign('message_id') ->references('id') ->on(ConfigurationManager::MESSAGES_TABLE) ->onDelete('cascade'); $table->foreign('conversation_id') ->references('id') ->on(ConfigurationManager::CONVERSATIONS_TABLE) ->onDelete('cascade'); $table->foreign('participation_id') ->references('id') ->on(ConfigurationManager::PARTICIPATION_TABLE) ->onDelete('cascade'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists(ConfigurationManager::MESSAGE_NOTIFICATIONS_TABLE); Schema::dropIfExists(ConfigurationManager::MESSAGES_TABLE); Schema::dropIfExists(ConfigurationManager::PARTICIPATION_TABLE); Schema::dropIfExists(ConfigurationManager::CONVERSATIONS_TABLE); } }