You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
950 B
38 lines
950 B
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration {
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('articles', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('title')->comment('标题');
|
|
$table->mediumText('content')->nullable()->comment('内容');
|
|
// 类型
|
|
$table->tinyInteger('type')->default(0)->comment('类型1校友动态2业界动态');
|
|
// 排序
|
|
$table->integer('sort')->default(0)->comment('排序');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('articles');
|
|
}
|
|
};
|