Rename sessions to _sessions, drop legacy migrations table

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-12-08 04:27:07 +00:00
parent b5be754ef8
commit 2da7a6da08
8 changed files with 72 additions and 23 deletions

View File

@@ -101,7 +101,7 @@ class Session extends Rsx_System_Model_Abstract
* The table associated with the model
* @var string
*/
protected $table = 'sessions';
protected $table = '_sessions';
/**
* The attributes that should be cast

View File

@@ -36,7 +36,7 @@ class Session_Cleanup_Service extends Rsx_Service_Abstract
{
// Logged-in sessions: older than 365 days
$logged_in_cutoff = now()->subDays(365);
$logged_in_deleted = DB::table('sessions')
$logged_in_deleted = DB::table('_sessions')
->whereNotNull('login_user_id')
->where('last_active', '<', $logged_in_cutoff)
->delete();
@@ -45,7 +45,7 @@ class Session_Cleanup_Service extends Rsx_Service_Abstract
// Anonymous sessions: older than 14 days
$anonymous_cutoff = now()->subDays(14);
$anonymous_deleted = DB::table('sessions')
$anonymous_deleted = DB::table('_sessions')
->whereNull('login_user_id')
->where('last_active', '<', $anonymous_cutoff)
->delete();