Change column type to tinyInteger
Do This
Change tinyInteger to smallInteger
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\SmallIntType;
if (!Type::hasType('integer')) {
Type::addType('integer', SmallIntType::class);
}
i hope that this will solve your issue
DB::statement("ALTER TABLE table_name CHANGE COLUMN column_name column_name TINYINT UNSIGNED NOT NULL");
Indeed Doctrine Dbal does not support tinyint
you can read from their doc here
Unfortunately as well, laravel stated that tinyint
cannot be changed. Check here
I need someone to prove this as wrong, because I had to use smallInteger because of this issue for one of my projects. I am thinking maybe boolean()
might be the solution. I have not tried this though.