Answers for "add to enum by alter in laravel migration"

PHP
3

laravel enum migration example

$table->enum('animal_type',['cat','dog','unknown'])->default('unknown');
Posted by: Guest on October-02-2021
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

Code answers related to "add to enum by alter in laravel migration"

Browse Popular Code Answers by Language