<?php

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

class AddDefaultValueToAllImagesInDb extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('vendor_details', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('categories', function (Blueprint $table) {
            $table->string('cat_photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('item_galleries', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('items', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });


        Schema::table('rooms', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('sliders', function (Blueprint $table) {
            $table->string('slider_photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('tables', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('vendor_item_categories', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('vendor_sliders', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });

        Schema::table('vendor_types', function (Blueprint $table) {
            $table->string('photo')->default('images/user/no.png')->nullable()->change();
        });
    }

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

    }
}
