<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->id();
            $table->string('article')->index()->unique();
            $table->string('series')->index()->default('');
            $table->string('name');
            $table->string('name_for_form')->default('');
            $table->string('product_group')->default('');
            $table->decimal('price', 15, 2, true)->default(0);
            $table->text('characteristics');
            $table->text('tech_description');
            $table->text('tech_description_short');
            $table->string('image_path')->default('');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
};
