Writeoff/Database/Migrations/2023_10_10_034538_create_currencies_table.php

43 lines
1.1 KiB
PHP
Raw Normal View History

2023-10-10 04:18:12 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currencies', function (Blueprint $table) {
$table->id();
2023-10-10 08:44:27 +00:00
$table->string('kode',3)->unique();
2023-10-10 04:18:12 +00:00
$table->string('name');
2023-11-06 03:35:19 +00:00
$table->char('status', 1)->default('A');
2023-10-10 04:18:12 +00:00
$table->timestamps();
2023-11-06 03:35:19 +00:00
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();
2023-10-10 04:18:12 +00:00
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
2023-11-06 03:35:19 +00:00
$table->unsignedBigInteger('authorized_by')->nullable();
2023-10-10 04:18:12 +00:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currencies');
}
};