Merge pull request #683 from turbo124/master

fixed bug in migration
This commit is contained in:
David Bomba 2016-02-03 13:14:44 +11:00
commit 395f6b2b65

View File

@ -20,6 +20,10 @@ class AddSourceCurrencyToExpenses extends Migration
$table->renameColumn('currency_id', 'invoice_currency_id');
$table->unsignedInteger('expense_currency_id');
});
Schema::table('expenses', function (Blueprint $table) {
// set account value so we're able to create foreign constraint
DB::statement('update expenses e
left join accounts a on a.id = e.account_id