43 lines
1.3 KiB
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.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('filaments', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->timestamps();
|
|
$table->string('name')->required();
|
|
$table->string('description')->nullable();
|
|
$table->string('color_id')->required();
|
|
$table->string('manufacturer_id')->required();
|
|
$table->string('type_id')->required();
|
|
$table->string('weight')->required();
|
|
$table->string('diameter')->required();
|
|
$table->string('price')->nullable();
|
|
$table->string('finish')->nullable();
|
|
$table->string('image')->nullable();
|
|
$table->integer('stock')->default(0);
|
|
$table->integer('temp_min')->nullable();
|
|
$table->integer('temp_max')->nullable();
|
|
$table->integer('buildplate_id')->nullable();
|
|
$table->integer('extruder_id')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('filaments');
|
|
}
|
|
};
|