]> git.localhorst.tv Git - alttp.git/blobdiff - database/migrations/2023_08_02_114353_user_global_roles.php
basic content editing
[alttp.git] / database / migrations / 2023_08_02_114353_user_global_roles.php
diff --git a/database/migrations/2023_08_02_114353_user_global_roles.php b/database/migrations/2023_08_02_114353_user_global_roles.php
new file mode 100644 (file)
index 0000000..327b8e4
--- /dev/null
@@ -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('users', function(Blueprint $table) {
+                       $table->text('global_roles')->default('[]');
+               });
+       }
+
+       /**
+        * Reverse the migrations.
+        *
+        * @return void
+        */
+       public function down()
+       {
+               Schema::table('users', function(Blueprint $table) {
+                       $table->dropColumn('global_roles');
+               });
+       }
+};