added wss tools 6
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?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
|
||||
{
|
||||
if (! Schema::hasTable('withdraws')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Schema::hasColumn('withdraws', 'extra_note')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('withdraws', function (Blueprint $table) {
|
||||
$table->text('extra_note')->nullable()->after('note');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
if (! Schema::hasTable('withdraws') || ! Schema::hasColumn('withdraws', 'extra_note')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Schema::table('withdraws', function (Blueprint $table) {
|
||||
$table->dropColumn('extra_note');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user