pdv.backend/database/migrations/2025_12_30_140534_create_prices_table.php
2025-12-30 16:38:14 -06:00

32 lines
750 B
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('prices', function (Blueprint $table) {
$table->id();
$table->foreignId('inventory_id')->constrained()->onDelete('cascade');
$table->decimal('cost', 10, 2);
$table->decimal('retail_price', 10, 2);
$table->decimal('tax', 5, 2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('prices');
}
};