2022_03_14_175941_create_settings_table.php
934 Bytes
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
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings', function (Blueprint $table) {
$table->id();
$table->string('title')->comment('标题');
$table->string('keyword')->comment('关键字');
$table->json('content')->comment('内容');
$table->unsignedTinyInteger('version')->default(1)->comment('版本');
$table->unsignedTinyInteger('terminal')->comment('1=安卓,2=IOS,3=全平台');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('settings');
}
}