Answers for "laravel migration update column enum"

PHP
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
-1

how to change the colum type in migration laravel

public function changeColumnType($table, $column, $newColumnType) {                
    DB::statement("ALTER TABLE $table CHANGE $column $column $newColumnType");
}
Posted by: Guest on January-12-2022

Code answers related to "laravel migration update column enum"

Browse Popular Code Answers by Language