Skip to content

A free open source IT asset/license management system

Add VIP Checkbox

akemidx19cf170dd99f
diff --git a/database/migrations/2023_01_23_232933_add_vip_to_users.php b/database/migrations/2023_01_23_232933_add_vip_to_users.php
new file mode 100644
index 0000000000..40db001b17
--- /dev/null
+++ b/database/migrations/2023_01_23_232933_add_vip_to_users.php
@@ -0,0 +1,34 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddVipToUsers extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('users', function (Blueprint $table) {
+ $table->boolean('vipuser')->nullable()->default(0);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('users', function (Blueprint $table) {
+ if (Schema::hasColumn('users', 'vipuser')) {
+ $table->dropColumn('vipuser');
+ }
+ });
+ }
+}