Skip to content

Commit

Permalink
Fixing Issue Faced When Migrating Also Can Be Seen On #153 (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenQoder authored and musonza committed Aug 15, 2019
1 parent a3ffc22 commit 0e30d97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions database/migrations/create_chat_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public function up()
Schema::create('mc_messages', function (Blueprint $table) {
$table->bigIncrements('id');
$table->text('body');
$table->integer('conversation_id')->unsignedBigIntegers();
$table->integer('user_id')->unsignedBigIntegers();
$table->bigInteger('conversation_id')->unsigned();
$table->bigInteger('user_id')->unsigned();
$table->string('type')->default('text');
$table->timestamps();

Expand All @@ -56,8 +56,8 @@ public function up()
});

Schema::create('mc_conversation_user', function (Blueprint $table) {
$table->integer('user_id')->unsignedBigIntegers();
$table->integer('conversation_id')->unsignedBigIntegers();
$table->bigInteger('user_id')->unsigned();
$table->bigInteger('conversation_id')->unsigned();
$table->primary(['user_id', 'conversation_id']);
$table->timestamps();

Expand All @@ -73,9 +73,9 @@ public function up()

Schema::create('mc_message_notification', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('message_id')->unsignedBigIntegers();
$table->integer('conversation_id')->unsignedBigIntegers();
$table->integer('user_id')->unsignedBigIntegers();
$table->bigInteger('message_id')->unsigned();
$table->bigInteger('conversation_id')->unsigned();
$table->bigInteger('user_id')->unsigned();
$table->boolean('is_seen')->default(false);
$table->boolean('is_sender')->default(false);
$table->boolean('flagged')->default(false);
Expand Down

0 comments on commit 0e30d97

Please sign in to comment.