Company/Database/Migrations/2023_06_03_003243_create_companies_table.php

43 lines
1.3 KiB
PHP

<?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('companies', 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->enum("company_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('companies');
}
};