瀏覽代碼

添加 path 字段到 pali_texts

visuddhinanda@gmail.com 3 年之前
父節點
當前提交
3f2ca9a567
共有 1 個文件被更改,包括 34 次插入0 次删除
  1. 34 0
      database/migrations/2022_05_20_144400_add_path_into_pali_texts.php

+ 34 - 0
database/migrations/2022_05_20_144400_add_path_into_pali_texts.php

@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddPathIntoPaliTexts extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        //
+        Schema::table('pali_texts',function (Blueprint $table) {
+            $table->json('path')->after('parent')->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+        Schema::table('pali_texts', function (Blueprint $table) {
+            $table->dropColumn('path');
+        });
+    }
+}