fix withdraw error on montify track number
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* session_id مونتیفای ~۶۴ کاراکتر است؛ tracked_number قبلاً کوتاه بود (مثلاً varchar(50)).
|
||||||
|
*/
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
if (! Schema::hasTable('withdraws') || ! Schema::hasColumn('withdraws', 'tracked_number')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::statement('ALTER TABLE `withdraws` MODIFY `tracked_number` VARCHAR(191) NULL');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
if (! Schema::hasTable('withdraws') || ! Schema::hasColumn('withdraws', 'tracked_number')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::statement('ALTER TABLE `withdraws` MODIFY `tracked_number` VARCHAR(50) NULL');
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user