Writeoff/Database/Migrations/2023_10_10_034538_create_currencies_table.php

39 lines
897 B
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');
$table->timestamps();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('currencies');
}
};