<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

return new class extends Migration {
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('product_sale', function (Blueprint $table) {
            $table->bigInteger('id')->autoIncrement();
            $table->double('quantity')->after('sale_id');
            $table->decimal('price')->after('quantity');
            $table->decimal('total')->after('price');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('product_sale', function (Blueprint $table) {
            $table->dropColumn('id');
            $table->dropColumn('quantity');
            $table->dropColumn('price');
            $table->dropColumn('total');
        });
    }
};
