<?php

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

class AddViewedToAlbumNewsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('album_news', function (Blueprint $table) {
            $table->integer('viewed')->after('content')->default(0)->comment('浏览人数');
            $table->integer('like')->after('content')->default(0)->comment('好评数');
            $table->integer('commonly')->after('content')->default(0)->comment('一般数');
            $table->integer('bad')->after('content')->default(0)->comment('差评数');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('album_news', function (Blueprint $table) {
            //
        });
    }
}
