duqinya 5 éve
szülő
commit
6cebfaaf48

+ 36 - 0
database/migrations/2019_06_17_020159_create_star_news_table.php

@@ -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');
+    }
+}

+ 33 - 0
database/migrations/2019_06_17_020244_create_platform_content_table.php

@@ -0,0 +1,33 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class CreatePlatformContentTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('platform_content', function (Blueprint $table) {
+            $table->bigIncrements('id');
+            $table->string('title', 30)->comment('内容名称');
+            $table->text('content')->comment('图文内容');
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('platform_content');
+    }
+}

+ 32 - 0
database/migrations/2019_06_17_024434_add_deleted_at_to_star_news_table.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddDeletedAtToStarNewsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('star_news', function (Blueprint $table) {
+            $table->softDeletes();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('star_news', function (Blueprint $table) {
+            //
+        });
+    }
+}