【问题标题】:Doctrine Dbal Table not alteredDoctrine Dbal Table 未更改
【发布时间】:2017-07-20 09:24:48
【问题描述】:

虽然我在 composer.json 中添加了学说/dbal 并更新了 composer 但即便如此仍面临错误

违反完整性约束:1062 Duplicate entry '' for key 'users_oauthprovider_id_unique

  Schema::table('users', function (Blueprint $table) {
            $table->string('password')->nullable()->change();
            $table->string('oauthprovider');
            $table->string('oauthprovider_id')->unique();
        });

【问题讨论】:

    标签: laravel


    【解决方案1】:

    尝试使 oauthprovider_id 可以为空。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-07
      • 2011-07-15
      • 2021-04-20
      • 2011-10-07
      • 2014-04-30
      • 2015-11-09
      • 2013-06-01
      • 1970-01-01
      相关资源
      最近更新 更多