第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

將表遷移到 db 時出錯……表已存在

將表遷移到 db 時出錯……表已存在

PHP
哈士奇WWW 2021-06-30 18:27:45
當(dāng)我將表遷移到 db 時,出現(xiàn)此錯誤SQLSTATE[42S01]: 基表或視圖已經(jīng)存在:1050 表 'users' 已經(jīng)存在(SQL:創(chuàng)建表users(idint unsigned not null auto_increment 主鍵,bodylongtext not null,url varchar(255) null,user_id int unsigned not null,commentable_id int unsigned not null, commentable_typevarchar(191) not null, created_a   ttimestamp null, updated_attimestamp null) 默認字符集 utf8mb4 collate utf8mb4_unicode_ci) 在 Connection.php 第 449 行:SQLSTATE[42S01]:基表或視圖已經(jīng)存在:1050 表 'users' 已經(jīng)存在<?phpuse Illuminate\Support\Facades\Schema;use Illuminate\Database\Schema\Blueprint;use Illuminate\Database\Migrations\Migration;class CreateUsersTable extends Migration{    /**     * Run the migrations.     *     * @return void     */    public function up()    {        if(!Schema::hasTable('users')){            Schema::create('users', function (Blueprint $table) {                $table->increments('id');                $table-> string('name');                $table-> string('email')->unique();                $table-> string('password');                $table->rememberToken();                $table->timestamps();            });        }        Schema::table('users', function(Blueprint $table){            $table -> string('first_name') -> nullabel();            $table -> string('middle_name') -> nullabel();            $table -> string('last_name') -> nullabel();            $table -> string('city') -> nullabel();            $table -> integer('role') -> unsigned();        });    }    /**     * Reverse the migrations.     *     * @return void     */    public function down()    {        Schema::dropIfExists('users');    }我從數(shù)據(jù)庫中刪除了所有表然后我嘗試但給出了同樣的錯誤
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 220 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號