File: /home/posscale/www/printmanager/database/migrations/2025_09_19_134142_create_toner_inks_table.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('toner_inks', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('make_id');
$table->unsignedBigInteger('model_id');
$table->string('part_no', 50)->unique();
$table->text('description');
$table->decimal('cost_price', 10, 2);
$table->unsignedBigInteger('last_supplier_id')->nullable();
$table->decimal('average_cost', 10, 2)->nullable();
$table->decimal('sell_price', 10, 2)->nullable();
$table->decimal('online_price', 10, 2)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('toner_inks');
}
};