fix bug
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ return new class extends Migration
|
||||
$payload = [
|
||||
'title_fa' => self::TITLE_FA,
|
||||
'description' => self::DESCRIPTION,
|
||||
'can_edit' => 1,
|
||||
'can_edit' => 0,
|
||||
'updated_at' => now(),
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
if (!Schema::hasTable('settings') || !Schema::hasColumn('settings', 'can_edit')) {
|
||||
return;
|
||||
}
|
||||
|
||||
DB::table('settings')
|
||||
->where('key', 'fee_deduct_from_gold')
|
||||
->update(['can_edit' => 0, 'updated_at' => now()]);
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// can_edit را عمداً برنمیگردانیم — قفل بودن فیلد سیاست ثابت است.
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user