1234567891011121314151617181920212223242526272829303132333435363738 |
- <?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->string("name")->comment("文章标题");
- $table->string('picture')->comment("文章封面");
- $table->text('content')->comment('文章内容');
- $table->integer('articletype_id')->comment('文章类型');
- $table->string('source')->comment('文章来源');
- $table->string('author')->comment('作者');
- $table->boolean('ispush')->comment('是否发布');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('articles');
- }
- }
|