Files
FilamentLaravel/database/migrations/2025_03_10_183058_create_filaments.php
T
2025-03-15 20:05:27 +01:00

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->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();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('filaments');
}
};