Masalah terjadi ketika menjalankan command dan merubah suatu column dengan tipe data string yang asalnya defaultnya tidak boleh kosong mau di rubah menjadi boleh kosong namun error, berikut error outputnya
In AbstractPlatform.php line 429:
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.
Solusi :
public function up()
{
Schema::getConnection()->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
Schema::table('jobs', function(Blueprint $table)
{
$table->decimal('latitude', 10, 6)->nullable()->change();
});
}
Reference :
https://github.com/laravel/framework/issues/1186#issuecomment-118194746
Comments