|
@@ -0,0 +1,36 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+use Illuminate\Support\Facades\Schema;
|
|
|
+use Illuminate\Database\Schema\Blueprint;
|
|
|
+use Illuminate\Database\Migrations\Migration;
|
|
|
+
|
|
|
+class CreateStarNewsTable extends Migration
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * Run the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function up()
|
|
|
+ {
|
|
|
+ Schema::create('star_news', function (Blueprint $table) {
|
|
|
+ $table->bigIncrements('id');
|
|
|
+ $table->string('title', 30)->comment('新闻标题');
|
|
|
+ $table->string('content', 200)->comment('文字说明');
|
|
|
+ $table->string('cover_img')->comment('封面图');
|
|
|
+ $table->tinyInteger('status')->default(0)->comment('状态: 0.禁用;1.启用');
|
|
|
+ $table->integer('sort')->nullable()->comment('排序');
|
|
|
+ $table->timestamps();
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Reverse the migrations.
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function down()
|
|
|
+ {
|
|
|
+ Schema::dropIfExists('star_news');
|
|
|
+ }
|
|
|
+}
|