Updated Filament Model
This commit is contained in:
@@ -22,6 +22,13 @@ return new class extends Migration
|
||||
$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();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?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::table('filaments', function (Blueprint $table) {
|
||||
// adding stock to filaments table
|
||||
$table->integer('stock')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('filaments', function (Blueprint $table) {
|
||||
// removing stock from filaments table
|
||||
$table->dropColumn('stock');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user