<?php

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

class AddOverlayControlToTiles extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('landing_page_tiles', function (Blueprint $table) {
            $table->dateTime('updated_at', 0)->nullable()->default(null)->change();
            $table->string('overlay_color', 7)->nullable();
            $table->integer('overlay_opacity')->nullable();
        });
    }

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