<?php

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

class CreateConfigurationsTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('configurations', function (Blueprint $table) {
            $table->id();
            $table->string('module', 100)->comment('所属模块');
            $table->string('title', 100)->comment('配置项名称');
            $table->string('keyValue', 100)->comment('配置键值');
            $table->string('paramsValue', 100)->nullable()->comment('值');
            $table->string('type', 100)->comment('类型');
            $table->json('source')->nullable()->comment('其他数据源');
            $table->timestamps();
        });
    }

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

}
