How to convert string column type to integer using Laravel migration?

Your issue is most likely caused by a bug in the most recent version of the doctrine/dbal package. The issue was introduced with v2.10.0.

You can always downgrade the package in your composer.json to v2.9.3 it should work just fine.

See the offical issue here: https://github.com/doctrine/dbal/issues/3714


As a alternative solution to https://github.com/doctrine/dbal/issues/3714 that is downgrading the doctrine/dbal package u can do:

Schema::table('member_section', function (Blueprint $table) {
    $table->bigInteger('type')->charset(null)->collation(null)->change();
});

Tags:

Mysql

Php

Laravel