added filamentstock in filaments

This commit is contained in:
2025-03-11 12:23:46 +01:00
parent bca04897da
commit cbfe637f84
2 changed files with 33 additions and 1 deletions
@@ -0,0 +1,30 @@
<?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');
});
}
};