<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApkFileLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('apk_file_log', function (Blueprint $table) {
            $table->increments('id')->comment('自增主键');
            $table->string('name',64)->default('')->comment('游戏名称');
            $table->string('version',32)->default('')->comment('版本号');
            $table->string('file_url',256)->default('')->comment('apk包下载地址');
            $table->string('local_url',256)->default('')->comment('本地存放地址');
            $table->string('down_url',128)->default('')->comment('下载地址');
            $table->string('md5',32)->default('')->comment('md5码');
            $table->decimal('size',8,2)->default(0.00)->comment('包大小 M');
            $table->string('origin_name',64)->default('')->comment('原包名');
            $table->integer('down')->default(0)->comment('下载次数');
            $table->tinyInteger('status')->default(1)->comment('状态 1=上线，0=下线');
            $table->string('remark',128)->default('')->comment('备注');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = 'InnoDB';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('apk_file_log');
    }
}
