sifangpay/database/migrations/2018_12_22_174214_create_ar...

38 lines
1.0 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateArticlesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('articles', function (Blueprint $table) {
$table->increments('id');
$table->integer('category_id')->default(0)->comment('栏目id');
$table->string('name')->comment('名字');
$table->string('ename')->nullable()->comment('英文名');
$table->text('content')->nullable()->comment('内容');
$table->integer('sort')->default(0)->comment('排序');
$table->tinyInteger('is_checked')->default(1)->comment('状态1:启用,0:禁用');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('articles');
}
}