From 61beeee7de7444f193520301146f28317e44c08f Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 29 Oct 2025 13:02:04 +0100 Subject: [PATCH] Add missing migration --- ...reate_user_activity_stats_hourly_table.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 database/migrations/2025_10_29_000000_create_user_activity_stats_hourly_table.php diff --git a/database/migrations/2025_10_29_000000_create_user_activity_stats_hourly_table.php b/database/migrations/2025_10_29_000000_create_user_activity_stats_hourly_table.php new file mode 100644 index 000000000..102f097bd --- /dev/null +++ b/database/migrations/2025_10_29_000000_create_user_activity_stats_hourly_table.php @@ -0,0 +1,33 @@ +id(); + $table->dateTime('stat_hour')->index(); + $table->integer('downloads_count')->default(0); + $table->integer('api_hits_count')->default(0); + $table->timestamps(); + + // Ensure one record per hour + $table->unique('stat_hour'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('user_activity_stats_hourly'); + } +};