generated from liutk/owl-admin-base
35 lines
980 B
PHP
35 lines
980 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('timelines', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('title')->comment('标题');
|
|
$table->text('description')->nullable()->comment('简介');
|
|
$table->string('cover')->nullable()->comment('封面');
|
|
$table->date('awarded_date')->nullable()->comment('日期');
|
|
$table->unsignedTinyInteger('is_enable')->default(1)->comment('显示开关');
|
|
|
|
$table->unsignedInteger('sort')->default(0)->comment('排序');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('timelines');
|
|
}
|
|
};
|