<?php

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

class AddIsCoverPhotoToOfferPhotoMapping extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('offer_photo_mapping', function (Blueprint $table) {
            $table->tinyInteger('is_cover')->after('property_photo_id')->default(0)->comment(' 0  false, 1 true (use for cover photo)');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('offer_photo_mapping', function (Blueprint $table) {
            $table->dropColumn('is_cover');

        });
    }
}
