<?php

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

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

        DB::statement('
ALTER TABLE `property_channel_mapping`
ADD COLUMN `currency_code` varchar(3) NOT NULL AFTER `channel_id`;

        ');

        DB::statement('
UPDATE `property_channel_mapping` SET `currency_code` = \'TRY\';

        ');
    }

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

    }
}
