Hi Devs.
I am trying to modify an enum column and am getting the following error.
``
Migrating: 2020_10_18_175812_change_status_to_orders_table
Illuminate\Database\QueryException
SQLSTATE[HY000]: General error: 1 near "MODIFY": syntax error (SQL: ALTER TABLE orders MODIFY COLUMN status ENUM('pending', 'processing', 'shipped', 'delivered', 'decline', 'cancel',) NOT NULL DEFAULT 'pending')
at E:\Projects\Zimcart-Premium\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
1 E:\Projects\Zimcart-Premium\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[HY000]: General error: 1 near "MODIFY": syntax error")
2 E:\Projects\Zimcart-Premium\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:82
Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
``
MY CODE
DB::statement("ALTER TABLE orders MODIFY COLUMN status ENUM('pending', 'processing', 'shipped', 'delivered', 'decline', 'cancel') NOT NULL DEFAULT 'pending'");