<?php

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

class CreateAlbumWechatApp extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('album_wechat_app', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('acid')->comment('微擎公众号id');
            $table->integer('user_id');
            $table->string('name',100);
            $table->string('app_id',255);
            $table->string('app_secret',255);
            $table->string('desc',255)->nullable();
            $table->string('mch_id',255)->nullable();
            $table->string('key',255)->nullable();
            $table->longText('cert_pem')->nullable();
            $table->longText('key_pem')->nullable();
            $table->unsignedInteger('addtime');
            $table->unsignedInteger('is_delete')->default(0)->comment('Is_delete');
            $table->timestamps();
        });
    }

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