Supplier/Database/Migrations/2023_06_03_003243_create_suppliers_table.php

44 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2023-06-03 14:10:02 +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.
*
* @return void
*/
public function up()
{
Schema::create('suppliers', function (Blueprint $table) {
$table->id();
$table->string("name");
$table->string("npwp");
$table->string("address")->nullable();
$table->string("phone")->nullable();
$table->string("email")->nullable();
$table->string("website")->nullable();
$table->string("no_rekening")->nullable();
$table->enum("supplier_type", ["PKP", "Non PKP"]);
$table->char("status", 1)->default(1);
$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('suppliers');
}
};