From 4afc217870779fdfdaf45e71ba547570453e3c5a Mon Sep 17 00:00:00 2001 From: Avet <29avet1@gmail.com> Date: Wed, 4 Sep 2019 13:51:28 +0400 Subject: [PATCH] update migrations --- .../2018_05_05_060603_create_contacts_table.php | 8 ++------ .../2018_05_05_060604_create_invoices_table.php | 1 - .../2018_08_30_064136_create_invitations_table.php | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/database/migrations/2018_05_05_060603_create_contacts_table.php b/database/migrations/2018_05_05_060603_create_contacts_table.php index 771db5e..bce4801 100644 --- a/database/migrations/2018_05_05_060603_create_contacts_table.php +++ b/database/migrations/2018_05_05_060603_create_contacts_table.php @@ -17,22 +17,18 @@ public function up() $table->increments('id'); $table->uuid('uuid')->unique(); $table->unsignedInteger('team_id'); - $table->string('phone', 30); - $table->string('email')->nullable(); + $table->string('phone', 30)->unique(); + $table->string('email')->nullable()->unique(); $table->string('name')->nullable(); $table->string('avatar')->nullable(); $table->json('meta_data')->nullable(); - $table->timestamp('unsubscribed_at')->nullable(); $table->timestamps(); $table->softDeletes(); - $table->unique('phone'); - $table->unique('email'); $table->index('uuid'); $table->index('name'); $table->index('phone'); $table->index('email'); - $table->index('unsubscribed_at'); }); Schema::table('contacts', function (Blueprint $table) { diff --git a/database/migrations/2018_05_05_060604_create_invoices_table.php b/database/migrations/2018_05_05_060604_create_invoices_table.php index aa49aa6..effe254 100644 --- a/database/migrations/2018_05_05_060604_create_invoices_table.php +++ b/database/migrations/2018_05_05_060604_create_invoices_table.php @@ -26,7 +26,6 @@ public function up() $table->decimal('shipping_cost')->nullable(); $table->decimal('refunded_amount')->nullable(); $table->text('message')->nullable(); - $table->boolean('shipping')->default(false); $table->timestamp('paid_at')->nullable(); $table->timestamp('refunded_at')->nullable(); $table->timestamps(); diff --git a/database/migrations/2018_08_30_064136_create_invitations_table.php b/database/migrations/2018_08_30_064136_create_invitations_table.php index 2228a9e..f8e17cd 100644 --- a/database/migrations/2018_08_30_064136_create_invitations_table.php +++ b/database/migrations/2018_08_30_064136_create_invitations_table.php @@ -24,10 +24,10 @@ public function up() $table->timestamp('expires_at'); $table->timestamps(); + $table->unique(['team_id', 'email']); $table->index('uuid'); $table->index('token'); $table->index('email'); - $table->unique(['team_id', 'email']); }); Schema::table('invitations', function (Blueprint $table) {