<?php

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

class ChangeBillingDateFormarToBandSalesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('band_sales', function (Blueprint $table) {
            $table->renameColumn('billing_date', 'billing_date_old');
        });

        Schema::table('band_sales', function (Blueprint $table) {
            $table->timestamp('billing_date')->nullable();
        });
    }

    public function down()
    {
        Schema::table('band_sales', function (Blueprint $table) {
            $table->dropColumn('billing_date_old');
        });
    }
}
