<?php

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

class AddColumnAndDataIconChannelSetup extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement('ALTER TABLE `property_booking_type` ADD COLUMN `icon` varchar(50) DEFAULT NULL AFTER `code`;');
        DB::statement('UPDATE `property_booking_type` SET `icon` = "fas fa-envelope-open-text" WHERE id=1;') ;
        DB::statement('UPDATE `property_booking_type` SET `icon` = "fas fa-envelope" WHERE id=2;') ;

        DB::statement('ALTER TABLE `property_availability_type` ADD COLUMN `icon` varchar(50) DEFAULT NULL AFTER `code`;');
        DB::statement('UPDATE `property_availability_type` SET `icon` = "fas fa-layer-group" WHERE id=1;') ;
        DB::statement('UPDATE `property_availability_type` SET `icon` = "fas fa-layer-group" WHERE id=2;') ;
        DB::statement('UPDATE `property_availability_type` SET `icon` = "fas fa-layer-plus" WHERE id=3;') ;

        DB::statement('ALTER TABLE `property_room_pricing_type` ADD COLUMN `icon` varchar(50) DEFAULT NULL AFTER `code`;');
        DB::statement('UPDATE `property_room_pricing_type` SET `icon` = "fas fa-user-tag" WHERE id=1;') ;
        DB::statement('UPDATE `property_room_pricing_type` SET `icon` = "fas fa-tags" WHERE id=2;') ;



    }

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