Record whether a portal session used a private Wi-Fi address
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Whether the device presented a private (randomized) address.
|
||||
*
|
||||
* Nullable, because rows written before this existed genuinely do not know —
|
||||
* defaulting them to false would assert something untrue about every historical
|
||||
* session.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('unifi_portal_sessions', function (Blueprint $table) {
|
||||
$table->boolean('is_randomized')->nullable()->after('mac_address');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('unifi_portal_sessions', function (Blueprint $table) {
|
||||
$table->dropColumn('is_randomized');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user