<?php

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

class CreateSujetoDetraccionTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sujeto_detraccion', function (Blueprint $table) {
            $table->integer('id_sujeto_detraccion')->autoIncrement();
            $table->string('nombre', 200);
            $table->string('codigo', 5);
            $table->decimal('porcentaje', 9, 2)->nullable();
        });
    }

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