diff options
author | msquare <msquare@notrademark.de> | 2019-12-27 19:47:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-27 19:47:52 +0100 |
commit | 0cab703c941e96d03072364c2082605f18245b5a (patch) | |
tree | 44ea0e2f23db7fa5a12bc5b971c56d773ed58c9f /db/migrations | |
parent | 537179df66b1245f034e9bedeff7d74cbc6a7f5c (diff) | |
parent | e1471248fe8f8a4fc6edef28fe702245c2fde48d (diff) |
Merge pull request #705 from MyIgel/pronoun
User: Add pronoun statement
Diffstat (limited to 'db/migrations')
-rw-r--r-- | db/migrations/2019_12_03_000000_user_personal_data_add_pronoun_field.php | 34 |
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'); + }); + } +} |