master_template/database/migrations/2024_06_10_095414_create_tbl_operation_logs.php

38 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2024-06-10 12:21:58 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('operation_logs', function (Blueprint $table) {
$table->id('operation_id');
$table->string('refNo', 255)->nullable()->default(null);
$table->integer('user_id')->nullable()->default(null);
$table->bigInteger('operation_start_no')->nullable()->default(null);
$table->bigInteger('operation_end_no')->nullable()->default(null);
$table->string('model_name', 100)->nullable()->default(null);
$table->integer('model_id')->nullable()->default(null);
$table->string('operation_name', 100)->nullable()->default(null);
$table->text('previous_values')->nullable()->default(null);
$table->longText('new_values')->nullable()->default(null);
$table->timestamp('created_at')->nullable()->default(null);
$table->timestamp('updated_at')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('operation_logs');
}
};