add reason in corporate, plan, service

This commit is contained in:
2023-06-05 09:01:43 +07:00
parent 4fb2bab64e
commit 4cc2ae24b8
34 changed files with 2037 additions and 87 deletions

View File

@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('reason_update_data', function (Blueprint $table) {
$table->id();
$table->integer('menu_id');
$table->integer('data_id');
$table->string('reason');
$table->string('edited_by');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('reason_update_data');
}
};

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('audit_trails', function (Blueprint $table) {
$table->id();
$table->string('model');
$table->unsignedBigInteger('model_id');
$table->string('action');
$table->text('old_values')->nullable();
$table->text('new_values')->nullable();
$table->unsignedBigInteger('user_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('audit_trails');
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('corporates', function (Blueprint $table) {
$table->string('reason')->after('name')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('corporates', function (Blueprint $table) {
$table->dropColumn('reason');
});
}
};

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('corporate_services', function (Blueprint $table) {
//
$table->string('reason')->after('service_code')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('corporate_services', function (Blueprint $table) {
//
$table->dropColumn('reason');
});
}
};

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('plans', function (Blueprint $table) {
$table->string('reason')->after('service_code')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('plans', function (Blueprint $table) {
//
$table->dropColumn('reason');
});
}
};