Serve dashboard stats from daily_stats and default visit list to today.
Stop live-scanning page_visits on every dashboard load (including today) so the admin home stays fast; keep the live path only for channel filters and cache the result for 45s. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('daily_stats', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('pv')->nullable()->after('scope_key');
|
||||
$table->unsignedBigInteger('effective_pv')->nullable()->after('effective_uv');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('daily_stats', function (Blueprint $table) {
|
||||
$table->dropColumn(['pv', 'effective_pv']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user