Daniel Supernault 2 anni fa
parent
commit
434f1f229c

+ 32 - 0
database/migrations/2022_12_18_133815_add_default_value_to_admin_invites_table.php

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