<?php

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

class CreateBillingServicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('billing_services', function (Blueprint $table) {
            $table->increments('id');
            $table->string('service_ref', 191);
            $table->date('setup_date');
            $table->date('last_billed')->nullable();
            $table->date('next_billed');
            $table->date('canseled_date')->nullable();
            $table->text('description');
            $table->boolean('do_not_bill')->default(0);
            $table->double('fee', 8, 2);
            $table->integer('renew');
            $table->text('agreement')->nullable();
            $table->text('notes')->nullable();
            $table->string('username', 191)->nullable();
            $table->string('password', 191)->nullable();
            $table->integer('customer_id')->default(0);
            $table->timestamps();
            $table->string('tax_type', 191)->default('OUTPUT2');
        });
    }

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