SQLSTATE[IM001]:驱动程序不支持此功能:驱动程序不支持该属性

问题描述

通过迁移更改表时出错,

sqlSTATE[IM001]: 驱动程序不支持功能:驱动程序不支持属性

这个错误来自 $table->string('api_key')->change(); 这条线有问题,因为 change() 方法

我使用的是 mssql 版本 = Microsoft sql Server 2019 (RTM-CU9) (KB5000642) - 15.0.4102.2 (X64) PHP 版本 = 7.1


use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddTaxesToFeesMasterTable extends Migration
{
 /**
  * Run the migrations.
  *
  * @return void
  */
 public function up()
 {
     Schema::table('api_keys',function (Blueprint $table) {
         $table->string('api_key')->nullable()->change();
     });
 }

 /**
  * Reverse the migrations.
  *
  * @return void
  */
 public function down()
 {
     Schema::table('api_keys',function (Blueprint $table) {
         //
     });
 }
}

error

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)