From 351752962628e0d297de28d1f66559af8c276a2e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Fri, 13 Jan 2017 13:54:21 +0200 Subject: [PATCH] Fix for migrations --- app/Http/routes.php | 2 +- database/migrations/2016_07_08_083802_support_new_pricing.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/routes.php b/app/Http/routes.php index 38714cc13ff1..3acbbc9e0d5a 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -645,7 +645,7 @@ if (!defined('CONTACT_EMAIL')) { define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com')); define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest')); define('NINJA_DATE', '2000-01-01'); - define('NINJA_VERSION', '2.9.4' . env('NINJA_VERSION_SUFFIX')); + define('NINJA_VERSION', '2.9.5' . env('NINJA_VERSION_SUFFIX')); define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja')); define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja')); diff --git a/database/migrations/2016_07_08_083802_support_new_pricing.php b/database/migrations/2016_07_08_083802_support_new_pricing.php index 89a8a8a4b627..b6bacffc6758 100644 --- a/database/migrations/2016_07_08_083802_support_new_pricing.php +++ b/database/migrations/2016_07_08_083802_support_new_pricing.php @@ -30,7 +30,9 @@ class SupportNewPricing extends Migration // https://github.com/invoiceninja/invoiceninja/pull/955 Schema::table('activities', function (Blueprint $table) { $table->integer('task_id')->after('invitation_id')->nullable(); - $table->unsignedInteger('client_id')->nullable()->change(); + if (Schema::hasColumn('activities', 'client_id')) { + $table->unsignedInteger('client_id')->nullable()->change(); + } }); // This may fail if the table was created as MyISAM