From ddf59588255ddcbf65703564c951abf20eb512cf Mon Sep 17 00:00:00 2001 From: James King Date: Tue, 26 Nov 2024 13:54:59 +0000 Subject: [PATCH 1/2] Use big integers to match Laravel --- .../2016_05_18_000000_teamwork_setup_tables.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/database/migrations/2016_05_18_000000_teamwork_setup_tables.php b/database/migrations/2016_05_18_000000_teamwork_setup_tables.php index 144f40c..036d5e8 100644 --- a/database/migrations/2016_05_18_000000_teamwork_setup_tables.php +++ b/database/migrations/2016_05_18_000000_teamwork_setup_tables.php @@ -13,19 +13,19 @@ class TeamworkSetupTables extends Migration public function up() { Schema::table(\Config::get('teamwork.users_table'), function (Blueprint $table) { - $table->integer('current_team_id')->unsigned()->nullable(); + $table->bigInteger('current_team_id')->unsigned()->nullable(); }); Schema::create(\Config::get('teamwork.teams_table'), function (Blueprint $table) { - $table->increments('id')->unsigned(); - $table->integer('owner_id')->unsigned()->nullable(); + $table->bigIncrements('id')->unsigned(); + $table->bigInteger('owner_id')->unsigned()->nullable(); $table->string('name'); $table->timestamps(); }); Schema::create(\Config::get('teamwork.team_user_table'), function (Blueprint $table) { $table->bigInteger('user_id')->unsigned(); - $table->integer('team_id')->unsigned(); + $table->bigInteger('team_id')->unsigned(); $table->timestamps(); $table->foreign('user_id') @@ -41,9 +41,9 @@ public function up() }); Schema::create(\Config::get('teamwork.team_invites_table'), function (Blueprint $table) { - $table->increments('id'); + $table->bigIncrements('id'); $table->bigInteger('user_id')->unsigned(); - $table->integer('team_id')->unsigned(); + $table->bigInteger('team_id')->unsigned(); $table->enum('type', ['invite', 'request']); $table->string('email'); $table->string('accept_token'); From df7abad67b0527ae536a298d64378fe24739be86 Mon Sep 17 00:00:00 2001 From: James King Date: Tue, 26 Nov 2024 13:58:24 +0000 Subject: [PATCH 2/2] Use id() shorthand --- .../migrations/2016_05_18_000000_teamwork_setup_tables.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/2016_05_18_000000_teamwork_setup_tables.php b/database/migrations/2016_05_18_000000_teamwork_setup_tables.php index 036d5e8..922d91d 100644 --- a/database/migrations/2016_05_18_000000_teamwork_setup_tables.php +++ b/database/migrations/2016_05_18_000000_teamwork_setup_tables.php @@ -17,7 +17,7 @@ public function up() }); Schema::create(\Config::get('teamwork.teams_table'), function (Blueprint $table) { - $table->bigIncrements('id')->unsigned(); + $table->id(); $table->bigInteger('owner_id')->unsigned()->nullable(); $table->string('name'); $table->timestamps(); @@ -41,7 +41,7 @@ public function up() }); Schema::create(\Config::get('teamwork.team_invites_table'), function (Blueprint $table) { - $table->bigIncrements('id'); + $table->id(); $table->bigInteger('user_id')->unsigned(); $table->bigInteger('team_id')->unsigned(); $table->enum('type', ['invite', 'request']);