diff --git a/database/migrations/2013_11_05_180133_confide_setup_users_table.php b/database/migrations/2013_11_05_180133_confide_setup_users_table.php index e9c10da1ad1e..a6538f20a49d 100644 --- a/database/migrations/2013_11_05_180133_confide_setup_users_table.php +++ b/database/migrations/2013_11_05_180133_confide_setup_users_table.php @@ -493,8 +493,8 @@ class ConfideSetupUsersTable extends Migration { $t->timestamps(); $t->unsignedInteger('account_id'); - $t->unsignedInteger('client_id'); $t->unsignedInteger('user_id'); + $t->unsignedInteger('client_id')->nullable(); $t->unsignedInteger('contact_id')->nullable(); $t->unsignedInteger('payment_id')->nullable(); $t->unsignedInteger('invoice_id')->nullable(); @@ -508,7 +508,6 @@ class ConfideSetupUsersTable extends Migration { $t->decimal('balance', 13, 2)->nullable(); $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); - $t->foreign('client_id')->references('id')->on('clients')->onDelete('cascade'); }); } 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 cfb941345642..98df8cad42d7 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,7 @@ 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->dropForeign('activities_client_id_foreign'); + $table->unsignedInteger('client_id')->nullable()->change(); }); // https://github.com/invoiceninja/invoiceninja/pull/950