提交代码
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateArticlesTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('articles', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('id', true)->unsigned();
|
||||
$table->string('title');
|
||||
$table->integer('category_id')->comment('分类id');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('cover')->nullable();
|
||||
$table->text('content');
|
||||
$table->boolean('status')->default(0);
|
||||
$table->integer('order')->unsigned()->default(0);
|
||||
$table->integer('clicks')->unsigned()->nullable()->default(0);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('articles');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user