From 3a6de55d1907aba4a4c06540d2a12d01257a0afc Mon Sep 17 00:00:00 2001 From: Antoine Le Gonidec Date: Tue, 9 Jul 2024 14:18:56 +0200 Subject: [PATCH] Drop the unicity constraint on Customer emails --- ...1535_drop_unicity_from_customer_emails.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 database/migrations/2024_07_09_141535_drop_unicity_from_customer_emails.php diff --git a/database/migrations/2024_07_09_141535_drop_unicity_from_customer_emails.php b/database/migrations/2024_07_09_141535_drop_unicity_from_customer_emails.php new file mode 100644 index 0000000..71b2fe1 --- /dev/null +++ b/database/migrations/2024_07_09_141535_drop_unicity_from_customer_emails.php @@ -0,0 +1,30 @@ +dropUnique(['email']); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() { + Schema::table('emails', function (Blueprint $table) { + // TODO: Remove all duplicated e-mails. + $table->unique('email'); + }); + } +}