Answers for "how to change enum values in migration files in laravel"

PHP
3

laravel enum migration

Add Laravel enmu migration : 
------------------------------
$table->enum('question_type', ['objective', 'subjective', 'multiple_choice']);

Update Laravel enum migration :
---------------------------------
DB::statement("ALTER TABLE users CHANGE COLUMN permissions permissions ENUM('admin', 'user', 'candidate') NOT NULL DEFAULT 'user'");
Posted by: Guest on July-23-2020
1

Laravel Migration - Update Enum Options

DB::statement("ALTER TABLE users CHANGE COLUMN permissions permissions ENUM('admin', 'user', 'candidate') NOT NULL DEFAULT 'user'");
Posted by: Guest on April-28-2021

Code answers related to "how to change enum values in migration files in laravel"

Browse Popular Code Answers by Language