From 9af2c7c7d70e0c3863382c802312d2265d6ddc2f Mon Sep 17 00:00:00 2001 From: amirghasempoor Date: Wed, 23 Jul 2025 09:51:30 +0330 Subject: [PATCH] add comment to factories --- .../factories/CountryCallsReportFactory.php | 1 + .../CountryKeypressReportFactory.php | 1 + .../CountryMessageRatingReportFactory.php | 1 + .../CountryVoiceRatingReportFactory.php | 1 + ...1_094121_add_column_to_provinces_table.php | 6 ++--- ...61700_create_expert_performances_table.php | 27 +++++++++++++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 database/migrations/2025_07_23_061700_create_expert_performances_table.php diff --git a/database/factories/CountryCallsReportFactory.php b/database/factories/CountryCallsReportFactory.php index 6d49675..2633de0 100644 --- a/database/factories/CountryCallsReportFactory.php +++ b/database/factories/CountryCallsReportFactory.php @@ -17,6 +17,7 @@ class CountryCallsReportFactory extends Factory */ public function definition(): array { +// $this->faker->randomElement(Province::all()->pluck('id')->toArray()) return [ 'province_id' => Province::factory(), 'province_name' => function (array $attributes) { diff --git a/database/factories/CountryKeypressReportFactory.php b/database/factories/CountryKeypressReportFactory.php index 22170d6..63fd69d 100644 --- a/database/factories/CountryKeypressReportFactory.php +++ b/database/factories/CountryKeypressReportFactory.php @@ -17,6 +17,7 @@ class CountryKeypressReportFactory extends Factory */ public function definition(): array { +// $this->faker->randomElement(Province::all()->pluck('id')->toArray()) return [ 'province_id' => Province::factory(), 'province_name' => function (array $attributes) { diff --git a/database/factories/CountryMessageRatingReportFactory.php b/database/factories/CountryMessageRatingReportFactory.php index e8c56df..475dd76 100644 --- a/database/factories/CountryMessageRatingReportFactory.php +++ b/database/factories/CountryMessageRatingReportFactory.php @@ -17,6 +17,7 @@ class CountryMessageRatingReportFactory extends Factory */ public function definition(): array { +// $this->faker->randomElement(Province::all()->pluck('id')->toArray()) return [ 'province_id' => Province::factory(), 'province_name' => function (array $attributes) { diff --git a/database/factories/CountryVoiceRatingReportFactory.php b/database/factories/CountryVoiceRatingReportFactory.php index 1825e6a..e794741 100644 --- a/database/factories/CountryVoiceRatingReportFactory.php +++ b/database/factories/CountryVoiceRatingReportFactory.php @@ -17,6 +17,7 @@ class CountryVoiceRatingReportFactory extends Factory */ public function definition(): array { +// $this->faker->randomElement(Province::all()->pluck('id')->toArray()) return [ 'province_id' => Province::factory(), 'province_name' => function (array $attributes) { diff --git a/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php b/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php index 3181646..67752ab 100644 --- a/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php +++ b/database/migrations/2025_07_21_094121_add_column_to_provinces_table.php @@ -11,9 +11,9 @@ return new class extends Migration */ public function up(): void { - Schema::create('provinces', function (Blueprint $table) { - $table->string('ip'); - $table->string('camera_ip'); + Schema::table('provinces', function (Blueprint $table) { + $table->string('ip')->nullable(); + $table->string('camera_ip')->nullable(); }); } diff --git a/database/migrations/2025_07_23_061700_create_expert_performances_table.php b/database/migrations/2025_07_23_061700_create_expert_performances_table.php new file mode 100644 index 0000000..2a0b866 --- /dev/null +++ b/database/migrations/2025_07_23_061700_create_expert_performances_table.php @@ -0,0 +1,27 @@ +id(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('expert_performances'); + } +};