invoiceninja/database/migrations/2014_02_13_151500_add_cascase_drops.php
2017-01-30 21:40:43 +02:00

29 lines
547 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
class AddCascaseDrops extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoices', function ($table) {
$table->dropForeign('invoices_account_id_foreign');
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}