| @@ 7-38 (lines=32) @@ | ||
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | ||
| 7 | class CreateLarametricsModelsTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create( |
|
| 17 | 'larametrics_models', function (Blueprint $table) { |
|
| 18 | $table->increments('id'); |
|
| 19 | $table->string('model'); |
|
| 20 | $table->integer('model_id'); |
|
| 21 | $table->string('method'); |
|
| 22 | $table->text('original')->nullable(); |
|
| 23 | $table->text('changes')->nullable(); |
|
| 24 | $table->timestamps(); |
|
| 25 | } |
|
| 26 | ); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Reverse the migrations. |
|
| 31 | * |
|
| 32 | * @return void |
|
| 33 | */ |
|
| 34 | public function down() |
|
| 35 | { |
|
| 36 | Schema::dropIfExists('larametrics_models'); |
|
| 37 | } |
|
| 38 | } |
|
| @@ 7-38 (lines=32) @@ | ||
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | ||
| 7 | class CreateLarametricsLogsTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create( |
|
| 17 | 'larametrics_logs', function (Blueprint $table) { |
|
| 18 | $table->increments('id'); |
|
| 19 | $table->string('level'); |
|
| 20 | $table->text('message'); |
|
| 21 | $table->integer('user_id')->nullable(); |
|
| 22 | $table->string('email')->nullable(); |
|
| 23 | $table->text('trace'); |
|
| 24 | $table->timestamps(); |
|
| 25 | } |
|
| 26 | ); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Reverse the migrations. |
|
| 31 | * |
|
| 32 | * @return void |
|
| 33 | */ |
|
| 34 | public function down() |
|
| 35 | { |
|
| 36 | Schema::dropIfExists('larametrics_logs'); |
|
| 37 | } |
|
| 38 | } |
|
| @@ 7-38 (lines=32) @@ | ||
| 4 | use Illuminate\Database\Schema\Blueprint; |
|
| 5 | use Illuminate\Database\Migrations\Migration; |
|
| 6 | ||
| 7 | class CreateLarametricsNotificationsTable extends Migration |
|
| 8 | { |
|
| 9 | /** |
|
| 10 | * Run the migrations. |
|
| 11 | * |
|
| 12 | * @return void |
|
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create( |
|
| 17 | 'larametrics_notifications', function (Blueprint $table) { |
|
| 18 | $table->increments('id'); |
|
| 19 | $table->string('action'); |
|
| 20 | $table->string('filter')->nullable(); |
|
| 21 | $table->text('meta')->nullable(); |
|
| 22 | $table->string('notify_by')->default('email'); |
|
| 23 | $table->timestamp('last_fired_at')->nullable(); |
|
| 24 | $table->timestamps(); |
|
| 25 | } |
|
| 26 | ); |
|
| 27 | } |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Reverse the migrations. |
|
| 31 | * |
|
| 32 | * @return void |
|
| 33 | */ |
|
| 34 | public function down() |
|
| 35 | { |
|
| 36 | Schema::dropIfExists('larametrics_notifications'); |
|
| 37 | } |
|
| 38 | } |
|