visuddhinanda 3 лет назад
Родитель
Сommit
eb258f659f
1 измененных файлов с 40 добавлено и 0 удалено
  1. 40 0
      database/migrations/2023_02_02_135125_add_join_in_courses.php

+ 40 - 0
database/migrations/2023_02_02_135125_add_join_in_courses.php

@@ -0,0 +1,40 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddJoinInCourses extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('courses', function (Blueprint $table) {
+            //
+			$table->string('join',16)->default('invite')->index();
+			$table->string('request_exp',16)->default('none')->index();
+			$table->string('summary',256)->nullable();
+
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('courses', function (Blueprint $table) {
+            //
+            $table->dropColumn('join');
+            $table->dropColumn('request_exp');
+            $table->dropColumn('summary');
+
+        });
+    }
+}