1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

fixed bug in migration

This commit is contained in:
David Bomba 2016-02-03 09:10:54 +11:00
parent 8bdf973f6e
commit 6683062d9e

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