Created
November 29, 2021 18:21
-
-
Save DenisJunio/144f4e6f3531521436ba2cc4a868c980 to your computer and use it in GitHub Desktop.
Change IDs in Action Events("action_events") Table - Laravel Nova UUID support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class ChangeIdsInActionEventsTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::table('action_events', function (Blueprint $table) { | |
$table->uuid('user_id')->nullable()->change(); | |
$table->uuid('actionable_id')->change(); | |
$table->uuid('target_id')->change(); | |
$table->uuid('model_id')->nullable()->change(); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::table('action_events', function (Blueprint $table) { | |
$table->unsignedBigInteger('user_id')->change(); | |
$table->unsignedBigInteger('actionable_id')->change(); | |
$table->unsignedBigInteger('target_id')->change(); | |
$table->unsignedBigInteger('model_id')->nullable()->change(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment