<?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 `order_number` tinyint(4) NOT NULL DEFAULT "0" AFTER `type`;');

        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (1, null, 'Home', 'myweb-menu-home', '/', 1, 1, 1, 1, 1, 1, 1);");
        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (2, null, 'About', 'myweb-menu-about', '/about', 1, 2, 1, 1, 1, 1, 1);");
        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (3, null, 'Gallery', 'myweb-menu-gallery', '/gallery', 1, 3, 1, 1, 1, 1, 1);");
        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (4, null, 'Rooms', 'myweb-menu-rooms', '/rooms', 1, 4, 1, 1, 1, 1, 1);");
        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (5, null, 'Reservation', 'myweb-menu-reservation', '/booking', 2, 5, 1, 1, 1, 1, 1);");
        DB::connection()->statement("INSERT INTO `property_web_menu` VALUES (6, null, 'Contact Us', 'myweb-menu-contact_us', '/contact', 1, 6, 1, 1, 1, 1, 1);");
    }


    public function down()
    {
        //
    }
}
