Am using Laravel 5.6
I Tried to migrate purchases table for my project
When i tried to migrate and it's showing Table Space error.
General error: 1813 Tablespace for table '
jshop
.purchases
' exists. Please DISCARD the tablespace before IMPORT.
Migrate Code Below :
Schema::create('purchases', function (Blueprint $table) {
$table->increments('id');
$table->integer("product_price");
$table->integer("product_qty");
$table->unsignedInteger('invoice_id');
$table->unsignedInteger('product_id');
$table->unsignedInteger('weight_id');
$table->timestamps();
$table->foreign("invoice_id")->references('id')->on('invoices');
$table->foreign("product_id")->references('id')->on('products');
$table->foreign("weight_id")->references('id')->on('weights');
});
invoice,products,weights table are valid in my database.
Error Message Image Below : Migration Error image Link How to solve this ?