Skip to content

Commit

Permalink
Remove unique index from items table
Browse files Browse the repository at this point in the history
I stumbled upon an edge case where Stripe created a new subscription item for the same price ID. This means Cashier attempts to insert this while the unique constraint is active. Although it's unlikely this happens often (we only saw this just a couple of times) we shouldn't rely on this index anymore.
  • Loading branch information
driesvints authored Oct 30, 2023
1 parent 36826f0 commit 4680e3e
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ public function up(): void
$table->string('stripe_price');
$table->integer('quantity')->nullable();
$table->timestamps();

$table->unique(['subscription_id', 'stripe_price']);
});
}

Expand Down

0 comments on commit 4680e3e

Please sign in to comment.