Files
cssd-back/database/migrations/2019_08_19_105246_create_labels_table.php
2023-09-17 13:39:48 +03:30

43 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLabelsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('labels', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name')->nullable();
$table->date('sterile_date')->nullable();
$table->date('expire_date')->nullable();
$table->string('sterilizer_id');
$table->string('cycle_number');
$table->string('lot_number');
$table->string('department')->nullable();
$table->text('note')->nullable();
$table->unsignedBigInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
$table->unsignedBigInteger('package_id')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('labels');
}
}