php - 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) {
//
});
}
}
解决方案
推荐阅读
- node.js - 使用 Azure Functions 在 nodejs 中使用messaging_type 和标签的主动消息、botbuilder 到 FB messenger
- java - Sonarqube 扫描仪和 Maven Tycho:DefaultProjectArtifactsCache$CacheKey 处出现 NullPointerException。
- r - R - RStudio 使用带有 `mutate_at()` 的自定义可迭代函数时
- linux - 在 Linux 机器上读取 SQL MDF 文件
- flutter - Flutter 参数类型“Listenable”不能赋值给参数类型“Animation”
- reactjs - React.js:如何从 ag 网格中删除行?
- azure - Azure Web App - Azure AD - SPA - response_type 中缺少“令牌”
- python-3.x - 调试关于日期之间天数的函数
- tensorflow - tensorflow 1.15“m48”和tensorflow 1.15“m45”之间的启动区别是什么?
- reactjs - 如何在 React 数组映射中显示从 API 获取的数据