Selaa lähdekoodia

分类及音乐添加排序字段

durong 5 vuotta sitten
vanhempi
commit
6ab31cb2f6

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

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddSortToPostMusicCategoryTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('post_music_category', function (Blueprint $table) {
+            $table->integer('sort')->default(999)->comment('排序');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('post_music_category', function (Blueprint $table) {
+            //
+        });
+    }
+}

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

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddSortToPostMusicCategoryRelTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('post_music_category_rel', function (Blueprint $table) {
+            $table->integer('sort')->default(999)->comment('排序');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('post_music_category_rel', function (Blueprint $table) {
+            //
+        });
+    }
+}