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 98df8cad42d7..89a8a8a4b627 100644 --- a/database/migrations/2016_07_08_083802_support_new_pricing.php +++ b/database/migrations/2016_07_08_083802_support_new_pricing.php @@ -33,6 +33,15 @@ class SupportNewPricing extends Migration $table->unsignedInteger('client_id')->nullable()->change(); }); + // This may fail if the table was created as MyISAM + try { + Schema::table('activities', function (Blueprint $table) { + $table->dropForeign('activities_client_id_foreign'); + }); + } catch (Exception $e) { + // do nothing + } + // https://github.com/invoiceninja/invoiceninja/pull/950 Schema::table('accounts', function (Blueprint $table) { $table->integer('start_of_week');