From cdc218e1167db9e99a9ac81d142cf8d893d56224 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sat, 26 Nov 2022 13:36:47 +0100 Subject: [PATCH] db factories: More unique constrains --- db/factories/GroupFactory.php | 2 +- db/factories/PrivilegeFactory.php | 2 +- db/factories/Shifts/ScheduleFactory.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/db/factories/GroupFactory.php b/db/factories/GroupFactory.php index 54c8d08f..8c05da23 100644 --- a/db/factories/GroupFactory.php +++ b/db/factories/GroupFactory.php @@ -16,7 +16,7 @@ class GroupFactory extends Factory public function definition() { return [ - 'name' => $this->faker->word(), + 'name' => $this->faker->unique()->word(), ]; } } diff --git a/db/factories/PrivilegeFactory.php b/db/factories/PrivilegeFactory.php index 12fee080..25ef0bfe 100644 --- a/db/factories/PrivilegeFactory.php +++ b/db/factories/PrivilegeFactory.php @@ -16,7 +16,7 @@ class PrivilegeFactory extends Factory public function definition() { return [ - 'name' => $this->faker->word(), + 'name' => $this->faker->unique()->word(), 'description' => $this->faker->text(), ]; } diff --git a/db/factories/Shifts/ScheduleFactory.php b/db/factories/Shifts/ScheduleFactory.php index 7dec1d1f..c918d23b 100644 --- a/db/factories/Shifts/ScheduleFactory.php +++ b/db/factories/Shifts/ScheduleFactory.php @@ -16,7 +16,7 @@ class ScheduleFactory extends Factory public function definition() { return [ - 'name' => $this->faker->words(4, true), + 'name' => $this->faker->unique()->words(4, true), 'url' => $this->faker->parse('https://{{safeEmailDomain}}/{{slug}}.xml'), 'shift_type' => $this->faker->numberBetween(1, 5), 'minutes_before' => 15,