我創建遷移成功,但不能查看數據庫中的表,當我去「PHP工匠遷移」我面臨着一個錯誤說:基表或視圖未找到:1146
基表或視圖不發現:1146 pakishops.advertisement不存在。
這裏是遷移代碼:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdvertisementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('advertisement', function (Blueprint $table) {
$table->increments('id');
$table->integer('shop_id')->unsigned();
$table->foreign('shop_id')
->references('id')
->on('shops')
->onDelete('cascade');
$table->string('image')->default('default.jpg');
$table->datetime('starting_date');
$table->datetime('ending_date');
$table->boolean('is_paid');
$table->boolean('is_active');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('advertisement');
}
}
我應該怎麼做來解決這個問題?
感謝阿列克謝Mezenin你是真正有用的 –
@AsifNawaz如果這回答了你的問題,請你將其標記爲正確的:) –
@AsifNawaz請接受的答案... –