<?php

use App\Database\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('price_list_prices', function (Blueprint $table) {
            $table->foreignId('price_list_id')->constrained()->onDelete('CASCADE');
            $table->foreignId('product_id')->constrained();
            $table->double('price');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::disableForeignKeyConstraints();
        Schema::dropIfExists('price_list_prices');
        Schema::enableForeignKeyConstraints();
    }
};
