29 lines
1.0 KiB
PHP
29 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('materials', function (Blueprint $table) {
|
|
$table->id()->comment('자재 PK');
|
|
$table->string('name', 100)->comment('자재명(품명)');
|
|
$table->string('specification', 100)->nullable()->comment('규격');
|
|
$table->string('material_code', 50)->unique()->comment('자재코드');
|
|
$table->string('unit', 10)->comment('단위');
|
|
$table->char('is_inspection', 1)->default('N')->comment('검사대상 여부(Y/N)');
|
|
$table->text('search_tag')->nullable()->comment('검색 태그');
|
|
$table->text('remarks')->nullable()->comment('비고');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('materials');
|
|
}
|
|
};
|