diff options
author | Camil Staps | 2020-01-03 20:16:07 +0100 |
---|---|---|
committer | Camil Staps | 2020-01-03 20:16:37 +0100 |
commit | aa1c06945a0a4bd103555d802277ad86d9d28eb0 (patch) | |
tree | f66f12a5e0f8ef69331a44b910cd194e486233c3 /database/migrations | |
parent | Fix: trigger check when pressing infinitivus (diff) |
Remove mediopassive
Diffstat (limited to 'database/migrations')
-rw-r--r-- | database/migrations/2020_01_03_190703_remove_mediopassive_voice.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/database/migrations/2020_01_03_190703_remove_mediopassive_voice.php b/database/migrations/2020_01_03_190703_remove_mediopassive_voice.php new file mode 100644 index 0000000..beddf3e --- /dev/null +++ b/database/migrations/2020_01_03_190703_remove_mediopassive_voice.php @@ -0,0 +1,32 @@ +<?php + +use Illuminate\Support\Facades\Schema; +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +use HebrewParseTrainer\Form; + +class RemoveMediopassiveVoice extends Migration +{ + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Form::where('voice', 'MP')->update(['voice' => 'M']); + + DB::statement("ALTER TABLE forms CHANGE COLUMN voice voice ENUM('A', 'M', 'P') NOT NULL"); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + DB::statement("ALTER TABLE forms CHANGE COLUMN voice voice ENUM('A', 'M', 'P', 'MP') NOT NULL"); + } +} |