summaryrefslogtreecommitdiff
path: root/db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php')
-rw-r--r--db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php34
1 files changed, 34 insertions, 0 deletions
diff --git a/db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php b/db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php
new file mode 100644
index 00000000..3109c888
--- /dev/null
+++ b/db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php
@@ -0,0 +1,34 @@
+<?php
+
+declare(strict_types=1);
+
+namespace Engelsystem\Migrations;
+
+use Engelsystem\Database\Migration\Migration;
+use Illuminate\Database\Schema\Blueprint;
+
+class UserPersonalDataAddPronounField extends Migration
+{
+ /**
+ * Run the migration
+ */
+ public function up(): void
+ {
+ $this->schema->table('users_personal_data', function (Blueprint $table) {
+ $table->string('pronoun', 15)
+ ->nullable()
+ ->default(null)
+ ->after('last_name');
+ });
+ }
+
+ /**
+ * Reverse the migration
+ */
+ public function down(): void
+ {
+ $this->schema->table('users_personal_data', function (Blueprint $table) {
+ $table->dropColumn('pronoun');
+ });
+ }
+}