2021_11_03_174248_create_system_configs_table.php
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSystemConfigsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('system_configs', function (Blueprint $table) {
$table->increments('id');
$table->string("key", 20)->default('')->nullable()->comment('键');
$table->text('value')->default('')->nullable()->comment('值');
$table->string('type')->default('')->nullable()->comment('值类型');
$table->string('name', 100)->default('')->nullable()->comment('名称');
$table->string('description')->default('')->nullable()->comment('说明');
$table->unsignedInteger('sort')->default(1)->comment('排序');
$table->unsignedTinyInteger('status')->default(1)->comment('状态:1可用;0冻结');
$table->softDeletes();
$table->timestamps();
});
DB::statement("ALTER TABLE system_configs comment '系统-配置表' ");
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('system_configs');
}
}