Skip to content

Commit

Permalink
Implemented migration to increase size (text > longtext) of propertie…
Browse files Browse the repository at this point in the history
…s column on activity_log, allowing large amount of data on that field
  • Loading branch information
thiagoprz committed Sep 3, 2021
1 parent 8ff7ace commit 8d687c6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CrudToolsServiceProvider.php
Expand Up @@ -36,5 +36,7 @@ public function boot()
$this->publishes([
__DIR__ . '/config/crud-tools.php' => config_path('crud-tools.php'),
]);
// Publishes any migrations necessary
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
}
}
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class IncreasePropertiesSizeOnActivityLogTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (Schema::hasTable('activity_log')) {
Schema::table('activity_log', function(Blueprint $table) {
$table->longText('properties')->nullable()->change();
});
}
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

0 comments on commit 8d687c6

Please sign in to comment.