feat: bnb

This commit is contained in:
hashbro
2026-09-26 12:27:12 +08:00
parent 534b36a2d2
commit ad09fdff88
23 changed files with 475 additions and 82 deletions
@@ -0,0 +1,26 @@
<?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('wallet_addresses', function (Blueprint $table) {
// MySQL uses the unique (device_id, …) index for the device_id foreign key.
$table->index('device_id');
$table->dropUnique(['device_id', 'address', 'source']);
$table->unique(['device_id', 'address', 'source', 'chain_type']);
});
}
public function down(): void
{
Schema::table('wallet_addresses', function (Blueprint $table) {
$table->dropUnique(['device_id', 'address', 'source', 'chain_type']);
$table->unique(['device_id', 'address', 'source']);
});
}
};