visuddhinanda 1 год назад
Родитель
Сommit
d1b3ef6dec

+ 35 - 0
api-v8/database/migrations/2025_03_16_113614_add_privacy_in_projects.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddPrivacyInProjects extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('projects', function (Blueprint $table) {
+            //
+            $table->string('privacy', 32)->index()->default('private')
+                ->comment('隐私性:private|public');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('projects', function (Blueprint $table) {
+            //
+            $table->dropColumn('privacy');
+        });
+    }
+}