<?php

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

class AddFieldsToPaymentTransaction extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement("
ALTER TABLE `payment_transaction`
ADD COLUMN `transaction_type` VARCHAR(5) NULL DEFAULT 'BKG' COMMENT 'BKG, OFR, LNK' AFTER `order_id`;
        ") ;

        DB::statement("

        ALTER TABLE `payment_transaction`
CHANGE COLUMN `status` `status` TINYINT(1) NULL DEFAULT NULL COMMENT '0 => Error; 1 =>Success; 2=> Start, 3=> Pending, 4 => Cancel/Refund, 5 => LNK' ;
        ") ;
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

    }
}
