From 0868aac750cd7919c971df386be60675f8993bae Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Jun 2017 08:48:40 +0200 Subject: [PATCH] Small update for 4.5.0 SQL update. --- database/migrations/2017_06_02_105232_changes_for_v450.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/migrations/2017_06_02_105232_changes_for_v450.php b/database/migrations/2017_06_02_105232_changes_for_v450.php index f0f39c839d..1f44bedf52 100644 --- a/database/migrations/2017_06_02_105232_changes_for_v450.php +++ b/database/migrations/2017_06_02_105232_changes_for_v450.php @@ -27,14 +27,14 @@ class ChangesForV450 extends Migration // add "foreign_amount" to transactions Schema::table( 'transactions', function (Blueprint $table) { - $table->decimal('foreign_amount', 22, 12)->after('amount'); + $table->decimal('foreign_amount', 22, 12)->nullable()->after('amount'); } ); // add foreign transaction currency id to transactions (is nullable): Schema::table( 'transactions', function (Blueprint $table) { - $table->integer('foreign_currency_id', false, true)->after('foreign_amount')->nullable(); + $table->integer('foreign_currency_id', false, true)->default(null)->after('foreign_amount')->nullable(); $table->foreign('foreign_currency_id')->references('id')->on('transaction_currencies')->onDelete('set null'); } );