]> _ Git - psq.git/commitdiff
missiing migration
authorLouis Jeckel <louis.jeckel@outlook.com>
Wed, 14 Oct 2020 23:44:58 +0000 (01:44 +0200)
committerLouis Jeckel <louis.jeckel@outlook.com>
Wed, 14 Oct 2020 23:44:58 +0000 (01:44 +0200)
database/migrations/2020_10_14_032810_add_infos_to_users.php [new file with mode: 0644]

diff --git a/database/migrations/2020_10_14_032810_add_infos_to_users.php b/database/migrations/2020_10_14_032810_add_infos_to_users.php
new file mode 100644 (file)
index 0000000..1ec101c
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class AddInfosToUsers extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->string('service')->nullable();
+            $table->boolean('wants_pdf')->default(0);
+            $table->boolean('accepts_polls')->default(0);
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('users', function (Blueprint $table) {
+            $table->dropColumn('service');
+            $table->dropColumn('wants_pdf');
+            $table->dropColumn('accepts_polls');
+        });
+    }
+}