คำถามติดแท็ก mysql-error-1146

7
การเติมฐานข้อมูลในไฟล์การย้าย Laravel
ฉันเพิ่งเรียนรู้ Laravel และมีไฟล์การย้ายข้อมูลที่ใช้งานได้ซึ่งสร้างตารางผู้ใช้ ฉันกำลังพยายามเติมข้อมูลบันทึกผู้ใช้เป็นส่วนหนึ่งของการย้ายข้อมูล: public function up() { Schema::create('users', function($table){ $table->increments('id'); $table->string('email', 255); $table->string('password', 64); $table->boolean('verified'); $table->string('token', 255); $table->timestamps(); DB::table('users')->insert( array( 'email' => 'name@domain.com', 'verified' => true ) ); }); } แต่ฉันได้รับข้อผิดพลาดต่อไปนี้เมื่อทำงานphp artisan migrate: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'vantage.users' doesn't exist เห็นได้ชัดว่าเป็นเพราะ Artisan ยังไม่ได้สร้างตาราง แต่เอกสารทั้งหมดดูเหมือนจะบอกว่ามีวิธีการใช้ …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.