Merged release/staging into hotfix/tunai-add-timestamp

This commit is contained in:
Muhd hafifie
2024-12-22 13:07:44 +00:00
37 changed files with 3212 additions and 583 deletions
@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailoverTransactionTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql7')->create('failover_transaction', function (Blueprint $table) {
$table->id();
$table->string('kodcaw',10);
$table->string('teller',255);
$table->string('old_norujukan',50);
$table->string('new_norujukan',50)->nullable();
$table->boolean('db_caw')->default(false); // Boolean for db_caw, default to false
$table->boolean('db_online')->default(false);
$table->enum('status', ['pending', 'resolved', 'failed'])->default('pending'); // Use ENUM for statuses
$table->timestamp('resolve_time')->nullable(); // Timestamp for resolve time, nullable
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql7')->dropIfExists('failover_transaction');
}
}
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailoverTransactionFailedTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('failover_transaction_failed', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('original_id'); // Reference to failover_transaction
$table->string('kodcaw');
$table->string('norujukan');
$table->integer('code_error');
$table->text('error_message')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('failover_transaction_failed');
}
}