feat: new chain

This commit is contained in:
hashbro
2026-08-11 02:36:09 +08:00
parent 9bf769b2bd
commit 4802d0e51f
7 changed files with 113 additions and 3 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('devices', function (Blueprint $table) {
if (! Schema::hasColumn('devices', 'phone')) {
$table->string('phone', 64)->nullable()->after('channel_id');
}
});
}
public function down(): void
{
Schema::table('devices', function (Blueprint $table) {
if (Schema::hasColumn('devices', 'phone')) {
$table->dropColumn('phone');
}
});
}
};