drop foreign issue solved

This commit is contained in:
jayvirsinh_gohil
2021-06-24 13:39:35 +05:30
parent 3d9a73f9ec
commit 0e0ef1d99e

View File

@ -25,6 +25,9 @@ class RemoveTemplateIdFromInvoicesAndEstimatesTable extends Migration
}); });
Schema::table('invoices', function (Blueprint $table) { Schema::table('invoices', function (Blueprint $table) {
if (config('database.default') !== 'sqlite') {
$table->dropForeign(['invoice_template_id']);
}
$table->dropColumn('invoice_template_id'); $table->dropColumn('invoice_template_id');
}); });
} }
@ -39,6 +42,9 @@ class RemoveTemplateIdFromInvoicesAndEstimatesTable extends Migration
}); });
Schema::table('estimates', function (Blueprint $table) { Schema::table('estimates', function (Blueprint $table) {
if (config('database.default') !== 'sqlite') {
$table->dropForeign(['estimate_template_id']);
}
$table->dropColumn('estimate_template_id'); $table->dropColumn('estimate_template_id');
}); });
} }