forked from portabilis/i-educar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adiciona migration para alteração do campo na tabela `modules.profess…
…or_turma`
- Loading branch information
1 parent
253e650
commit 8689a8b
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
database/migrations/2023_06_06_101020_update_column_in_table_modules_professor_turma.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Support\Facades\DB; | ||
|
||
return new class () extends Migration { | ||
public function up(): void | ||
{ | ||
DB::unprepared('ALTER TABLE IF EXISTS modules.professor_turma ALTER COLUMN outras_unidades_curriculares_obrigatorias DROP NOT NULL;'); | ||
DB::unprepared('UPDATE modules.professor_turma SET outras_unidades_curriculares_obrigatorias = null WHERE outras_unidades_curriculares_obrigatorias = 0;'); | ||
} | ||
}; |