<?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::table('formulariums', function (Blueprint $table) {
            $table->text('description')->after('name');;
            $table->string('manufacturer')->after('description');
            $table->string('category_name')->after('manufacturer');
            $table->string('kategori_obat')->after('category_name');
            $table->string('uom')->after('kategori_obat');
            $table->text('general_indication')->after('uom');
            $table->string('atc_code')->after('general_indication');
            $table->string('class')->after('atc_code');
            $table->string('bpom_registration')->after('class');
            $table->string('classifications')->after('bpom_registration');
            $table->string('cat_for')->after('classifications');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('formulariums', function (Blueprint $table) {
            $table->dropColumn('description');
            $table->dropColumn('manufacturer');
            $table->dropColumn('category_name');
            $table->dropColumn('kategori_obat');
            $table->dropColumn('uom');
            $table->dropColumn('general_indication');
            $table->dropColumn('atc_code');
            $table->dropColumn('class');
            $table->dropColumn('bpom_registration');
            $table->dropColumn('classifications');
            $table->dropColumn('cat_for');
        });
    }
};
