<?php

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

class AddColumnAndDataPropertyWebMenuTable extends Migration
{

    public function up()
    {
        DB::statement('ALTER TABLE `property_web_menu` ADD COLUMN `icon` varchar(150) DEFAULT NULL AFTER `order_number`;') ;

        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-home" WHERE id = 1;');  // Home
        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-file-alt" WHERE id = 2;'); // About
        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-images" WHERE id = 3;'); // Gallery
        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-bed" WHERE id = 4;'); // Rooms
        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-calendar-alt" WHERE id = 5;'); // Reservation
        DB::statement('UPDATE `property_web_menu` SET `icon` = "fas fa-id-card-alt" WHERE id = 6;'); // Contact Us
    }


    public function down()
    {
        //
    }
}
