1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateStatisticsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('statistics', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('name', 50)->comment('名称');
- $table->string('slug', 20)->nullable()->comment('标识');
- $table->text('body')->nullable()->comment('内容');
- $table->date('date')->comment('内容');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('statistics');
- }
- }
|