<?php

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

class ChangeColumnNameCancellationPolicyTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {


       DB::statement("
ALTER TABLE `property_cancellation_policy`
CHANGE COLUMN `affects_price` `is_affected_price` tinyint(1) NOT NULL AFTER `value`,
CHANGE COLUMN `affects_price_action_type` `affect_price_action_type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'PLS,MIN' AFTER `is_affected_price`,
CHANGE COLUMN `affects_price_type` `affect_price_type` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'PER,FIX' AFTER `affect_price_action_type`,
CHANGE COLUMN `affects_price_value` `affect_price_value` double(10,2) DEFAULT NULL AFTER `affect_price_type`;
        ");
    }

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