summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-12-26 19:07:51 +0100
committerIgor Scheller <igor.scheller@igorshp.de>2019-12-26 19:18:47 +0100
commite1471248fe8f8a4fc6edef28fe702245c2fde48d (patch)
tree62fc2899543b6c0b62c69d1728e39c4a9f0572c9 /db
parentec47d124bb1626d1aa604d7fdb6ddbbd77c14987 (diff)
User: Add pronoun statement
Diffstat (limited to 'db')
-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');
+ });
+ }
+}