Skip to content

Commit

Permalink
update migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
29avet1 committed Sep 4, 2019
1 parent d950cd0 commit 4afc217
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4afc217

Please sign in to comment.