41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
|
<?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('warehouses', function (Blueprint $table) {
|
||
|
$table->id();
|
||
|
$table->string('name', 100);
|
||
|
$table->string('address', 100);
|
||
|
$table->string('kapasitas', 100);
|
||
|
$table->string('status', 1)->default(1);
|
||
|
$table->timestamps();
|
||
|
$table->softDeletes();
|
||
|
|
||
|
$table->foreignId("created_by")->nullable()->constrained("users");
|
||
|
$table->foreignId("updated_by")->nullable()->constrained("users");
|
||
|
$table->foreignId("deleted_by")->nullable()->constrained("users");
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::dropIfExists('warehouses');
|
||
|
}
|
||
|
};
|