<?php

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

class SupplierPayments extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('supplier_bookings', function($table) {
            $table->double('paid_amount_myr')->default(0);
            $table->integer('complete')->default(0);
        });
        DB::table('supplier_bookings')->update(['complete' => 1]);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('supplier_bookings', function($table) {
            $table->dropColumn('paid_amount_myr');
            $table->dropColumn('complete');
        });
    }
}
